Anti-dazzle method, intelligent glasses, electronic equipment and computer readable storage medium
Data is obtained through light source detection and eye movement detection cameras, glare areas are determined and lens discoloration is controlled, which solves the problem of the decline in the field of view brightness caused by existing anti-glare products and achieves a safe anti-glare effect.
Patent Information
- Application Number
- CN202510774823.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-08-19
AI Technical Summary
Existing anti-glare products will reduce glare while reducing glare, increasing safety hazards.
By acquiring the image data collected by the light source detection camera and the eye movement detection camera, determining the relative position parameters between the strong light source and the human eye, and controlling the lens to discolor the target glare area to reduce the light transmittance.
It realizes the brightness of other viewing angle areas while preventing glare and avoiding safety hazards.
Smart Images

Figure CN120507903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of glasses, and in particular to an anti-glare method, smart glasses, electronic equipment and a computer-readable storage medium. Background Art
[0002] Glare is an undesirable lighting phenomenon that occurs when the brightness of a light source is extremely high or when there is a large difference in brightness between the background and the center of the field of vision. For example, when pedestrians are walking or driving at night, if their eyes are suddenly illuminated by the high beams of oncoming vehicles, glare problems will occur, which can easily lead to traffic accidents.
[0003] Current anti-glare products generally use solutions such as sunglasses, polarized glasses or liquid crystal light valves. However, this method will reduce the brightness of the entire field of view of the user when wearing it, which will bring greater safety risks. Summary of the Invention
[0004] The main purpose of the present invention is to propose an anti-glare method, smart glasses, electronic equipment and computer-readable storage medium, aiming to solve the problem that anti-glare products in the prior art will reduce the brightness of the entire field of view, posing greater safety hazards.
[0005] To achieve the above object, the present invention provides an anti-glare method, comprising the steps of:
[0006] Acquire a strong light source image captured by a light source detection camera, and determine light source parameters of the strong light source through the strong light source image;
[0007] Acquire a human eye image captured by an eye movement detection camera, and determine relative position parameters between the human eye and the strong light source through the human eye image;
[0008] Determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters;
[0009] The lens is controlled to change color in the target glare area to reduce the light transmittance of the target glare area.
[0010] Optionally, the light source parameters include a strong light angle; and determining the light source parameters of the strong light source through the strong light source image includes:
[0011] Determine a strong light imaging length according to the strong light source image, wherein the strong light imaging length is the length of the strong light source irradiated on the image sensor of the light source detection camera;
[0012] Obtaining a first preset focal length of the light source detection camera;
[0013] The strong light angle is calculated based on the strong light imaging length and the first preset focal length.
[0014] Optionally, the number of the eye movement detection cameras is two, and each eye movement detection camera collects images of two human eyes respectively to obtain the human eye images corresponding to the two human eyes; the relative position parameter includes the direct viewing distance; and determining the relative position parameter between the human eye and the strong light source through the human eye image includes:
[0015] Determining an imaging point position corresponding to the strong light source based on the human eye image, wherein the imaging point position is a point where light emitted by the strong light source reaches an imaging surface of the eye movement detection camera after being reflected by the human eye;
[0016] Determining the imaging distance between each imaging point position and the edge of the corresponding imaging area in the same direction;
[0017] Obtaining a second preset focal length of the eye movement detection camera and a camera distance between two eye movement detection cameras;
[0018] The direct viewing distance between the strong light source and the human eye is determined according to the second preset focal length, the camera distance, and the imaging distance.
[0019] Optionally, determining the direct viewing distance between the strong light source and the human eye according to the second preset focal length, the camera distance, and the imaging distance includes:
[0020] Determining a strong light equivalent distance of the strong light source according to the second preset focal length, the camera distance, and the imaging distance, wherein the strong light equivalent distance is an equivalent distance between the strong light source and the image sensor of the eye movement detection camera when the strong light source passes through the imaging point position;
[0021] Obtaining relative position parameters between the eye movement detection camera and the human eye;
[0022] The direct viewing distance is determined according to the equivalent distance and the relative position parameter.
[0023] Optionally, the light source parameters include a strong light angle, and the relative position parameters include a direct viewing distance; and determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters includes:
[0024] Determining the light source size of the strong light source according to the strong light angle and the direct viewing distance;
[0025] Obtaining the eyeglass distance between the human eye and the lens;
[0026] Determine the image size of the strong light source on the lens according to the direct viewing distance, the light source size and the glasses distance;
[0027] The size of the target glare area is determined as the imaging size.
[0028] Optionally, the light source parameters include a strong light imaging length, which is an imaging length of the strong light source irradiated on the image sensor of the light source detection camera, and the relative position parameters include a direct viewing distance; and determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters includes:
[0029] Obtaining a first preset focal length of the light source detection camera;
[0030] Determining the light source size of the strong light source according to the first preset focal length, the strong light imaging length, and the direct viewing distance;
[0031] Obtaining the eyeglass distance between the human eye and the lens;
[0032] Determine the image size of the strong light source on the lens according to the direct viewing distance, the light source size and the glasses distance;
[0033] The size of the target glare area is determined as the imaging size.
[0034] Optionally, the relative position parameter includes a direct viewing distance; and determining a target glare area of the strong light source on the lens according to the light source parameter and the relative position parameter includes:
[0035] Obtaining the eyeglass distance between the human eye and the lens, and the eye distance between two human eyes;
[0036] Determining a center offset distance according to the distance between the glasses and the human eyes and the direct vision distance;
[0037] determining an imaging center position corresponding to the center offset distance on the lens;
[0038] The center position of the target glare area is determined as the imaging center position.
[0039] To achieve the above objectives, the present invention further provides smart glasses, comprising a glasses body, a light source detection camera, an eye movement detection camera, and a processing module; the glasses body is provided with lenses; the light source detection camera and the eye movement detection camera are respectively connected to the processing module, and the control end of the lenses is connected to the processing module; wherein the processing module is configured to:
[0040] Acquire a strong light source image captured by a light source detection camera, and determine light source parameters of the strong light source through the strong light source image;
[0041] Acquire a human eye image captured by an eye movement detection camera, and determine relative position parameters between the human eye and the strong light source through the human eye image;
[0042] Determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters;
[0043] The lens is controlled to change color in the target glare area to reduce the light transmittance of the target glare area.
[0044] To achieve the above objectives, the present invention also provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and runnable on the processor, and when the computer program is executed by the processor, the steps of the anti-glare method described above are implemented.
[0045] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the anti-glare method described above are implemented.
[0046] The present invention proposes an anti-glare method, smart glasses, electronic device, and computer-readable storage medium. The method includes acquiring a strong light source image captured by a light source detection camera and determining light source parameters of the strong light source based on the strong light source image; acquiring a human eye image captured by an eye movement detection camera and determining relative position parameters between the human eye and the strong light source based on the human eye image; determining a target glare area on the lens for the strong light source based on the light source parameters and the relative position parameters; and controlling the lens to change color in the target glare area to reduce the transmittance of the target glare area. By acquiring the strong light source image and the human eye image, and then obtaining the light source parameters and relative position parameters, the method enables the determination of the relevant information of the strong light source and its position relative to the human eye. The method then changes color only in the target glare area of the lens, thereby suppressing glare by reducing the transmittance of the target glare area. Meanwhile, the method does not change color in areas outside the target glare area. Therefore, while achieving anti-glare, the method does not dim the brightness of other viewing angles, thereby avoiding safety hazards. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 Schematic diagram of the process of the first embodiment of the anti-glare method of the present invention;
[0050] Figure 2 Schematic diagram of the structure of the smart glasses of the present invention;
[0051] Figure 3 Schematic diagram of the target glare area of the anti-glare method of the present invention;
[0052] Figure 4 Schematic diagram of the strong light angle of the anti-glare method of the present invention;
[0053] Figure 5 A schematic diagram of the camera setup for detecting human eyes in the anti-glare method of the present invention;
[0054] Figure 6 Schematic diagram of the strong light equivalent distance of the anti-glare method of the present invention;
[0055] Figure 7 A schematic diagram of the distance between human eyes and the anti-glare method of the present invention;
[0056] Figure 8 Schematic diagram of the imaging center position of the anti-glare method of the present invention;
[0057] Figure 9 It is a schematic diagram of the module structure of the electronic device of the present invention.
[0058] Description of Figure Numbers:
[0059] Label name Label name 100 glasses body 200 Light source detection camera 110 lens 300 Eye detection camera 111 Target glare area L Strong light source DETAILED DESCRIPTION
[0060] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application.
[0061] The present invention provides an anti-glare method, referring to Figure 1 , Figure 1 This is a flow chart of a first embodiment of the anti-glare method of the present invention, the method comprising the steps of:
[0062] Step S10, obtaining a strong light source image captured by a light source detection camera, and determining light source parameters of the strong light source through the strong light source image;
[0063] A strong light source is a light source with extremely high brightness or a large brightness difference from the background within the acquisition angle of the light source detection camera, such as a flash light or the high beam of a vehicle at night.
[0064] The strong light source image is an image whose image content contains a strong light source.
[0065] The light source detection camera is used to capture images of strong light sources. The specific type of the light source detection camera can be set based on actual needs, such as a monocular camera.
[0066] For ease of illustration, see Figure 2 The structure of the smart glasses to which the anti-glare method of the present application is applied is described below; the smart glasses include a glasses body 100, a light source detection camera 200, an eye movement detection camera 300, and a processing module; a lens 110 is provided on the glasses body 100; the light source detection camera 200 and the eye movement detection camera 300 are respectively connected to the processing module, and the control end of the lens 110 is connected to the processing module.
[0067] Among them, when the smart glasses are worn, the side facing away from the user is the front side, and the light source detection camera can be set on the front side, and the lens of the light source detection camera can be set forward; the side facing the user is the rear side, and the eye movement detection camera can be set on the rear side, and the lens of the eye movement detection camera can be set toward the user's eyes.
[0068] When a user wears smart glasses, the light source detection camera captures images in front of the user to obtain a strong light source image, and the eye movement detection camera captures images of the user's eyeballs to obtain a human eye image; the strong light source image and the human eye image are sent to the anti-glare method of the present application in the processing module.
[0069] It is understandable that when the image captured by the light source detection camera does not contain a strong light source, the strong light source image is not captured and subsequent operations are not performed, that is, the lenses of the smart glasses do not change color.
[0070] When the image captured by the light source detection camera contains a strong light source, the captured image is a strong light source image, and subsequent operations are performed based on the strong light source image.
[0071] Specifically, the detection method of the strong light source in the image captured by the light source detection camera can be set based on actual needs. For example, the pixels in the image captured by the light source detection camera are analyzed to determine whether there is a pixel area with a sudden increase in brightness. If so, it is considered to contain a strong light source, and the captured image is used as a strong light source image.
[0072] The light source parameters indicate the relevant status of the strong light source; the specific type of light source parameters can be set based on actual needs, such as the aperture angle, strong light imaging length, etc.
[0073] Step S20, obtaining a human eye image captured by an eye movement detection camera, and determining relative position parameters between the human eye and the strong light source based on the human eye image;
[0074] The human eye image is an image containing a human face.
[0075] The human eye camera is used to capture images of the human eye. The specific type of the human eye camera can be set based on actual needs. For example, two eye-tracking cameras are set for two eyes, and one eye-tracking camera captures the human eye image of each pair of glasses.
[0076] When there is a strong light source in front of the user, the light emitted by the strong light source shines on the human eye and is reflected by the human eye; the reflected light reaches the eye movement detection camera, so that the human eye image captured by the eye movement detection camera contains the reflected strong light source image.
[0077] The relative position parameter indicates the relative position between the human eye and the strong light source; the relative position parameter may specifically include the distance and angle between the person and the strong light source.
[0078] It can be understood that when the relative state between the human eye and the strong light source is different, such as position, angle, etc., the light sent by the strong light source is reflected differently at the human eye, such as the change in the exit angle, thereby reflecting the state of the strong light source image in the human eye image differently, such as the position of the strong light source in the human eye image; therefore, the relative position between the human eye and the strong light source can be known through the human eye image, thereby determining the relative position parameters.
[0079] Step S30, determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters;
[0080] Step S40: Control the lens to change color in the target glare area to reduce the light transmittance in the target glare area.
[0081] See also Figure 3After the light source parameters reflecting the strong light source L and the parameters reflecting the relative position of the human eye and the strong light source L are determined, the impact of the strong light source L on the human eye can be determined, such as at which angle the human eye will look directly at the strong light source L, and the position of the angle at which the human eye looks directly at the strong light source L on the lens is the target glare area 111; that is, when the user looks at the target glare area 111, the user will look directly at the strong light source L, causing glare problems, but when looking at places outside the target glare area 111, the user will not look directly at the strong light source L, and no glare problems will be caused.
[0082] Therefore, it is necessary to change the color of the target glare area 111 to reduce the transmittance of the target glare area 111, so that the light emitted by the strong light source L is greatly reduced when passing through the target glare area 111, so that the user will not be affected by the glare problem when looking at the target glare area; at the same time, the area outside the target glare area 111 itself will not cause glare problems. Therefore, the area outside the target glare area 111 is not discolored, so that the brightness of the light passing through the area outside the target glare area 111 will not be reduced, so that the user can see the area outside the target glare area 111 as usual, thereby ensuring the brightness of the normal field of view.
[0083] Smart glasses use lenses that can change color, such as inorganic EC (Electrochromism) lenses, organic EC lenses, LC (Liquid Crystal) electrochromic lenses, SPD (Suspended Particle Device) electrochromic lenses, etc. Among them, SPD electrochromic lenses can achieve local color change.
[0084] This embodiment acquires the image of the strong light source and the image of the human eye, and then obtains the light source parameters and relative position parameters, so that the relevant conditions of the strong light source and its position relative to the human eye can be known. The target glare area is determined through the specific relative relationship, and only the target glare area in the lens is discolored, so that the glare is suppressed by reducing the transmittance of the target glare area. At the same time, the area outside the target glare area is not discolored. Therefore, while achieving anti-glare, the brightness of other viewing angles will not be dimmed, avoiding safety hazards.
[0085] Further, see Figure 4 In the second embodiment of the anti-glare method of the present invention proposed based on the first embodiment of the present invention, the light source parameters include the glare angle; step S10 includes the steps of:
[0086] Step S11, determining a strong light imaging length according to the strong light source image, wherein the strong light imaging length is the length of the strong light source irradiated on the image sensor of the light source detection camera;
[0087] Step S12, obtaining a first preset focal length of the light source detection camera;
[0088] Step S13: Calculate the strong light angle according to the strong light imaging length and the first preset focal length.
[0089] The strong light imaging length is the physical length on the image sensor; it is understandable that the size of the image sensor of the light source detection camera is fixed, such as 1 inch; the light emitted by the strong light source is irradiated on the image sensor so that the strong light source is imaged on the strong light source image captured by the image sensor; therefore, the area where the strong light source is located can be located on the strong light source image first to determine the pixels corresponding to the area where the strong light source is located, and then determine the pixel length of the area, such as the number of pixels corresponding to the row with the largest number of pixels in the vertical direction in the area; and then based on the size correspondence between the strong light source image and the image sensor, determine the length corresponding to the number of pixels, that is, the strong light imaging length; the specific method for determining the strong light imaging length can also be set based on actual needs.
[0090] The first preset focal length is the distance between the imaging plane and the optical center of the lens in the light source detection camera; it can be specifically obtained through the internal parameters of the light source detection camera.
[0091] The glare angle is the angle between the light of the glare light source and the center of the lens of the light source detection camera.
[0092] It is understood that when the light from the strong light source is projected onto the image sensor through the lens, the two ends of the light from the strong light source on the image sensor and the center of the lens form a triangle, with the first preset focal length as the height of the triangle. It is understood that the two triangles formed by the two ends of the strong light source and the center of the lens are similar triangles. Therefore, the strong light angle is the same as the vertex angle of the triangle formed in the light source detection camera. Therefore, the strong light angle θ can be calculated as:
[0093]
[0094] Wherein, d is the strong light imaging length; f is the first preset focal length.
[0095] The glare angle reflects the size of the glare light source. For example, when the distance between the glare light source and the light source detection camera is the same, the larger the glare light source, the larger the corresponding glare angle. Therefore, by determining the glare angle, the size of the glare light source can be known.
[0096] Further, see Figure 5 and Figure 6In the third embodiment of the anti-glare method of the present invention proposed based on the first embodiment of the present invention, the number of eye movement detection cameras is two, and each eye movement detection camera collects images of two human eyes respectively to obtain human eye images corresponding to the two human eyes; step S20 includes the following steps:
[0097] Step S21, determining the imaging point position corresponding to the strong light source based on the human eye image, wherein the imaging point position is the point where the light emitted by the strong light source reaches the imaging surface of the eye movement detection camera after being reflected by the human eye;
[0098] Step S22, determining the imaging distance between each imaging point position and the edge of the corresponding imaging area in the same direction;
[0099] Step S23, obtaining a second preset focal length of the eye movement detection camera and a camera distance between the two eye movement detection cameras;
[0100] Step S24 , determining the direct viewing distance between the strong light source and the human eye according to the second preset focal length, the camera distance, and the imaging distance.
[0101] It is understood that the distance between the imaging plane and the image sensor of the eye movement detection camera is the second preset focal length; the second preset focal length can be obtained using the internal parameters of the eye movement detection camera. The imaging plane is the plane parallel to the image sensor of the eye movement detection camera and the center of the lens of the eye movement detection camera is located; the imaging area is the area on the imaging plane where the human eye image is mapped.
[0102] The light emitted by the strong light source is reflected by the cornea of the human eye and reaches the imaging surface of the eye movement detection camera to obtain an imaging point, and then continues to propagate to the image sensor of the eye movement detection camera. It can be understood that an imaging point will be obtained on each eye movement detection camera. Therefore, there are two imaging point positions, one is obtained by the light of the strong light source being reflected by the left eye to the first eye movement detection camera, and the other is obtained by the light of the strong light source being reflected by the right eye to the second eye movement detection camera. The imaging distances corresponding to the two imaging point positions are the distances toward the same side edge; for example, the imaging point distance is the distance between the imaging point and the right edge of the imaging area in which it is located.
[0103] The camera distance is the distance between the two eye movement detection cameras, and specifically may be the distance between the centers of the image sensors of the two eye movement cameras.
[0104] The direct viewing distance is the distance between the human eye and the strong light source.
[0105] It is understandable that, since the two eye movement detection cameras are fixed, the camera distance and the second preset focal length are fixed; and the two imaging distances are for edges in the same direction. Therefore, on this basis, the closer the direct viewing distance is, the smaller the difference between the two imaging distances is; therefore, the direct viewing distance can be determined by the imaging distance. Specifically, step S24 includes:
[0106] Step S241, determining a strong light equivalent distance of the strong light source according to the second preset focal length, the camera distance, and the imaging distance, wherein the strong light equivalent distance is the equivalent distance between the strong light source and the image sensor of the eye movement detection camera when the strong light source passes through the imaging point position;
[0107] Step S242, obtaining relative position parameters between the eye movement detection camera and the human eye;
[0108] Step S243: determining the direct viewing distance according to the equivalent distance and the relative position parameters.
[0109] According to the binocular distance measurement principle, we can get:
[0110]
[0111] Wherein, Z is the strong light equivalent distance; b is the camera distance; F is the second preset focal length; X1 is the first imaging distance; and X2 is the second imaging distance.
[0112] It is understood that the eye movement detection camera is positioned facing away from the strong light source. Light from the strong light source is reflected by the human eye and reaches the eye movement detection camera. Therefore, the distance determined by binocular ranging is not the actual distance between the eye movement detection camera and the strong light source, but rather the strong light equivalent distance. The strong light equivalent distance is the distance between the eye movement detection camera and the strong light source if it were facing the strong light source and could capture the same first and second imaging distances. It is understood that the strong light equivalent distance is the equivalent distance between the strong light source and the plane where the two eye movement detection cameras are located.
[0113] That is, in fact, the strong light equivalent distance is greater than the actual distance between the eye movement detection camera and the strong light source, and also greater than the direct viewing distance between the human eye and the strong light source.
[0114] Since the position of the eye movement detection camera on the smart glasses is fixed, the relative position between the eye movement detection camera and the human eye can be determined; the relative position parameters can also be determined by using the eye movement detection camera to detect the relative position between the eye movement detection camera and the human eye in real time.
[0115] The relative position parameters may include the distance from the human eye, the setting angle, etc.
[0116] The relative position parameters can be used to determine the plane distance between the plane where the two eye detection cameras are located and the plane where the two eye pupils are located. The direct viewing distance can be obtained by subtracting the plane distance from the strong light equivalent distance. Among them, the direct viewing distance is the distance between the strong light source and the plane where the two eye pupils are located. The specific method for determining the plane distance can be set according to actual needs.
[0117] Furthermore, in a fourth embodiment of the anti-glare method of the present invention proposed based on the first embodiment of the present invention, the light source parameters include the glare angle, and the relative position parameters include the direct viewing distance; step S30 includes the steps of:
[0118] Step S31, determining the light source size of the strong light source according to the strong light angle and the direct viewing distance;
[0119] After the glare angle and the direct viewing distance are determined, the size of the glare source can be determined by trigonometric functions because the two ends of the glare source and the pupil of the human eye form a triangle.
[0120] In other embodiments, the size of the light source may be determined by similar triangles;
[0121] The light source parameters include the strong light imaging length, and the relative position parameters include the direct viewing distance; step S30 includes the following steps:
[0122] Step S31A, obtaining a first preset focal length of the light source detection camera;
[0123] Step S31B, determining the light source size of the strong light source according to the first preset focal length, the strong light imaging length, and the direct viewing distance;
[0124] See also Figure 4 , the two ends of the light from the strong light source on the image sensor and the center of the lens form a triangle, and the height of the triangle is the first preset focal length; the two ends of the strong light source and the center of the lens form a triangle, and the height of the triangle is the direct viewing distance minus the distance between the human eye and the image sensor of the light source detection camera; since the eye movement detection camera and the light source detection camera are both fixedly arranged on the smart glasses, the relative position relationship between the eye movement detection camera and the light source detection camera is known, and the relative position parameters between the human eyes can be detected by the eye movement detection camera, and then the distance between the human eye and the image sensor of the light source detection camera can be determined based on the known relative position relationship between the human eye and the light source detection camera; thereby, the size of the light source is obtained by the principle that the corresponding sides of similar triangles have the same proportions.
[0125] Step S32, obtaining the distance between the human eye and the lens;
[0126] Step S33, determining the image size of the strong light source on the lens according to the direct viewing distance, the light source size and the distance between the glasses;
[0127] Step S34: determining the size of the target glare area as the imaging size.
[0128] After the light source size, glasses distance, and direct viewing distance are determined, the size of the target glare area, i.e., the image size, can be determined by using similar triangles:
[0129]
[0130] Among them, d is the image size; C is the glasses distance; D is the light source size; Ze is the direct viewing distance.
[0131] See also Figure 7 The pupil and the two ends of the target glare area form a triangle, and the pupil and the two ends of the strong light source form a triangle; these two triangles are similar triangles. Therefore, the size of the target glare area can be calculated by the above formula based on the principle that the corresponding sides have the same proportion.
[0132] Furthermore, the relative position parameter includes a direct viewing distance; step S30 includes:
[0133] Step S35, obtaining the eye distance between the human eye and the lens, and the eye distance between two eyes;
[0134] Step S36, determining the center offset distance according to the distance between the glasses and the human eyes and the direct viewing distance;
[0135] Step S37, determining the imaging center position corresponding to the center offset distance on the lens;
[0136] Step S38: determining the center position of the target glare area as the imaging center position.
[0137] After the glasses distance, the human eye distance, and the direct viewing distance are determined, the position on the lens seen by the human eye when looking directly at a strong light source can be determined, that is, the intersection of the line connecting the face and the strong light source and the lens, that is, the imaging center position.
[0138] Specifically:
[0139]
[0140] Among them, Pr is the center offset distance; Eb is the eye distance.
[0141] See also Figure 8, taking the intersection of the human eye's normal viewing direction and the lens as the center position, the midpoint, pupil, and imaging center position form a triangle, the strong light source, the center position between the two human pupils, and the pupil form a triangle, and these two triangles are similar triangles; when the strong light source is located on the perpendicular line between the line between the two human pupils, the distance between the midpoint between the two human pupils and the pupil in one side of the triangle is half the distance between the human eyes. Therefore, based on the principle that the corresponding sides of similar triangles have the same ratio, the center offset distance can be calculated using the above formula.
[0142] After the center offset distance is determined, the imaging center position can be obtained by offsetting the center position by the offset distance.
[0143] The imaging center position determines the location of the center point of the target glare area; the imaging size indicates the size of the target glare area. Therefore, the target glare area on the lens can be clearly identified through the imaging center and imaging size.
[0144] The specific shape of the target glare area can be set based on actual needs. For example, if it is set to a circle, the image size indicates the diameter of the target glare area.
[0145] It should be noted that, for the sake of convenience in explanation, the above anti-glare method only determines the parameters of the target glare area at a specific angle. For example, the imaging center position requires the specific determination of the coordinates of the lens, such as X and Y. The above method can be used to obtain the center offset distance in one direction based on the center position, such as the horizontal direction. Therefore, in actual applications, the coordinates of the imaging center position in the vertical direction and the horizontal direction can be calculated respectively in the vertical direction and the horizontal direction by the above method, thereby comprehensively determining the position on the lens.
[0146] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0148] The present application also provides smart glasses for implementing the above-mentioned anti-glare method, the smart glasses comprising a glasses body, a light source detection camera, an eye movement detection camera, and a processing module; the glasses body is provided with lenses; the light source detection camera and the eye movement detection camera are respectively connected to the processing module, and the control end of the lenses is connected to the processing module; wherein the processing module is configured to:
[0149] Obtaining a strong light source image captured by a light source detection camera, and determining light source parameters of the strong light source through the strong light source image;
[0150] Obtaining a human eye image captured by an eye movement detection camera, and determining the relative position parameters between the human eye and the strong light source through the human eye image;
[0151] Determine the target glare area of the strong light source on the lens based on the light source parameters and relative position parameters;
[0152] The lens is controlled to change color in the target glare area to reduce the light transmittance in the target glare area.
[0153] Further, the light source parameters include a strong light angle; and determining the light source parameters of the strong light source through the strong light source image includes:
[0154] Determining a strong light imaging length according to the strong light source image, wherein the strong light imaging length is the length of the strong light source irradiated on the image sensor of the light source detection camera;
[0155] Obtain a first preset focal length of a light source detection camera;
[0156] The strong light angle is calculated according to the strong light imaging length and the first preset focal length.
[0157] Furthermore, there are two eye movement detection cameras, each of which captures two eyes to obtain eye images corresponding to the two eyes; the relative position parameters include the direct viewing distance; and the relative position parameters between the human eye and the strong light source determined by the eye image include:
[0158] Determining the imaging point position corresponding to the strong light source based on the human eye image, wherein the imaging point position is the point where light emitted by the strong light source reaches the imaging surface of the eye movement detection camera after being reflected by the human eye;
[0159] Determine the imaging distance between each imaging point position and the edge of the corresponding imaging area in the same direction;
[0160] Obtaining a second preset focal length of an eye movement detection camera and a camera distance between two eye movement detection cameras;
[0161] The direct viewing distance between the strong light source and the human eye is determined according to the second preset focal length, the camera distance, and the imaging distance.
[0162] Furthermore, determining the direct viewing distance between the strong light source and the human eye according to the second preset focal length, the camera distance, and the imaging distance includes:
[0163] Determining a strong light equivalent distance of the strong light source according to the second preset focal length, the camera distance and the imaging distance, wherein the strong light equivalent distance is the equivalent distance between the strong light source and the image sensor of the eye movement detection camera when the strong light source passes through the imaging point position;
[0164] Obtain the relative position parameters between the eye movement detection camera and the human eye;
[0165] The direct viewing distance is determined based on the equivalent distance and relative position parameters.
[0166] Furthermore, the light source parameters include the glare angle, and the relative position parameters include the direct viewing distance. Determining the target glare area of the glare light source on the lens based on the light source parameters and the relative position parameters includes:
[0167] Determine the light source size of the strong light source according to the strong light angle and the direct viewing distance;
[0168] Get the eyeglass distance between the human eye and the lens;
[0169] Determine the image size of the strong light source on the lens based on the direct viewing distance, light source size and glasses distance;
[0170] The size of the target glare area is determined as the imaging size.
[0171] Furthermore, the light source parameters include the strong light imaging length, and the relative position parameters include the direct viewing distance; determining the target glare area of the strong light source on the lens based on the light source parameters and the relative position parameters includes:
[0172] Obtain a first preset focal length of a light source detection camera;
[0173] Determining the light source size of the strong light source according to the first preset focal length, the strong light imaging length, and the direct viewing distance;
[0174] Get the eyeglass distance between the human eye and the lens;
[0175] Determine the image size of the strong light source on the lens based on the direct viewing distance, light source size and glasses distance;
[0176] The size of the target glare area is determined as the imaging size.
[0177] Furthermore, the relative position parameter includes a direct viewing distance; determining a target glare area of the strong light source on the lens according to the light source parameter and the relative position parameter includes:
[0178] Obtain the eye distance between the human eye and the lens, and the eye distance between two eyes;
[0179] Determine the center offset distance based on the distance between the glasses and the human eyes and the direct viewing distance;
[0180] Determining an imaging center position corresponding to a center offset distance on the lens;
[0181] The center position of the target glare area is determined as the imaging center position.
[0182] Reference Figure 9 In terms of hardware structure, the electronic device may include components such as a communication module 10, a memory 20, and a processor 30. In the electronic device, the processor 30 is connected to the memory 20 and the communication module 10 respectively. The memory 20 stores a computer program, which is simultaneously executed by the processor 30. When the computer program is executed, the steps of the above-mentioned method embodiment are implemented.
[0183] The communication module 10 can be connected to an external communication device via a network. The communication module 10 can receive requests from the external communication device and can also send requests, instructions and information to the external communication device. The external communication device can be other electronic devices, servers or IoT devices such as TVs.
[0184] Memory 20 can be used to store software programs and various data. Memory 20 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as acquiring an image of a strong light source captured by a light source detection camera). The data storage area may include a database and may store data or information generated based on system usage. Furthermore, memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0185] The processor 30 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 20 and accessing data stored in the memory 20, it performs various functions of the electronic device and processes data, thereby providing overall monitoring of the electronic device. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 30.
[0186] although Figure 9 Although not shown, the electronic device may further include a circuit control module, which is used to connect to the power supply to ensure the normal operation of other components. Figure 9 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0187] The present invention also provides a computer readable storage medium having a computer program stored thereon. The computer readable storage medium may be Figure 9 The memory 20 in the electronic device may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The computer-readable storage medium includes a number of instructions for enabling a terminal device with a processor (which may be a television, a car, a mobile phone, a computer, a server, a terminal, or a network device, etc.) to execute the methods described in various embodiments of the present invention.
[0188] In the present invention, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0189] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.
[0190] Although the embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It should be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Persons skilled in the art may make changes, modifications, and substitutions to the above embodiments within the scope of the present invention, and such changes, modifications, and substitutions should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. An anti-glare method, characterized in that: The anti-glare method comprises: Acquire a strong light source image captured by a light source detection camera, and determine light source parameters of the strong light source through the strong light source image; Acquire a human eye image captured by an eye movement detection camera, and determine relative position parameters between the human eye and the strong light source through the human eye image; Determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters; The lens is controlled to change color in the target glare area to reduce the light transmittance of the target glare area.
2. The anti-glare method according to claim 1, wherein: The light source parameters include the strong light angle; the light source parameters of the strong light source determined by the strong light source image include: Determine a strong light imaging length according to the strong light source image, wherein the strong light imaging length is an imaging length of the image sensor of the light source detection camera irradiated by the strong light source; Obtaining a first preset focal length of the light source detection camera; The strong light angle is calculated based on the strong light imaging length and the first preset focal length.
3. The anti-glare method according to claim 1, wherein: There are two eye movement detection cameras, each of which captures two human eyes to obtain the human eye images corresponding to the two human eyes; the relative position parameter includes the direct viewing distance; and the relative position parameter between the human eye and the strong light source determined by the human eye image includes: Determining an imaging point position corresponding to the strong light source based on the human eye image, wherein the imaging point position is a point where light emitted by the strong light source reaches an imaging surface of the eye movement detection camera after being reflected by the human eye; Determining the imaging distance between each imaging point position and the edge of the corresponding imaging area in the same direction; Obtaining a second preset focal length of the eye movement detection camera and a camera distance between two eye movement detection cameras; The direct viewing distance between the strong light source and the human eye is determined according to the second preset focal length, the camera distance, and the imaging distance.
4. The anti-glare method according to claim 3, wherein: Determining the direct viewing distance between the strong light source and the human eye according to the second preset focal length, the camera distance, and the imaging distance includes: Determining a strong light equivalent distance of the strong light source according to the second preset focal length, the camera distance, and the imaging distance, wherein the strong light equivalent distance is an equivalent distance between the strong light source and the image sensor of the eye movement detection camera when the strong light source passes through the imaging point position; Obtaining relative position parameters between the eye movement detection camera and the human eye; The direct viewing distance is determined according to the equivalent distance and the relative position parameter.
5. The anti-glare method according to claim 1, wherein: The light source parameters include a strong light angle, and the relative position parameters include a direct viewing distance; and determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters includes: Determining the light source size of the strong light source according to the strong light angle and the direct viewing distance; Obtaining the eyeglass distance between the human eye and the lens; Determine the image size of the strong light source on the lens according to the direct viewing distance, the light source size and the glasses distance; The size of the target glare area is determined as the imaging size.
6. The anti-glare method according to claim 1, wherein: The light source parameters include a strong light imaging length, which is the imaging length of the strong light source irradiated on the image sensor of the light source detection camera, and the relative position parameters include a direct viewing distance; determining the target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters includes: Obtaining a first preset focal length of the light source detection camera; Determining the light source size of the strong light source according to the first preset focal length, the strong light imaging length, and the direct viewing distance; Obtaining the eyeglass distance between the human eye and the lens; Determine the image size of the strong light source on the lens according to the direct viewing distance, the light source size and the glasses distance; The size of the target glare area is determined as the imaging size.
7. The anti-glare method according to claim 1, wherein: The relative position parameter includes a direct viewing distance; and determining a target glare area of the strong light source on the lens according to the light source parameter and the relative position parameter includes: Obtaining the eyeglass distance between the human eye and the lens, and the eye distance between two human eyes; Determining a center offset distance according to the distance between the glasses and the human eyes and the direct vision distance; determining an imaging center position corresponding to the center offset distance on the lens; The center position of the target glare area is determined as the imaging center position.
8. A pair of smart glasses, characterized in that: The smart glasses include a glasses body, a light source detection camera, an eye movement detection camera, and a processing module; the glasses body is provided with lenses; the light source detection camera and the eye movement detection camera are respectively connected to the processing module, and the control end of the lenses is connected to the processing module; wherein the processing module is used to: Acquire a strong light source image captured by a light source detection camera, and determine light source parameters of the strong light source through the strong light source image; Acquire a human eye image captured by an eye movement detection camera, and determine relative position parameters between the human eye and the strong light source through the human eye image; Determining a target glare area of the strong light source on the lens according to the light source parameters and the relative position parameters; The lens is controlled to change color in the target glare area to reduce the light transmittance of the target glare area.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the anti-glare method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the anti-glare method according to any one of claims 1 to 7 are implemented.