CN112235483A - Automatic photographing light adjusting method and system and self-service photographing equipment thereof - Google Patents

Automatic photographing light adjusting method and system and self-service photographing equipment thereof Download PDF

Info

Publication number
CN112235483A
CN112235483A CN202010856272.7A CN202010856272A CN112235483A CN 112235483 A CN112235483 A CN 112235483A CN 202010856272 A CN202010856272 A CN 202010856272A CN 112235483 A CN112235483 A CN 112235483A
Authority
CN
China
Prior art keywords
brightness
image
lamp
face image
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010856272.7A
Other languages
Chinese (zh)
Other versions
CN112235483B (en
Inventor
吴方伟
周可
张太平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Emperor Technology Co Ltd
Original Assignee
Shenzhen Emperor Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Emperor Technology Co Ltd filed Critical Shenzhen Emperor Technology Co Ltd
Priority to CN202010856272.7A priority Critical patent/CN112235483B/en
Publication of CN112235483A publication Critical patent/CN112235483A/en
Application granted granted Critical
Publication of CN112235483B publication Critical patent/CN112235483B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
  • Studio Devices (AREA)

Abstract

The invention relates to the technical field of light adjustment, in particular to a method and a system for automatically adjusting photographing light and self-service photographing equipment thereof, wherein the method comprises the following steps: the lighting system illuminates, collects the user image in real time, extracts the face image of the user from the user image, detects the face image, judges whether the brightness of the face image is uniform, and if not, correspondingly adjusts the brightness of the top, upper, left and right lamps in the lighting system; if the brightness of the background image is uniform, extracting the background image from the user image, respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions, and if the brightness of the background image and the shadow area of the face image do not meet the preset conditions, correspondingly adjusting the brightness of an upper background lamp, a lower background lamp and a background lamp in a lighting system; if the user images meet the preset conditions, the current user image is used as a certificate photo and is output; the invention can automatically adjust the brightness of the lamplight, so that the illumination effect of the face of a user can meet the official shooting requirement.

Description

Automatic photographing light adjusting method and system and self-service photographing equipment thereof
Technical Field
The invention relates to the technical field of light adjustment, in particular to a photographing light automatic adjustment method, a photographing light automatic adjustment system and self-service photographing equipment with the photographing light automatic adjustment system.
Background
In everyday life, people have a variety of personal identification documents, such as: the usage rates of identity cards, driving licenses, passports, social security cards and the like are also increasing; in order to verify the identity, personal identification documents are provided with personal certificates; due to the relatively high requirements of the official authorities on the certificate photo, most certificate photos are shot by special photographers at present; however, the shooting price is expensive and the time is long by adopting the manual shooting mode of the photographer; therefore, in order to facilitate people to shoot certificates, various self-service shooting devices are available on the market nowadays.
According to the existing industry standard, can be equipped with in the lighting system of current self-service shooting equipment: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; in the existing self-service shooting equipment, various lights in a lighting system can only work at preset brightness, and the brightness of each light cannot be automatically adjusted; the user is influenced by different body conditions such as stature or facial form and the like in the self-service shooting equipment, and the illumination effect of the user on the face is different; therefore, under the illumination condition, the partial area of the face of the user is easy to have the phenomenon of high light or uneven illumination, so that a large number of pictures shot by the self-service shooting equipment cannot meet the official requirement; the popularization and the application of the self-service shooting equipment in the market are greatly influenced.
Disclosure of Invention
In order to overcome the defects, the invention aims to provide a method and a system for automatically adjusting photographing light according to the illumination effect of the face of a user and self-service photographing equipment.
The purpose of the invention is realized by the following technical scheme:
the invention relates to a method for automatically adjusting photographing light, which comprises the following steps:
driving a lighting system to illuminate, and acquiring a user image in real time through a lens, wherein the user image comprises a face image and a background image of a user;
extracting a face image of a user from the user image, detecting the face image, judging whether the brightness of the face image is uniform or not, and if not, correspondingly adjusting the brightness of a top lamp, an upper lamp, a left lamp and a right lamp in the lighting system;
if the brightness of the background image is uniform, extracting the background image from the user image, respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions, and if the brightness of the upper lamp, the lower lamp and the background lamp in the lighting system does not meet the preset conditions, correspondingly adjusting the brightness of the upper lamp, the lower lamp and the background lamp;
and if the user image meets the preset conditions, taking the current user image as the certificate photo, and outputting the certificate photo.
In the present invention, detecting the face image further includes:
judging whether the user wears glasses, such as glasses, according to the face image of the user; judging whether the glasses meet the photographing requirement, if so, judging whether the glasses reflect light, and if not, judging whether the brightness of the face image is uniform; if the light is reflected, the brightness of the left lamp and the right lamp is correspondingly adjusted.
In the present invention, the determining whether the brightness of the face image is uniform, and if not, correspondingly adjusting the top light, the left light, and the right light in the lighting system includes:
judging whether the face image has a highlight area, and if the face image has the highlight area, reducing the brightness of a top light and an upper light;
and respectively obtaining the brightness values of the left area and the right area in the face image, comparing the brightness values of the left area and the right area to obtain the brightness difference value, judging whether the brightness difference value is within a preset range, and if not, correspondingly adjusting the brightness of the left lamp and the right lamp.
In the present invention, the determining whether both the brightness of the background image and the shadow region of the face image satisfy a predetermined condition includes:
converting the pixel value in the background image from an RGB space to an HSV space, calculating the brightness average value of the pixel value, taking the brightness average value as the brightness value of the background image, and judging whether the brightness value is in a preset brightness range;
calculating a variance value of the brightness value distribution of the pixels in the background image, and judging whether the variance value is within a preset brightness range;
if the brightness value is within the preset brightness range and the variance value is within the preset brightness range; it is defined that the brightness of the background image satisfies a predetermined condition.
In the present invention, the determining whether both the brightness of the background image and the shadow region of the face image satisfy a predetermined condition includes:
dividing a first key area and a second key area from a preset area of the face image according to the position information in the face image, and calculating the average color of the first key area as a skin color reference value;
and calculating the average color of the second key area and the color difference between the average color and the skin color reference value, and defining that the shadow area of the face image meets the preset condition when the color difference is within a preset difference range.
In the present invention, the defining of the shadow area of the face image after satisfying a predetermined condition includes:
separating the area of the glasses from the face image to obtain a position template of the glasses;
calculating the color difference between each pixel in the face image and the skin color reference value to obtain a color difference image; and performing threshold segmentation on the color difference image, performing patch analysis on a segmentation result to obtain a patch where a shadow generated by a position template of the glasses is located, judging whether a parameter of the patch is within a preset parameter range, and if the parameter of the patch is within the preset parameter range, defining that a shadow area of the face image meets a preset condition.
In the present invention, before the driving the lighting system to illuminate, the driving method includes:
whether the user enters the shooting area is detected and judged through the human body induction controller, and if the user enters the shooting area, the lighting system is driven to illuminate.
In the present invention, after the outputting the identification photo, the method includes:
whether the user leaves the shooting area is detected and judged through the human body induction controller, and if the user leaves the shooting area, the illumination brightness of the lighting system is reduced or the lighting system is turned off.
Based on the same conception, the invention also provides an automatic regulating system of the photographing light, which comprises:
the lighting system driving module is used for driving a lighting system to illuminate;
the user image acquisition module is used for driving the lens to acquire a user image in real time, and the user image comprises a face image and a background image of a user;
the face image detection module is respectively connected with the user image acquisition module and the lighting system driving module and is used for extracting a face image of a user from the user image, detecting the face image, judging whether the brightness of the face image is uniform or not, and if the brightness of the face image is not uniform, driving the lighting system driving module to correspondingly adjust the brightness of a top lamp, an upper lamp, a left lamp and a right lamp in the lighting system;
the background image detection module is respectively connected with the face image detection module, the user image acquisition module and the lighting system driving module, and is used for extracting the background image from the user image when the brightness of the face image is uniform, respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions, and if not, driving the lighting system driving module to correspondingly adjust the brightness of an upper lamp, a lower lamp and a background lamp in the lighting system;
and the certificate photo generation module is respectively connected with the background image detection module and the lighting system driving module and is used for taking the current user image acquired by the user image acquisition module as the certificate photo and outputting the certificate photo when the shadow area of the face image meets a preset condition.
Based on the same conception, the invention also provides self-service shooting equipment, which comprises: lighting system, camera and as above shoot light automatically regulated system, lighting system includes: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; the lighting system is connected with a lighting system driving module in the automatic photographing lighting adjusting system, and a lens in the camera is connected with a user image acquisition module in the automatic photographing lighting adjusting system.
The automatic photographing light adjusting method respectively judges the illumination state of the face of the user and the shadow part in the face of the user, and adaptively adjusts the associated light brightness according to the judged result, so that the illumination effect of the face of the user can meet the official photographing requirement, the photo taken by the self-service photographing equipment applying the method can meet the official requirement, and the automatic photographing light adjusting method is favorable for popularization and application of the self-service photographing equipment in the market.
Drawings
For the purpose of easy explanation, the present invention will be described in detail with reference to the following preferred embodiments and the accompanying drawings.
Fig. 1 is a schematic view of the working principle of an embodiment of the automatic adjusting method of the photographing light of the present invention.
FIG. 2 is a schematic view of the operation principle of another embodiment of the automatic adjusting method of the photographing light of the present invention;
FIG. 3 is a schematic diagram illustrating the operation of another embodiment of the method for automatically adjusting the lighting of a photo taking device according to the present invention;
fig. 4 is a schematic diagram of a logic structure of the automatic adjusting system for photographing light according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used only for convenience of description and simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the description of the present invention, it should be noted that the terms "mounted," "connected," and "connected" are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally connected unless otherwise explicitly stated or limited. Either mechanically or electrically. Either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
An embodiment of the method for automatically adjusting a photographing light according to the present invention is described below with reference to fig. 1, which specifically includes:
s101, driving a lighting system to illuminate and collecting user images
Driving a lighting system to illuminate at a predetermined power, wherein the lighting system comprises: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; and acquiring a user image in real time through the lens, wherein the user image comprises a face image and a background image of the user. In the subsequent process, the lens continuously acquires the real-time user image.
S102, judging whether the brightness of the face image is uniform or not
And performing image matting processing on the user image to separate the foreground from the background, wherein the obtained image of the foreground area is the face image. Extracting a face image of a user from the user image, detecting the face image, and judging whether the brightness of the face image is uniform or not. Wherein, whether the brightness of the face image is uniform specifically includes: whether there is a highlight area in the face image and/or whether the difference in luminance values between the left and right areas of the face image is large. And when the detection result shows that the difference value between the brightness values of the highlight area and the left and right areas of the face image is within a preset range, judging that the brightness of the face image is uniform.
S103, correspondingly adjusting the top light, the upper light, the left light and the right light
If the brightness of the face image is not uniform, correspondingly adjusting the brightness of a top lamp, a left lamp and a right lamp in the lighting system according to a preset step length; and step s102 is performed again, it is determined whether the brightness of the face image is uniform until the brightness of the face image is uniform. Because the main area forming highlight in the face is the triangular area of the forehead and the left and right cheeks, the light of the top lamp and the upper lamp irradiates the face and is closest to the forehead, the forehead is the area which is most easy to form highlight, and the area of the highlight area is relatively large, the highlight on the forehead can be effectively reduced or eliminated by adjusting the brightness of the top lamp and the upper lamp, and the highlight on the left and right cheeks can be reduced; when the difference between the brightness values of the left and right regions of the face image is large, the left and right lights need to be adjusted accordingly to reduce the difference between the brightness values of the left and right regions.
S104, judging whether the brightness of the background image and the shadow area of the face image both meet the condition
If the brightness of the face image is uniform, extracting the background image from the user image, and respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions; in this embodiment, the image of the user is subjected to image matting processing to separate the foreground from the background, and the obtained image of the background area is the background image.
Wherein judging whether the brightness of the background image meets a predetermined condition comprises: and judging whether the background light source is too bright and whether the background brightness is uniform, and if the brightness of the background light source is within a preset range and the background brightness is uniform, defining that the brightness of the background image meets a preset condition.
Judging whether the shadow areas of the face image all meet the preset conditions comprises the following steps: judging whether butterfly light exists in the face image or whether shadows exist under the mirror frame; the light distribution method of the butterfly light is that a main light source is arranged above an optical axis of a lens, namely is arranged right in front of the face of a person, the main light source is projected to the face of the person from the upper direction to the lower direction by 45 degrees, and a shadow below the nose is projected to be similar to the butterfly shape. When the face image does not have butterfly light or shadows are formed under the frame, the shadow area of the face image is defined to meet a preset condition.
S105, correspondingly adjusting the upper lamp, the lower lamp and the background lamp
If the preset conditions are not met, correspondingly adjusting the brightness of an upper lamp, a lower lamp and a background lamp in the lighting system; and step S104 is carried out again, whether the brightness of the background image and the shadow area of the face image both meet the preset conditions is judged until the brightness of the background image and the shadow area of the face image both meet the preset conditions. The background brightness and the background uniformity are only related to the background lamp, so if the brightness of the background image does not meet the preset condition, the background lamp is only required to be adjusted to keep the background uniform by keeping the slight brightness. The generation of the shadow and the butterfly light under the mirror bracket is related to the positions and the brightness of the upper lamp and the lower lamp, and because the height of the person taking a picture is different, when the shadow and/or the butterfly light under the mirror bracket is generated, the brightness of the upper lamp and the lower lamp needs to be adjusted to reduce or eliminate the shadow and the butterfly light under the mirror bracket.
S106, outputting the identification photo
If the user images meet the preset conditions, the current user image meets the requirements of the certificate photo, and therefore the user image acquired by the lens at present is used as the certificate photo and is output. Wherein, the mode of exporting to this certificate photo includes: printing the certificate photo and/or uploading the certificate photo to a certificate handling service platform.
In this embodiment, the system automatically adjusts the brightness of the corresponding lamp in the lighting system according to the brightness of the face image, the brightness of the background image, and the shadow area of the face image, so that after the lighting meets the shooting requirement, the user image is shot to generate the certificate photo, and the generated certificate photo meets the requirement of the official department.
In the following, a method for automatically adjusting a photographing light according to another embodiment of the present invention is described in detail with reference to fig. 2, which includes:
s201, when a user enters a shooting area, a lighting system illuminates
Whether the user enters the shooting area is detected and judged through the human body induction controller, and when the human body induction controller detects that the user enters the shooting area, the lighting system is driven to illuminate.
S202, driving a lighting system to illuminate and collecting user images
Driving a lighting system to illuminate at a predetermined power, wherein the lighting system comprises: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; and acquiring a user image in real time through the lens, wherein the user image comprises a face image and a background image of the user. In the subsequent process, the lens continuously acquires the real-time user image.
S203, judging whether the user wears the glasses or not
Judging whether the user wears glasses, such as glasses, according to the face image of the user; step S204, judging whether the glasses meet the photographing requirement; if the glasses are not worn, step S207 is performed to determine whether there is a highlight area in the face image.
S204, judging whether the glasses meet the photographing requirement
Judging whether the glasses meet the photographing requirement, which specifically comprises the following steps: judging whether the glasses are thick frame glasses or colored glasses or not, and whether the glasses cover the eyes or not; if the coarse frame glasses, the colored glasses and the glasses cover the eyes, judging that the glasses do not accord with the photographing requirement, otherwise, judging that the glasses accord with the photographing requirement; if the photographing requirement is not met, prompting the user to take off the glasses; if the requirement of photographing is met, step S205 is performed to determine whether the glasses reflect light.
S205, judging whether the glasses have the light reflection phenomenon
Whether the glasses reflect light or not is judged by detecting the brightness of the glasses area of the face image.
S206, correspondingly adjusting the brightness of the left lamp and the right lamp
If the reflection exists, the detection threshold value of the reflection of the glasses can be obtained, if the detection threshold value is larger than the preset threshold value, the brightness of the left lamp and the right lamp is reduced until the detection threshold value of the reflection of the glasses is smaller than the set threshold value, the left lamp and the right lamp can be still on at the moment, and the left lamp and the right lamp can be turned off. Because the light sources which can form reflection in the 6 light sources in the lighting system only comprise an upper lamp, a lower lamp, a left lamp and a right lamp; the upper lamp and the lower lamp are far away from the camera, and the horizontal included angle between the upper lamp and the lower lamp and the glasses is more than about 35 degrees, so that the light reflection phenomenon basically cannot occur; the left lamp and the right lamp are placed on the left side and the right side of the camera, and are basically in the same horizontal plane with glasses worn by a person, and obvious reflection light can be formed on the lenses. Therefore, the brightness of the left lamp and the right lamp is adjusted, and the phenomenon of light reflection of the glasses can be effectively eliminated.
S207, judging whether the face image has a highlight area or not
If no reflection exists, the image of the user is subjected to image matting processing to separate the foreground from the background, and the obtained image of the foreground area is the face image. And extracting a face image of the user from the user image, detecting the face image, and judging whether the face image has a highlight area. If the high light area exists, the step S208 is carried out, and the brightness of the top lamp and the upper lamp is adjusted; if there is no highlight area, go to step S209. determine if the brightness value difference between the left and right areas of the face image is large.
S208, adjusting the brightness of the top light and the upper light
The brightness of the top and top lamps is adjusted in predetermined steps until the highlight area is eliminated. Because the main area that forms the highlight in the people's face is the triangle region of forehead and left and right cheek, the light of dome lamp and upper lamp shines on people's face, and is nearest apart from the forehead, and the forehead is the region of the highlight of forming most easily, and the regional area of highlight is relatively great, and the highlight on the adjustment dome lamp and upper lamp luminance can effectual reduction or elimination forehead, and can reduce the highlight of left and right cheek.
S209, judging whether the brightness value difference of the left and right areas of the face image is large or not
Judging whether the brightness value difference of the left area and the right area of the face image is large, which specifically comprises the following steps: respectively obtaining the brightness values of the left area and the right area in the face image, comparing the brightness values of the left area and the right area to obtain the brightness difference value, and judging whether the brightness difference value is within a preset range; if the light intensity is not within the preset range, the step S210 is carried out, and the left lamp and the right lamp are correspondingly adjusted; if the brightness of the background image is within the preset range, the step S211 is carried out, and whether the brightness of the background image meets the preset condition is judged; in this embodiment, the step of determining whether the difference between the luminance values of the left and right regions of the face image is large may specifically be: firstly, key point positioning is carried out on a human face, and the key point positioning result comprises position information of key points of the cheek, eyebrow, eyes, nose bridge, nose head, mouth and the like of the human face. Then, the face is divided into left and right half faces through the nose bridge, then the regions of the left and right faces are obtained through key points of the cheeks of the left and right faces, key points of the left and right eyebrows, the nose bridge and key point information of the mouth respectively, finally the pixel values in the regions are converted into HSV space from RGB space, the average brightness value of the regions is calculated and used as the brightness value of the left and right regions of the face, then the brightness values of the left and right regions are compared, and whether the brightness difference value of the left and right regions is within a preset range or not is judged.
S210, correspondingly adjusting the left lamp and the right lamp
When the difference value of the brightness values of the left area and the right area of the face image is large, the left lamp and the right lamp need to be correspondingly adjusted to reduce the difference value of the brightness values of the left area and the right area, and when a user wears glasses, the user can be prompted to close a curtain; the brightness of the left and right areas of the human face in the user image is basically kept consistent. In this embodiment, if the luminance of the left region is higher than the luminance of the right region, the luminance of the left region may be reduced accordingly; if the luminance of the right region is higher than the luminance of the left region, the luminance of the right region may be reduced accordingly.
S211, judging whether the brightness of the background image meets the preset conditions
Judging whether the brightness of the background image meets a preset condition comprises the following steps: and judging whether the background light source is too bright and whether the background brightness is uniform, and if the brightness of the background light source is within a preset range and the background brightness is uniform, defining that the brightness of the background image meets a preset condition.
Judging whether the background light source is too bright specifically comprises the following steps: converting the pixel Value in the background image from an RGB space to an HSV (Hue, Saturation, Value) space, calculating a brightness average Value of the pixel Value, taking the brightness average Value as a brightness Value of the background image, and judging whether the brightness Value is within a preset brightness range; calculating a variance value of the brightness value distribution of the pixels in the background image, and judging whether the variance value is within a preset brightness range; if the brightness value is within the preset brightness range and the variance value is within the preset brightness range; the luminance value defined as the background image is appropriate.
The specific steps of judging whether the background brightness is uneven are as follows: converting the pixel value in the background image from RGB space to HSV space, calculating the variance of the brightness value distribution of the pixel in the region, and measuring the uniformity of the brightness value distribution in the background region by using the variance, wherein the more uniform the distribution is, the smaller the variance is; if the variance of the luminance value distribution is within a predetermined range, it is defined that the background luminance is uniform.
When the brightness of the background image does not meet the preset condition, the step S212 is carried out, and the brightness of the background lamp is adjusted; when the brightness of the background image satisfies the predetermined condition, step s213 is performed.
S212, adjusting the brightness of the background light
The background brightness and the background uniformity are only related to the background lamp, so if the brightness of the background image does not meet the preset condition, the background lamp is only required to be adjusted to keep the background uniform by keeping the slight brightness.
S213, judging whether the shadow areas of the face image all meet the preset conditions
Judging whether the shadow areas of the face image all meet the preset conditions comprises the following steps: judging whether butterfly light exists in the face image or whether shadows exist under the mirror frame; the light distribution method of the butterfly light is that a main light source is arranged above an optical axis of a lens, namely is arranged right in front of the face of a person, the main light source is projected to the face of the person from the upper direction to the lower direction by 45 degrees, and a shadow below the nose is projected to be similar to the butterfly shape. When the face image does not have butterfly light or shadows are formed under the frame, the shadow area of the face image is defined to meet a preset condition.
The step of judging whether the face image contains butterfly light is as follows: dividing a first key area and a second key area from a preset area of the face image according to the position information in the face image, and calculating the average color of the first key area as a skin color reference value; and calculating the average color of the second key area and the color difference between the average color and the skin color reference value, and defining that the shadow area of the face image meets the preset condition when the color difference is within a preset difference range. Wherein, the first key area is a partial area under the eyes, and the second key area is a partial area under the left nostril and the right nostril; in this embodiment, it specifically is: firstly, key point positioning is carried out on a human face, and the key point positioning result comprises position information of key points of the cheek, eyebrow, eyes, nose bridge, nose head, mouth and the like of the human face. Then, a part of the area under the eyes is taken, and the average color of the part of the area under the eyes is calculated to be used as a skin color reference value. And then according to the position information of the nose, taking partial areas below the left nostril and the right nostril, respectively calculating the average color of the partial areas, calculating the color difference with the reference value of the skin color, and when the color difference is overlarge, considering that the part below the nose is greatly different from the skin color, namely considering that butterfly light is generated.
The step of judging whether the shadow exists under the frame of the face image comprises the following steps: separating the area of the glasses from the face image to obtain a position template of the glasses; calculating the color difference between each pixel in the face image and the skin color reference value to obtain a color difference image; and performing threshold segmentation on the chromatic aberration diagram, performing patch analysis on a segmentation result to obtain a patch where a shadow generated by a position template of the glasses is located, judging whether a parameter of the patch is within a preset parameter range, and if the parameter of the patch is within the preset parameter range, defining that no shadow exists under the glasses frame. In this embodiment, the glasses detection and segmentation are specifically performed on the face image to obtain a position template of the glasses. After the key points of the human face are positioned, a human face mask is obtained so as to determine a human face area in the image. And calculating the color difference between each pixel in the face area and the skin color to obtain a color difference image. And performing threshold segmentation on the chromatic aberration diagram, performing patch analysis on the result, screening patches on the chromatic aberration diagram from the aspects of the size, the continuity, the relative position relation with a position template of the glasses and the like to obtain patches in which shadows generated by a glasses frame are located, and thus completing the detection of the shadows under the glasses frame. In the embodiment, the face mask is obtained, and color difference calculation is performed in the face mask region, so that it is prevented that a significant region in a color difference map is not a real shadow region due to an external region such as a place where hair, a background, clothes, an eyeball, a lip and the like are obviously different from skin color. When no butterfly light is generated in the face image, no shadow is generated under the spectacle frame; it is determined that the shadow area of the face image satisfies the predetermined condition.
S214, correspondingly adjusting the upper lamp and the lower lamp
If the shadow area of the face image does not meet the preset condition, correspondingly adjusting the brightness of an upper lamp and a lower lamp in the lighting system; and step s213 is performed again, it is determined whether the shadow areas of the face image all satisfy the predetermined condition until the shadow areas of the face image all satisfy the predetermined condition. Because the shadow and the butterfly light under the mirror bracket are generated and are related to the positions and the brightness of the upper lamp and the lower lamp, and because the person taking a picture is different in height, when the shadow and/or the butterfly light under the mirror bracket are generated, the brightness of the upper lamp and the lower lamp needs to be adjusted to reduce or eliminate the shadow and the butterfly light under the mirror bracket.
S215, outputting the certificate photo
If the shadow area of the face image meets the preset condition, the current user image meets the requirement of the certificate photo, so the user image currently acquired by the lens is used as the certificate photo, and the certificate photo is output. Wherein, the mode of exporting to this certificate photo includes: printing the certificate photo and/or uploading the certificate photo to a certificate handling service platform.
S216. when the user leaves the shooting area, the lighting system is dimmed or turned off
Whether the user leaves the shooting area is detected and judged through the human body induction controller, and if the user leaves the shooting area, the illumination brightness of the lighting system is reduced or the lighting system is turned off. Which effectively reduces energy consumption.
In the following, a method for automatically adjusting a photographing light according to another embodiment of the present invention is described in detail with reference to fig. 3, which includes:
s301, when a user enters a shooting area, a lighting system illuminates
Whether the user enters the shooting area is detected and judged through the human body induction controller, and when the human body induction controller detects that the user enters the shooting area, the lighting system is driven to illuminate.
S302, driving a lighting system to illuminate and collecting user images
Driving a lighting system to illuminate at a predetermined power, wherein the lighting system comprises: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; and acquiring a user image in real time through the lens, wherein the user image comprises a face image and a background image of the user. In the subsequent process, the lens continuously acquires the real-time user image.
S303, judging whether the user wears the glasses or not
Judging whether the user wears glasses, such as glasses, according to the face image of the user; step S304, judging whether the glasses meet the photographing requirement; if the glasses are not worn, step s307 is performed to determine whether or not there is a highlight area in the face image.
S304, judging whether the glasses meet the photographing requirement
Judging whether the glasses meet the photographing requirement, which specifically comprises the following steps: judging whether the glasses are thick frame glasses or colored glasses or not, and whether the glasses cover the eyes or not; if the coarse frame glasses, the colored glasses and the glasses cover the eyes, judging that the glasses do not accord with the photographing requirement, otherwise, judging that the glasses accord with the photographing requirement; if the photographing requirement is not met, prompting the user to take off the glasses; if the requirement of photographing is met, step S205 is performed to determine whether the glasses reflect light.
S305, judging whether the glasses have a light reflection phenomenon or not
Whether the glasses reflect light or not is judged by detecting the brightness of the glasses area of the face image.
S306, correspondingly adjusting the brightness of the left lamp and the right lamp
If the reflection exists, the detection threshold value of the reflection of the glasses can be obtained, if the detection threshold value is larger than the preset threshold value, the brightness of the left lamp and the right lamp is reduced until the detection threshold value of the reflection of the glasses is smaller than the set threshold value, the left lamp and the right lamp can be still on at the moment, and the left lamp and the right lamp can be turned off. Because the light sources which can form reflection in the 6 light sources in the lighting system only comprise an upper lamp, a lower lamp, a left lamp and a right lamp; the upper lamp and the lower lamp are far away from the camera, and the horizontal included angle between the upper lamp and the lower lamp and the glasses is more than about 35 degrees, so that the light reflection phenomenon basically cannot occur; the left lamp and the right lamp are placed on the left side and the right side of the camera, and are basically in the same horizontal plane with glasses worn by a person, and obvious reflection light can be formed on the lenses. Therefore, the brightness of the left lamp and the right lamp is adjusted, and the phenomenon of light reflection of the glasses can be effectively eliminated.
S307, judging whether the difference of the brightness values of the left area and the right area of the face image is large or not
Judging whether the brightness value difference of the left area and the right area of the face image is large, which specifically comprises the following steps: respectively obtaining the brightness values of the left area and the right area in the face image, comparing the brightness values of the left area and the right area to obtain the brightness difference value, and judging whether the brightness difference value is within a preset range; if not, performing step S308, correspondingly adjusting the left lamp and the right lamp; if the light intensity is within the preset range, the step S309 is carried out, and whether the highlight area exists in the face image is judged; in this embodiment, the step of determining whether the difference between the luminance values of the left and right regions of the face image is large may specifically be: firstly, key point positioning is carried out on a human face, and the key point positioning result comprises position information of key points of the cheek, eyebrow, eyes, nose bridge, nose head, mouth and the like of the human face. Then, the face is divided into left and right half faces through the nose bridge, then the regions of the left and right faces are obtained through key points of the cheeks of the left and right faces, key points of the left and right eyebrows, the nose bridge and key point information of the mouth respectively, finally the pixel values in the regions are converted into HSV space from RGB space, the average brightness value of the regions is calculated and used as the brightness value of the left and right regions of the face, then the brightness values of the left and right regions are compared, and whether the brightness difference value of the left and right regions is within a preset range or not is judged.
S308, correspondingly adjusting the left lamp and the right lamp
When the difference value of the brightness values of the left area and the right area of the face image is large, the left lamp and the right lamp need to be correspondingly adjusted to reduce the difference value of the brightness values of the left area and the right area, and when a user wears glasses, the user can be prompted to close a curtain; the brightness of the left and right areas of the human face in the user image is basically kept consistent. In this embodiment, if the luminance of the left region is higher than the luminance of the right region, the luminance of the left region may be reduced accordingly; if the luminance of the right region is higher than the luminance of the left region, the luminance of the right region may be reduced accordingly.
S309, judging whether the face image has a highlight area
If no reflection exists, the image of the user is subjected to image matting processing to separate the foreground from the background, and the obtained image of the foreground area is the face image. And extracting a face image of the user from the user image, detecting the face image, and judging whether the face image has a highlight area. If the high light area exists, the step S310 is carried out, and the brightness of the top lamp and the upper lamp is adjusted; if there is no highlight area, step s311 is performed to determine whether the shadow areas of the face image all satisfy the predetermined condition.
S310, adjusting the brightness of the top light and the upper light
The brightness of the top and top lamps is adjusted in predetermined steps until the highlight area is eliminated. Because the main area that forms the highlight in the people's face is the triangle region of forehead and left and right cheek, the light of dome lamp and upper lamp shines on people's face, and is nearest apart from the forehead, and the forehead is the region of the highlight of forming most easily, and the regional area of highlight is relatively great, and the highlight on the adjustment dome lamp and upper lamp luminance can effectual reduction or elimination forehead, and can reduce the highlight of left and right cheek.
S311, judging whether the shadow areas of the face image all meet the preset conditions
Judging whether the shadow areas of the face image all meet the preset conditions comprises the following steps: judging whether butterfly light exists in the face image or whether shadows exist under the mirror frame; the light distribution method of the butterfly light is that a main light source is arranged above an optical axis of a lens, namely is arranged right in front of the face of a person, the main light source is projected to the face of the person from the upper direction to the lower direction by 45 degrees, and a shadow below the nose is projected to be similar to the butterfly shape. When the face image does not have butterfly light or shadows are formed under the frame, the shadow area of the face image is defined to meet a preset condition.
The step of judging whether the face image contains butterfly light is as follows: dividing a first key area and a second key area from a preset area of the face image according to the position information in the face image, and calculating the average color of the first key area as a skin color reference value; and calculating the average color of the second key area and the color difference between the average color and the skin color reference value, and defining that the shadow area of the face image meets the preset condition when the color difference is within a preset difference range. Wherein, the first key area is a partial area under the eyes, and the second key area is a partial area under the left nostril and the right nostril; in this embodiment, it specifically is: firstly, key point positioning is carried out on a human face, and the key point positioning result comprises position information of key points of the cheek, eyebrow, eyes, nose bridge, nose head, mouth and the like of the human face. Then, a part of the area under the eyes is taken, and the average color of the part of the area under the eyes is calculated to be used as a skin color reference value. And then according to the position information of the nose, taking partial areas below the left nostril and the right nostril, respectively calculating the average color of the partial areas, calculating the color difference with the reference value of the skin color, and when the color difference is overlarge, considering that the part below the nose is greatly different from the skin color, namely considering that butterfly light is generated.
The step of judging whether the shadow exists under the frame of the face image comprises the following steps: separating the area of the glasses from the face image to obtain a position template of the glasses; calculating the color difference between each pixel in the face image and the skin color reference value to obtain a color difference image; and performing threshold segmentation on the chromatic aberration diagram, performing patch analysis on a segmentation result to obtain a patch where a shadow generated by a position template of the glasses is located, judging whether a parameter of the patch is within a preset parameter range, and if the parameter of the patch is within the preset parameter range, defining that no shadow exists under the glasses frame. In this embodiment, the glasses detection and segmentation are specifically performed on the face image to obtain a position template of the glasses. And carrying out key point positioning on the face to obtain a face mask. And calculating the color difference between each pixel in the face area and the skin color to obtain a color difference image. And performing threshold segmentation on the chromatic aberration diagram, performing patch analysis on the result, and obtaining a patch in which a shadow generated by the spectacle frame is located from the aspects of the size, continuity, position correlation with a nose bridge and the like of the patch, thereby completing the shadow detection under the spectacle frame.
When no butterfly light is generated in the face image, no shadow is generated under the spectacle frame; it is determined that the shadow area of the face image satisfies the predetermined condition.
S312, correspondingly adjusting the upper lamp and the lower lamp
If the shadow area of the face image does not meet the preset condition, correspondingly adjusting the brightness of an upper lamp and a lower lamp in the lighting system; and step S311 is carried out again, whether the shadow areas of the face image meet the preset conditions or not is judged until the shadow areas of the face image meet the preset conditions. Because the shadow and the butterfly light under the mirror bracket are generated and are related to the positions and the brightness of the upper lamp and the lower lamp, and because the person taking a picture is different in height, when the shadow and/or the butterfly light under the mirror bracket are generated, the brightness of the upper lamp and the lower lamp needs to be adjusted to reduce or eliminate the shadow and the butterfly light under the mirror bracket.
S313, judging whether the brightness of the background image meets the preset conditions
Judging whether the brightness of the background image meets a preset condition comprises the following steps: and judging whether the background light source is too bright and whether the background brightness is uniform, and if the brightness of the background light source is within a preset range and the background brightness is uniform, defining that the brightness of the background image meets a preset condition.
Judging whether the background light source is too bright specifically comprises the following steps: converting the pixel value in the background image from an RGB space to an HSV space, calculating the brightness average value of the pixel value, taking the brightness average value as the brightness value of the background image, and judging whether the brightness value is in a preset brightness range; calculating a variance value of the brightness value distribution of the pixels in the background image, and judging whether the variance value is within a preset brightness range; if the brightness value is within the preset brightness range and the variance value is within the preset brightness range; the luminance value defined as the background image is appropriate.
The specific steps of judging whether the background brightness is uneven are as follows: converting the pixel value in the background image from RGB space to HSV space, calculating the variance of the brightness value distribution of the pixel in the region, and measuring the uniformity of the brightness value distribution in the background region by using the variance, wherein the more uniform the distribution is, the smaller the variance is; if the variance of the luminance value distribution is within a predetermined range, it is defined that the background luminance is uniform.
When the brightness of the background image does not meet the preset condition, the step S314 is carried out, and the brightness of the background lamp is adjusted; and when the brightness of the background image meets the preset condition, the step S315 is carried out, and whether the shadow areas of the face image meet the preset condition is judged.
S314, adjusting the brightness of the background light
The background brightness and the background uniformity are only related to the background lamp, so if the brightness of the background image does not meet the preset condition, the background lamp is only required to be adjusted to keep the background uniform by keeping the slight brightness.
S315, outputting the identification photo
If the shadow area of the face image meets the preset condition, the current user image meets the requirement of the certificate photo, so the user image currently acquired by the lens is used as the certificate photo, and the certificate photo is output. Wherein, the mode of exporting to this certificate photo includes: printing the certificate photo and/or uploading the certificate photo to a certificate handling service platform.
S316, when the user leaves the shooting area, the lighting system is dimmed or turned off
Whether the user leaves the shooting area is detected and judged through the human body induction controller, and if the user leaves the shooting area, the illumination brightness of the lighting system is reduced or the lighting system is turned off. Which effectively reduces energy consumption.
Referring to fig. 4, an embodiment of an automatic adjusting system for a photo light includes:
the lighting system driving module 401 is used for driving a lighting system to illuminate; and correspondingly adjust the top light, the upper light, the left light, the right light, the lower light and the background light according to the detection result of the face image detection module 403 and/or the background image detection module 404.
A user image acquisition module 402, where the user image acquisition module 402 is used to drive a lens to acquire a user image in real time, and the user image includes a face image and a background image of a user. In the subsequent process, the user image capturing module 402 also continuously captures the real-time user image.
The face image detection module 403, where the face image detection module 403 is respectively connected to the user image acquisition module 402 and the lighting system driving module 401, and is configured to extract a face image of a user from the user image, detect the face image, determine whether brightness of the face image is uniform, and if not, drive the lighting system driving module 401 to correspondingly adjust brightness of a top light, an upper light, a left light, and a right light in the lighting system; wherein, whether the brightness of the face image is uniform specifically includes: whether there is a highlight area in the face image and/or whether the difference in luminance values between the left and right areas of the face image is large. And when the detection result shows that the difference value between the brightness values of the highlight area and the left and right areas of the face image is within a preset range, judging that the brightness of the face image is uniform.
Because the main area forming highlight in the face is the triangular area of the forehead and the left and right cheeks, the light of the top lamp and the upper lamp irradiates the face and is closest to the forehead, the forehead is the area which is most easy to form highlight, and the area of the highlight area is relatively large, the highlight on the forehead can be effectively reduced or eliminated by adjusting the brightness of the top lamp and the upper lamp, and the highlight on the left and right cheeks can be reduced; when the difference between the brightness values of the left and right regions of the face image is large, the left and right lights need to be adjusted accordingly to reduce the difference between the brightness values of the left and right regions.
A background image detection module 404, where the background image detection module 404 is respectively connected to the face image detection module 403, the user image acquisition module 402, and the lighting system driving module 401, and is configured to extract the background image from the user image when the brightness of the face image is uniform, and respectively determine whether the brightness of the background image and the shadow area of the face image both satisfy a predetermined condition, and if not, drive the lighting system driving module 401 to correspondingly adjust the brightness of an upper light, a lower light, and a background light in the lighting system; wherein judging whether the brightness of the background image meets a predetermined condition comprises: and judging whether the background light source is too bright and whether the background brightness is uniform, and if the brightness of the background light source is within a preset range and the background brightness is uniform, defining that the brightness of the background image meets a preset condition. Judging whether the shadow areas of the face image all meet the preset conditions comprises the following steps: judging whether butterfly light exists in the face image or whether shadows exist under the mirror frame; the light distribution method of the butterfly light is that a main light source is arranged above an optical axis of a lens, namely is arranged right in front of the face of a person, the main light source is projected to the face of the person from the upper direction to the lower direction by 45 degrees, and a shadow below the nose is projected to be similar to the butterfly shape. When the face image does not have butterfly light or shadows are formed under the frame, the shadow area of the face image is defined to meet a preset condition.
The background brightness and the background uniformity are only related to the background lamp, so if the brightness of the background image does not meet the preset condition, the background lamp is only required to be adjusted to keep the background uniform by keeping the slight brightness. The generation of the shadow and the butterfly light under the mirror bracket is related to the positions and the brightness of the upper lamp and the lower lamp, and because the height of the person taking a picture is different, when the shadow and/or the butterfly light under the mirror bracket is generated, the brightness of the upper lamp and the lower lamp needs to be adjusted to reduce or eliminate the shadow and the butterfly light under the mirror bracket.
And the certificate photo generation module 405, where the certificate photo generation module 405 is respectively connected to the background image detection module 404 and the user image acquisition module 402, and is configured to, when a shadow region of the face image meets a predetermined condition, take a current user image acquired by the user image acquisition module as a certificate photo and output the certificate photo. Wherein, the mode of exporting to this certificate photo includes: printing the certificate photo and/or uploading the certificate photo to a certificate handling service platform.
The following describes a self-service shooting device according to an embodiment of the present invention, including:
lighting system, camera and as above the automatic regulating system of light of shooing, lighting system installs in the photography cabinet, and it includes: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; the lighting system is connected with a lighting system driving module in the automatic photographing lighting adjusting system, and the lens of the camera is connected with a user image acquisition module in the automatic photographing lighting adjusting system. The top lamp is placed at the top of the head of a user, so that a light supplementing effect is achieved, a background shadow is reduced, and the drawing matting is facilitated; the left lamp and the right lamp are arranged on the left side and the right side of the camera, and an included angle of 20-45 degrees is formed on a connection line of the lens and a user; lamp mounting: the device is placed on the upper side of the collecting camera, and the light is connected with a user upwards to form an included angle of 30-65 degrees; and (5) turning off a lamp: the camera is placed at the lower side of the camera, and the light and a user connecting line form an included angle of 30-65 degrees downwards; a backlight plate: placed behind the user, the backlight needs to be dim and uniform to eliminate background shadows and facilitate matting.
In the description of the present specification, reference to the description of the terms "one embodiment", "some embodiments", "an illustrative embodiment", "an example", "a specific example", or "some examples", etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for automatically adjusting photographing light is characterized by comprising the following steps:
driving a lighting system to illuminate, and acquiring a user image in real time through a lens, wherein the user image comprises a face image and a background image of a user;
extracting a face image of a user from the user image, detecting the face image, judging whether the brightness of the face image is uniform or not, and if not, correspondingly adjusting the brightness of a top lamp, an upper lamp, a left lamp and a right lamp in the lighting system;
if the brightness of the background image is uniform, extracting the background image from the user image, respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions, and if the brightness of the upper lamp, the lower lamp and the background lamp in the lighting system does not meet the preset conditions, correspondingly adjusting the brightness of the upper lamp, the lower lamp and the background lamp;
and if the user image meets the preset conditions, taking the current user image as the certificate photo, and outputting the certificate photo.
2. The method of claim 1, wherein the detecting the facial image further comprises:
judging whether the user wears glasses, such as glasses, according to the face image of the user; judging whether the glasses meet the photographing requirement, if so, judging whether the glasses reflect light, and if not, judging whether the brightness of the face image is uniform; if the light is reflected, the brightness of the left lamp and the right lamp is correspondingly adjusted.
3. The method for automatically adjusting photographing light according to claim 2, wherein the step of judging whether the brightness of the face image is uniform or not, and if the brightness of the face image is not uniform, the step of correspondingly adjusting the brightness of a top lamp, an upper lamp, a left lamp and a right lamp in the lighting system comprises the steps of:
judging whether the face image has a highlight area, and if the face image has the highlight area, reducing the brightness of a top light and an upper light;
and respectively obtaining the brightness values of the left area and the right area in the face image, comparing the brightness values of the left area and the right area to obtain the brightness difference value, judging whether the brightness difference value is within a preset range, and if not, correspondingly adjusting the brightness of the left lamp and the right lamp.
4. The method of claim 3, wherein the determining whether the brightness of the background image and the shadow area of the face image both satisfy a predetermined condition comprises:
converting the pixel value in the background image from an RGB space to an HSV space, calculating the brightness average value of the pixel value, taking the brightness average value as the brightness value of the background image, and judging whether the brightness value is in a preset brightness range;
calculating a variance value of the brightness value distribution of the pixels in the background image, and judging whether the variance value is within a preset brightness range;
if the brightness value is within the preset brightness range and the variance value is within the preset brightness range; it is defined that the brightness of the background image satisfies a predetermined condition.
5. The method of claim 3, wherein the determining whether the brightness of the background image and the shadow area of the face image both satisfy a predetermined condition comprises:
dividing a first key area and a second key area from a preset area of the face image according to the position information in the face image, and calculating the average color of the first key area as a skin color reference value;
and calculating the average color of the second key area and the color difference between the average color and the skin color reference value, and defining that the shadow area of the face image meets the preset condition when the color difference is within a preset difference range.
6. The automatic adjusting method for photographing light according to claim 3, wherein the step of defining the shadow area of the face image to satisfy the predetermined condition comprises the steps of:
separating the area of the glasses from the face image to obtain a position template of the glasses;
calculating the color difference between each pixel in the face image and the skin color reference value to obtain a color difference image; and performing threshold segmentation on the color difference image, performing patch analysis on a segmentation result to obtain a patch where a shadow generated by a position template of the glasses is located, judging whether a parameter of the patch is within a preset parameter range, and if the parameter of the patch is within the preset parameter range, defining that a shadow area of the face image meets a preset condition.
7. The automatic adjusting method for photographing light of claim 1, wherein before the driving light system for illumination, the method comprises:
whether the user enters the shooting area is detected and judged through the human body induction controller, and if the user enters the shooting area, the lighting system is driven to illuminate.
8. The automatic adjusting method of the light of a photo taking lamp as claimed in claim 1, wherein after outputting the identification photo, the method comprises:
whether the user leaves the shooting area is detected and judged through the human body induction controller, and if the user leaves the shooting area, the illumination brightness of the lighting system is reduced or the lighting system is turned off.
9. The utility model provides a light automatic regulating system shoots, its characterized in that includes:
the lighting system driving module is used for driving a lighting system to illuminate;
the user image acquisition module is used for driving the lens to acquire a user image in real time, and the user image comprises a face image and a background image of a user;
the face image detection module is respectively connected with the user image acquisition module and the lighting system driving module and is used for extracting a face image of a user from the user image, detecting the face image, judging whether the brightness of the face image is uniform or not, and if the brightness of the face image is not uniform, driving the lighting system driving module to correspondingly adjust the brightness of a top lamp, an upper lamp, a left lamp and a right lamp in the lighting system;
the background image detection module is respectively connected with the face image detection module, the user image acquisition module and the lighting system driving module, and is used for extracting the background image from the user image when the brightness of the face image is uniform, respectively judging whether the brightness of the background image and the shadow area of the face image both meet preset conditions, and if not, driving the lighting system driving module to correspondingly adjust the brightness of an upper lamp, a lower lamp and a background lamp in the lighting system;
and the certificate photo generation module is respectively connected with the background image detection module and the user image acquisition module and is used for taking the current user image acquired by the user image acquisition module as the certificate photo and outputting the certificate photo when the shadow area of the face image meets a preset condition.
10. A self-service shooting device, comprising: a light system, a camera, and the automatic photo light adjustment system of claim 9, the light system comprising: a ceiling lamp, an upper lamp, a left lamp, a right lamp, a lower lamp and a background lamp; the lighting system is connected with a lighting system driving module in the automatic photographing lighting adjusting system, and a lens in the camera is connected with a user image acquisition module in the automatic photographing lighting adjusting system.
CN202010856272.7A 2020-08-24 2020-08-24 Automatic photographing light adjusting method and system and self-service photographing equipment thereof Active CN112235483B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010856272.7A CN112235483B (en) 2020-08-24 2020-08-24 Automatic photographing light adjusting method and system and self-service photographing equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010856272.7A CN112235483B (en) 2020-08-24 2020-08-24 Automatic photographing light adjusting method and system and self-service photographing equipment thereof

Publications (2)

Publication Number Publication Date
CN112235483A true CN112235483A (en) 2021-01-15
CN112235483B CN112235483B (en) 2023-04-07

Family

ID=74115928

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010856272.7A Active CN112235483B (en) 2020-08-24 2020-08-24 Automatic photographing light adjusting method and system and self-service photographing equipment thereof

Country Status (1)

Country Link
CN (1) CN112235483B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486714A (en) * 2021-06-03 2021-10-08 荣耀终端有限公司 Image processing method and electronic equipment
CN117440556A (en) * 2023-12-20 2024-01-23 常州海图信息科技股份有限公司 LED control system and switch protection circuit thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100328498A1 (en) * 2009-06-25 2010-12-30 Pixart Imaging Inc. Shooting parameter adjustment method for face detection and image capturing device for face detection
CN103631069A (en) * 2013-12-09 2014-03-12 牛强 Multifunctional digital studio system
CN103986881A (en) * 2014-05-23 2014-08-13 张科 Full-automatic photographing method and device
CN105872405A (en) * 2016-03-30 2016-08-17 东斓视觉科技发展(北京)有限公司 Smart photographing mirror, smart photographing system, and photographing method
CN106068048A (en) * 2016-05-25 2016-11-02 中国地质大学(武汉) A kind of light adaptive regulation method based on face brightness identification and system
CN107705277A (en) * 2017-09-11 2018-02-16 广东欧珀移动通信有限公司 Image processing method and device
CN109917602A (en) * 2019-04-04 2019-06-21 厦门启尚科技有限公司 A kind of photographic light intelligent control structure and method
CN110248450A (en) * 2019-04-30 2019-09-17 广州富港万嘉智能科技有限公司 A kind of combination personage carries out the method and device of signal light control
CN111263074A (en) * 2020-03-13 2020-06-09 深圳市雄帝科技股份有限公司 Method, system and equipment for automatically adjusting brightness of camera and storage medium thereof

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100328498A1 (en) * 2009-06-25 2010-12-30 Pixart Imaging Inc. Shooting parameter adjustment method for face detection and image capturing device for face detection
CN103631069A (en) * 2013-12-09 2014-03-12 牛强 Multifunctional digital studio system
CN103986881A (en) * 2014-05-23 2014-08-13 张科 Full-automatic photographing method and device
CN105872405A (en) * 2016-03-30 2016-08-17 东斓视觉科技发展(北京)有限公司 Smart photographing mirror, smart photographing system, and photographing method
CN106068048A (en) * 2016-05-25 2016-11-02 中国地质大学(武汉) A kind of light adaptive regulation method based on face brightness identification and system
CN107705277A (en) * 2017-09-11 2018-02-16 广东欧珀移动通信有限公司 Image processing method and device
CN109917602A (en) * 2019-04-04 2019-06-21 厦门启尚科技有限公司 A kind of photographic light intelligent control structure and method
CN110248450A (en) * 2019-04-30 2019-09-17 广州富港万嘉智能科技有限公司 A kind of combination personage carries out the method and device of signal light control
CN111263074A (en) * 2020-03-13 2020-06-09 深圳市雄帝科技股份有限公司 Method, system and equipment for automatically adjusting brightness of camera and storage medium thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113486714A (en) * 2021-06-03 2021-10-08 荣耀终端有限公司 Image processing method and electronic equipment
CN117440556A (en) * 2023-12-20 2024-01-23 常州海图信息科技股份有限公司 LED control system and switch protection circuit thereof
CN117440556B (en) * 2023-12-20 2024-02-23 常州海图信息科技股份有限公司 LED control system and switch protection circuit thereof

Also Published As

Publication number Publication date
CN112235483B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN112235483B (en) Automatic photographing light adjusting method and system and self-service photographing equipment thereof
CN102119361B (en) In-camera based method of detecting defect eye with high accuracy
KR101286454B1 (en) Fake face identification apparatus and method using characteristic of eye image
JP2004318204A (en) Image processing device, image processing method, and photographing device
EP1703436A2 (en) Image processing system, image processing apparatus and method, recording medium, and program
JP2004264893A (en) Image processor, method for processing image and photographing device
US20080284901A1 (en) Automatic focus adjusting apparatus and automatic focus adjusting method, and image pickup apparatus and image pickup method
CN109359647A (en) Identify the method, equipment and computer readable storage medium of a variety of certificates
US8730352B2 (en) Image processing apparatus and image processing method
KR101123834B1 (en) Method and camera device for determination of photograph cheating using controllable ir light
TW201737237A (en) Electronic device, system and method for adjusting display device
CN102970482A (en) Method for automatically starting pinkeye preventing model in photographing and photographing equipment thereof
CN109005325B (en) Facial camera device and method based on interactive intelligent light supplementing
CN113411507B (en) Skin measurement image acquisition method, device, equipment and storage medium
JP2004318205A (en) Image processing device, image processing method, and photographing device
CN213545405U (en) Self-service photographing terminal
CN108391356A (en) A kind of Intelligent House Light control system
JP2004234571A (en) Image processor, image processing method and photographing device
JPH07288754A (en) Head mounted type display device
US11272086B2 (en) Camera system, vehicle and method for configuring light source of camera system
CN211409015U (en) Vision screening instrument capable of automatically adjusting brightness of lamp panel
KR100366723B1 (en) Lighting apparatus for iris recognition system
JP2005148245A (en) Photographing system
WO2019090591A1 (en) Photography method and photography system based on smart terminal
CN117676992B (en) Cooperative illumination control method and system for multiple groups of intelligent lamps and mirrors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant