CN112036201B - Image processing method, device, equipment and medium - Google Patents
Image processing method, device, equipment and medium Download PDFInfo
- Publication number
- CN112036201B CN112036201B CN202010782450.6A CN202010782450A CN112036201B CN 112036201 B CN112036201 B CN 112036201B CN 202010782450 A CN202010782450 A CN 202010782450A CN 112036201 B CN112036201 B CN 112036201B
- Authority
- CN
- China
- Prior art keywords
- image
- value
- dimensional code
- brightness value
- average brightness
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/10544—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
- G06K7/10712—Fixed beam scanning
- G06K7/10722—Photodetector array or CCD scanning
- G06K7/10732—Light sources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/1408—Methods for optical code recognition the method being specifically adapted for the type of code
- G06K7/1417—2D bar codes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K7/00—Methods or arrangements for sensing record carriers, e.g. for reading patterns
- G06K7/10—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
- G06K7/14—Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
- G06K7/1404—Methods for optical code recognition
- G06K7/146—Methods for optical code recognition the method including quality enhancement steps
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/20—Individual registration on entry or exit involving the use of a pass
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/30—Individual registration on entry or exit not involving the use of a pass
- G07C9/32—Individual registration on entry or exit not involving the use of a pass in combination with an identity check
- G07C9/37—Individual registration on entry or exit not involving the use of a pass in combination with an identity check using biometric data, e.g. fingerprints, iris scans or voice recognition
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Toxicology (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Closed-Circuit Television Systems (AREA)
- Interconnected Communication Systems, Intercoms, And Interphones (AREA)
- Image Processing (AREA)
Abstract
The invention discloses an image processing method, an image processing device and an image processing medium, which are used for solving the technical problem that the two-dimensional code recognition rate is low when the brightness of the whole image of the existing entrance guard intercom device in a two-dimensional code detection window is high. According to the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, an image processing device, and an image processing medium.
Background
When monitoring that a currently acquired image contains a two-dimensional code, the existing entrance guard intercom device can adaptively adjust the image parameter of the acquired image to a target image parameter, for example, adjust the brightness of the image to a preset target brightness value, so as to identify the two-dimensional code contained therein.
What set up on the screen of current entrance guard intercom is a fixed two-dimensional code detection window, and entrance guard intercom adjusts the image in this two-dimensional code detection window. However, the image in the two-dimensional code detection window may include both the image of the environmental portion and the two-dimensional code image, and when the entire image in the two-dimensional code detection window is adjusted, the image of the environmental portion may interfere with the image.
When the brightness of an image of an environment part in a two-dimensional code detection window is brighter but the brightness of an image in a two-dimensional code area is darker, the brightness of the image in the two-dimensional code area may be still darker after the brightness of the whole image of the two-dimensional code detection window is adjusted to a target brightness value by the conventional entrance guard intercom device; or when the brightness of the image in the two-dimensional code area is brighter but the brightness of the image in the environment part is darker, the brightness of the image in the two-dimensional code area may still be brighter after the brightness of the whole image of the two-dimensional code detection window is adjusted to the target brightness value by the conventional entrance guard intercom device, so that the phenomenon that the two-dimensional code cannot be identified may occur, and the identification rate of the two-dimensional code is influenced to a certain extent.
Disclosure of Invention
The embodiment of the invention provides an image processing method, an image processing device and an image processing medium, which are used for solving the technical problem that the two-dimensional code recognition rate is low when the brightness of the whole image of the existing entrance guard intercom device in a two-dimensional code detection window is high.
An aspect of the present invention provides an image processing method, including:
monitoring whether a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
if so, determining a first reduction ratio of a first average brightness value of the first image, and adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image;
and acquiring a second average brightness value of a two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
Further, after determining the first reduction ratio of the first average brightness value of the first image, the method further comprises:
acquiring a first gain value and a first dynamic range value of the first image;
if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
Further, if the first gain value is not greater than the gain threshold value and the first dynamic range value is greater than the preset dynamic range threshold value, the method further includes:
determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of a noise reduction parameter value, and a first wide dynamic intensity value of wide dynamic intensity values;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
Further, the method further comprises:
determining a fourth image to be processed according to a set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in each fourth image;
if so, taking the fourth image as a first image, adjusting a first average brightness value of the first image to obtain a second image, adjusting a second average brightness value of the two-dimensional code area to be the target brightness value when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
Further, the method further comprises:
and if the two-dimensional code does not exist in the fourth image but the face exists, adjusting the image parameter value of the fourth image to be the set target face image parameter value, and identifying the face in the fourth image after the image parameter value is adjusted.
Further, the method further comprises:
if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, but the face exists, adjusting the image parameter value of the first image to the set target face image parameter value, and identifying the face in the first image after the image parameter value is adjusted.
Yet another aspect of the present invention provides an image processing apparatus, including:
the monitoring module is used for monitoring whether the two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
a first adjusting module, configured to determine a first reduction ratio of a first average luminance value of the first image if the two-dimensional code exists in the first image, and adjust the first average luminance value of the first image based on the first reduction ratio to obtain a second image;
and the second adjusting module is used for acquiring a second average brightness value of the two-dimensional code region in the second image, adjusting the second average brightness value of the two-dimensional code region to the target brightness value if the second average brightness value is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code region after the brightness value is adjusted.
Further, the apparatus further comprises:
a first determining module, configured to obtain a first gain value and a first dynamic range value of the first image after determining a first reduction ratio of a first average brightness value of the first image; if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the first adjusting module is specifically configured to correspondingly adjust a first average brightness value, a contrast value, and a sharpness value of the first image based on the first reduction ratio, the second reduction ratio, and the third improvement ratio to obtain a second image.
Further, if the first gain value is not greater than the gain threshold value and the first dynamic range value is greater than the preset dynamic range threshold value, the apparatus further includes:
a second determination module for determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of the noise reduction parameter value, and a first wide dynamic intensity value of the wide dynamic intensity values;
the first adjusting module is specifically configured to correspondingly adjust the first average brightness value, the contrast value, the noise reduction parameter, and the wide dynamic intensity value of the first image based on the first reduction ratio, the fourth improvement ratio, the fifth improvement ratio, and the first wide dynamic intensity value, so as to obtain a second image.
Further, the apparatus further comprises:
the polling module is used for determining a fourth image to be processed according to a set polling frequency for each third image acquired by the entrance guard intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in the fourth image for each fourth image;
and the third adjusting module is configured to, if the fourth image has the two-dimensional code, use the fourth image as the first image, adjust the first average brightness value of the first image to obtain a second image, adjust the second average brightness value of the two-dimensional code region to the target brightness value when the second average brightness value of the two-dimensional code region in the second image is not the preset target brightness value, and identify the two-dimensional code in the two-dimensional code region with the adjusted brightness value.
Further, the apparatus further comprises:
and the fourth adjusting module is used for adjusting the image parameter value of the fourth image to a set target face image parameter value if the two-dimensional code does not exist in the fourth image but the face exists, and identifying the face in the fourth image after the image parameter value is adjusted.
Further, the apparatus further comprises:
and the fifth adjusting module is used for adjusting the image parameter value of the first image to a set target face image parameter value if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device but the face exists, and identifying the face in the first image after the image parameter value is adjusted.
A further aspect of the invention provides an electronic device comprising at least a processor and a memory, the processor being adapted to implement the steps of any of the image processing methods described above when executing a computer program stored in the memory.
Yet another aspect of the present invention provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of any of the image processing methods described above.
In the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the access control intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
Drawings
Fig. 1 is a schematic diagram of a first image processing process according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a second exemplary image processing process according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a third exemplary image processing process according to the present invention;
FIG. 4 is a diagram illustrating a fourth exemplary image processing process according to the present invention;
FIG. 5 is a diagram illustrating a fifth exemplary image processing process according to the embodiment of the present invention;
FIG. 6 is a diagram illustrating an image processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to improve the two-dimension code recognition rate of the entrance guard intercom device, the embodiment of the invention provides an image processing method, an apparatus, a device and a medium.
Example 1:
fig. 1 is a schematic diagram of a first image processing process provided in an embodiment of the present invention, where the process includes the following steps:
s101: whether the two-dimensional code exists in the first image acquired by the entrance guard intercom device currently is monitored.
The image processing method provided by the embodiment of the invention is applied to access control intercom equipment. The entrance guard intercom equipment can acquire the image displayed in the shooting range of the entrance guard intercom equipment camera through the camera in the entrance guard intercom equipment. In the embodiment of the invention, the entrance guard intercom device can recognize the human face and the two-dimensional code in real time. Specifically, whether the two-dimensional code exists in the currently acquired first image can be known through an existing intelligent algorithm. The monitoring has the two-dimensional code to include at least in the present first image that acquires of entrance guard's intercom equipment: not only the face exists, but also the two-dimensional code exists; and only the two-dimensional code exists, and no human face exists.
S102: if so, determining a first reduction ratio of a first average brightness value of the first image, and adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image.
In addition, the main screen interface of the access control intercom device in the existing scheme is mainly in a face recognition mode, if a user needs to perform two-dimensional code recognition, the user needs to manually click a switching button in the main screen interface, and the face recognition mode of the access control intercom device is switched into the two-dimensional code recognition mode, so that the two-dimensional code can be recognized, and therefore the operation process is complex, and the user experience is influenced.
The entrance guard intercom device identifies whether the two-dimensional code exists in the first image acquired currently, if the two-dimensional code exists, the entrance guard intercom device directly enters the two-dimensional code identification mode, and a switching button for switching from the face identification mode to the two-dimensional code identification mode is not required to be arranged on a main screen interface of the entrance guard intercom device, so that the user operation is simplified, and the user experience is improved.
When the door access intercom device identifies that a two-dimensional code exists in a currently acquired first image, the door access intercom device enters a two-dimensional code identification mode, in order to accurately identify the two-dimensional code, in the embodiment of the invention, the average brightness value of the first image can be determined, and the average brightness value of the first image is used as a first average brightness value.
Generally, when the brightness of the image of the environment portion in the first image is bright and/or the brightness of the image of the two-dimensional code region is bright, the first average brightness value of the first image may exceed the preset target brightness value, and in order to preliminarily adjust the first average brightness value of the first image to the preset target brightness value, after the first average brightness value is determined, the first reduction ratio of the first average brightness value may be determined. When the first reduction ratio is determined, the first reduction ratio of the first average brightness value of the first image may be determined according to a difference between the first average brightness value of the first image and a preset target brightness value. Illustratively, for example, if the first average luminance value of the first image is 100 and the preset target luminance value is 80, the first reduction ratio may be 20%.
In addition, in order to improve the image processing efficiency, a first reduction ratio may be determined according to an empirical value, and based on the first reduction ratio, the first average luminance value of the first image may be preliminarily adjusted to a preset target luminance value. For example, when it is monitored that the two-dimensional code exists in a first image currently acquired by the door access intercom device, it may be determined that the first reduction ratio of the first average brightness value of the first image is any ratio within a range, for example, the range may be not less than 20% and not more than 30%.
After the first reduction ratio is determined, in order to adjust the brightness value of the first image, the first average brightness value of the first image may be adjusted according to the first reduction ratio. Specifically, the product of the first average brightness value and the first reduction ratio may be used as the brightness value reduced from the first average brightness value, and the difference between the first average brightness value and the brightness value reduced from the first average brightness value may be used as the brightness value adjusted from the first image. In a possible embodiment, the first average brightness value of the first image is adjusted to obtain the second image, and it is understood that the average brightness value of the second image is the adjusted brightness value of the first image. Illustratively, for example, the first average brightness value of the first image is 100, the first reduction ratio is 20%, and the first average brightness value is reduced by 100 × 20%, that is, 20%. The first image has an adjusted luminance value of 100-20, i.e. 80. The average luminance value of the second image is the same as the adjusted luminance value of the first image, i.e. the average luminance value of the second image is 80.
S103: and acquiring a second average brightness value of a two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In order to improve the two-dimensional code recognition rate, in the embodiment of the present invention, a second average brightness value of the two-dimensional code region in the second image may be obtained, and the average brightness value of the two-dimensional code region may be used as the second average brightness value, and it is determined whether the second average brightness value is a preset target brightness value. If the second average brightness value is not the preset target brightness value, it is indicated that the second average brightness value of the current two-dimensional code region does not satisfy the identification requirement of the two-dimensional code, and in order to improve the two-dimensional code identification rate, in the embodiment of the present invention, if the second average brightness value is not the preset target brightness value, the second average brightness value of the two-dimensional code region may be further adjusted to the target brightness value based on the second average brightness value of the two-dimensional code region.
Still by way of example in the above embodiment, for example, the first average brightness value of the first image is 100, the first reduction ratio is 20%, and the second image with the adjusted brightness value is obtained after the first average brightness value of the first image is adjusted based on the first reduction ratio. And acquiring a second average brightness value of the two-dimensional code region in the second image, wherein the second average brightness value of the two-dimensional code region is 120, the preset target brightness value is 80, and the second average brightness value is not the preset target brightness value, so that the second average brightness value of the two-dimensional code region can be further adjusted to the preset target brightness value, specifically, the brightness value of the second image can be reduced by 1/3 again based on the second average brightness value of the two-dimensional code region, and thus, the second average brightness value of the two-dimensional code region in the second image can be adjusted to the target brightness value.
It can be understood that if the second average brightness value of the two-dimensional code region in the second image is the preset target brightness value, the brightness value of the second image may not be adjusted, and the two-dimensional code in the two-dimensional code region may be directly identified. Specifically, the two-dimensional code in the two-dimensional code area can be identified by using the prior art, which is not described herein again.
According to the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
Example 2:
in order to improve the two-dimensional code recognition rate, on the basis of the foregoing embodiments, in an embodiment of the present invention, after determining the first reduction ratio of the first average brightness value of the first image, the method further includes:
acquiring a first gain value and a first dynamic range value of the first image;
if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
In order to accurately identify the two-dimensional code, in the embodiment of the present invention, after determining the first reduction ratio of the first average brightness value, it may be determined whether a contrast value, a sharpness value, a noise reduction parameter value, a wide dynamic intensity value, and the like need to be adjusted. In the embodiment of the present invention, after determining the first reduction ratio of the first average brightness value of the first image, the first gain value and the first dynamic range value of the first image may also be obtained, and specifically, the first gain value and the first dynamic range value of the first image may be obtained by using the prior art, which is not described herein again.
The entrance guard intercom equipment can identify the two-dimensional code displayed in the mobile phone screen and the two-dimensional code made of paper, and is required to adapt to various scenes such as indoor, outdoor, backlight, front light, daytime and night. In the embodiment of the present invention, if the first gain value is greater than the preset gain value threshold (gain _ thr0), it may be considered that the first gain value of the first image is too large, and in general, under a dark situation such as night, a white light of the door access intercom device is turned on to supplement light, so as to obtain the first image.
In a scene corresponding to an excessively large gain value, after the first image is acquired, in addition to the need of adjusting the first average brightness value of the first image, the contrast value and the definition value of the first image can be adjusted for accurately identifying the two-dimensional code, so that the first average brightness value, the contrast value and the definition value of the first image are correspondingly adjusted to be a target brightness value, a target contrast value and a target definition value respectively.
In the embodiment of the invention, in order to accurately identify the two-dimensional code, in addition to determining the first reduction ratio of the first average brightness value of the first image, a second reduction ratio of the contrast value of the first image and a third improvement ratio of the sharpness value can be determined in a scene corresponding to an excessively large gain value.
Specifically, in order to adjust the contrast value of the first image to the preset target contrast value, the contrast value of the first image may be determined, and the second reduction ratio of the contrast value of the first image may be determined. When the second reduction ratio is determined, the second reduction ratio of the contrast value of the first image may be determined according to a difference between the contrast value of the first image and a preset target contrast value.
In addition, in order to improve the image processing efficiency, a second reduction ratio may be determined from an empirical value, and the contrast value of the first image may be adjusted to a preset target contrast value based on the second reduction ratio. For example, if the first gain value is greater than the preset gain value threshold, the second reduction ratio of the contrast value of the first image may be determined to be any ratio within a range, for example, the range may be not less than 10% and not more than 20%.
After the second reduction ratio is determined, in order to adjust the contrast value of the first image, the contrast value of the first image may be adjusted according to the second reduction ratio. Specifically, the product of the contrast value of the first image and the second reduction ratio may be used as the contrast value for reducing the first image, and then the difference between the contrast value of the first image and the contrast value for reducing the first image may be used as the adjusted contrast value of the first image.
Similarly, in order to adjust the sharpness value of the first image to the preset target sharpness value, the sharpness value of the first image may be determined, and the third improvement ratio of the sharpness value of the first image may be determined. When the third improvement ratio is determined, the third improvement ratio of the sharpness value of the first image may be determined according to a difference between a preset target sharpness value and the sharpness value of the first image.
In addition, in order to improve the image processing efficiency, a third improvement ratio may be determined from an empirical value, and based on the third improvement ratio, the sharpness value of the first image may be adjusted to a preset target sharpness value. For example, if the first gain value is greater than the preset gain value threshold, the third improvement ratio of the sharpness value of the first image may be determined to be any ratio within a range, for example, the range may be not less than 10% and not more than 20%.
After the third improvement ratio is determined, in order to adjust the sharpness value of the first image, the sharpness value of the first image may be adjusted according to the third improvement ratio. Specifically, the product of the sharpness value of the first image and the third improvement rate can be used as the sharpness value improved for the first image, and then the sum of the sharpness value of the first image and the sharpness value improved for the first image is used as the sharpness value after the first image is adjusted.
That is, after the first reduction proportion of the first average brightness value, the second reduction proportion of the contrast value, and the third improvement proportion of the sharpness value are determined, the first average brightness value, the contrast value, and the sharpness value of the first image may be respectively adjusted based on the first reduction proportion, the second reduction proportion, and the third improvement proportion, so as to obtain the second image with the brightness value, the contrast value, and the sharpness value adjusted.
Whether a first reduction ratio of the first average brightness value of the first image is determined according to a difference between the first average brightness value of the first image and a preset target brightness value, or any ratio in a range is determined as the first reduction ratio according to an empirical value, and after the first average brightness value of the first image is adjusted based on the first reduction ratio, an obtained average brightness value of the second image is the preset target brightness value.
Similarly, whether the second reduction ratio of the contrast value of the first image is determined according to the difference between the contrast value of the first image and the preset target contrast value, or any ratio in a range is determined as the second reduction ratio according to an empirical value, and after the contrast value of the first image is adjusted based on the second reduction ratio, the obtained average contrast value of the second image is the preset target brightness value.
Similarly, no matter the third improvement proportion of the sharpness value of the first image is determined according to the difference value between the sharpness value of the first image and the preset target sharpness value, or any proportion in a range is determined as the third improvement proportion according to an empirical value, and after the sharpness value of the first image is adjusted based on the third improvement proportion, the obtained average sharpness value of the second image is the preset target sharpness value.
Generally, when the average contrast value of the second image is a preset target contrast value, the average contrast value of the two-dimensional code region in the second image is the preset target contrast value. And when the average definition value of the second image is a preset target definition value, the average definition value of the two-dimensional code area in the second image is the preset target definition value.
In a possible embodiment, when the average brightness value of the second image is the preset target contrast value, it is possible that the second average brightness value of the two-dimensional code region in the second image is not the preset target brightness value. For example, when the two-dimensional code that exists in the first image that entrance guard's intercom equipment obtained at present is the two-dimensional code that shows in the cell-phone screen, although based on first reduction ratio, adjust the first average brightness value of first image, make the average brightness value of second image be predetermined target brightness value, but because the two-dimensional code in the two-dimensional code region of this second image is the two-dimensional code that shows in the cell-phone screen, the cell-phone screen has certain luminance, so probably make the second average brightness value in the two-dimensional code region in the second image be greater than predetermined target brightness value, can reduce the second average brightness value in the two-dimensional code region this moment, thereby adjust the second average brightness value in the two-dimensional code region to target brightness value.
For another example, when a two-dimensional code existing in a first image currently acquired by the door access intercom device is a paper two-dimensional code, the brightness of an image of an environment part of a non-two-dimensional code region in the first image is brighter, but the brightness of an image of the two-dimensional code region is darker, based on a first reduction ratio, after the first average brightness value of the first image is adjusted, the average brightness value of a second image is a preset target brightness value, and possibly, the second average brightness value of the two-dimensional code region in the second image is smaller than the preset target brightness value, at this time, the second average brightness value of the two-dimensional code region can be increased, so that the second average brightness value of the two-dimensional code region is adjusted to be the target brightness value.
Fig. 2 is a schematic diagram of a second image processing process according to an embodiment of the present invention, as shown in fig. 2:
s201: the method comprises the steps of monitoring that a two-dimension code exists in a first image currently acquired by the entrance guard intercom device, entering a two-dimension code recognition mode, and determining a first reduction ratio of a first average brightness value of the first image.
S202: a first gain value and a first dynamic range value of the first image are obtained.
S203: and if the first gain value is larger than the preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value.
S204: and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
S205: and acquiring a second average brightness value of the two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to be a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In order to improve the two-dimensional code recognition rate, on the basis of the foregoing embodiments, in an embodiment of the present invention, if the first gain value is not greater than the gain threshold value, and the first dynamic range value is greater than the preset dynamic range threshold value, the method further includes:
determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of the noise reduction parameter value and a first wide dynamic intensity value of the wide dynamic intensity values;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
In order to accurately identify the two-dimensional code, in the embodiment of the present invention, after determining the first reduction ratio of the first average brightness value, it may be determined whether a contrast value, a sharpness value, a noise reduction parameter value, a wide dynamic intensity value, and the like need to be adjusted. In general, when the first gain value is not greater than the gain threshold value, the brightness of the first image may be considered to be brighter. When the first gain value is not greater than the gain threshold value and the first dynamic range value is greater than the preset dynamic range threshold value (wdr _ th0), the corresponding scene may be a scene with strong backlight. In a scene corresponding to the first gain value not greater than the gain value threshold and the first dynamic range value greater than the preset dynamic range threshold, after the first image is acquired, in addition to adjusting the first average brightness value of the first image, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image may be adjusted for accurately identifying the two-dimensional code, so that the first average brightness value, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image are respectively adjusted to a target brightness value, a target contrast value, a target noise reduction parameter value and a target wide dynamic intensity value.
In the embodiment of the present invention, in order to accurately identify the two-dimensional code, in a scene corresponding to the first gain value not greater than the gain value threshold and the first dynamic range value greater than the preset dynamic range threshold, in addition to determining the first reduction ratio of the first average brightness value of the first image, a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of the noise reduction parameter value, and a first wide dynamic intensity value of the wide dynamic intensity value may also be determined.
Specifically, in order to adjust the contrast value of the first image to the preset target contrast value, the contrast value of the first image may be determined, and the fourth increase ratio of the contrast value of the first image may be determined. When the fourth improvement ratio is determined, the fourth improvement ratio of the contrast value of the first image may be determined according to a difference between a preset target contrast value and the contrast value of the first image.
In addition, in order to improve the image processing efficiency, a fourth improvement ratio may be determined from an empirical value, and based on the fourth improvement ratio, the contrast value of the first image may be adjusted to a preset target contrast value. For example, if the first gain value is not greater than the gain value threshold and the first dynamic range value is greater than the preset dynamic range threshold, the fourth improvement ratio of the contrast value of the first image may be determined to be any ratio within a range, for example, the range may be not less than 10% and not greater than 20%.
After the fourth improvement ratio is determined, the contrast value of the first image may be adjusted according to the fourth improvement ratio in order to adjust the contrast value of the first image. Specifically, the product of the contrast value of the first image and the fourth increased proportion may be used as the contrast value increased for the first image, and then the sum of the contrast value of the first image and the contrast value increased for the pair of first images may be used as the adjusted contrast value for the first image.
Similarly, in order to adjust the noise reduction parameter value of the first image to the preset target noise reduction parameter value, the size of the noise reduction parameter value of the first image may be determined, and the fifth increase ratio of the noise reduction parameter value of the first image may be determined. When determining the fifth improvement ratio, the fifth improvement ratio of the noise reduction parameter value of the first image may be determined according to a difference between a preset target noise reduction parameter value and the noise reduction parameter value of the first image.
In addition, in order to improve the image processing efficiency, a fifth improvement ratio may be determined from empirical values, and based on the fifth improvement ratio, the noise reduction parameter value of the first image may be adjusted to a preset target noise reduction parameter value. For example, if the first gain value is not greater than the gain value threshold and the first dynamic range value is greater than the preset dynamic range threshold, the fifth improvement ratio of the noise reduction parameter value of the first image may be determined to be any ratio within a range, for example, the range may be not less than 10% and not greater than 20%.
After the fifth improvement ratio is determined, in order to adjust the noise reduction parameter value of the first image, the noise reduction parameter value of the first image may be adjusted according to the fifth improvement ratio. Specifically, the product of the noise reduction parameter value of the first image and the fifth increased ratio may be used as the noise reduction parameter value increased for the first image, and then the sum of the noise reduction parameter value of the first image and the noise reduction parameter value increased for the first image may be used as the noise reduction parameter value adjusted for the first image.
In general, in a scenario where the first gain value is not greater than the gain threshold and the first dynamic range value is greater than the preset dynamic range threshold, the wide dynamic intensity value of the first image may be set as the first wide dynamic intensity value. Specifically, in order to adjust the wide dynamic intensity value of the first image to the preset target wide dynamic intensity value, when the first wide dynamic intensity value is determined, the first wide dynamic intensity value may be determined as the target wide dynamic intensity value according to the preset target wide dynamic intensity value.
In order to improve the image processing efficiency, the first wide dynamic intensity value may be determined from an empirical value, and the wide dynamic intensity value of the first image may be adjusted to a preset target wide dynamic intensity value based on the first wide dynamic intensity value. Specifically, if the first gain value is not greater than the gain threshold and the first dynamic range value is greater than the preset dynamic range threshold, the first wide dynamic strength value may be flexibly set according to a requirement, and for example, the first wide dynamic strength value may be 30%.
That is, after determining the first reduction ratio of the first average brightness value, the fourth improvement ratio of the contrast value, the fifth improvement ratio of the noise reduction parameter value, and the first wide dynamic intensity value of the wide dynamic intensity value, the first average brightness value, the contrast value, the noise reduction parameter value, and the wide dynamic intensity value of the first image may be adjusted based on the first reduction ratio, the fourth improvement ratio, the fifth improvement ratio, and the first wide dynamic intensity value, respectively, so as to obtain the second image with the brightness value, the contrast value, the noise reduction parameter value, and the wide dynamic intensity value all adjusted.
Whether the fourth improvement proportion of the contrast value of the first image is determined according to the difference value of the contrast value of the first image and the preset target contrast value or any proportion in a range is determined as the fourth improvement proportion according to an empirical value, the average contrast value of the second image is the preset target brightness value after the contrast value of the first image is adjusted based on the fourth improvement proportion.
Similarly, no matter the fifth improvement proportion of the noise reduction parameter value of the first image is determined according to the difference value between the noise reduction parameter value of the first image and the preset target noise reduction parameter value, or any proportion in a range is determined as the fifth improvement proportion according to an empirical value, and after the noise reduction parameter value of the first image is adjusted based on the fifth improvement proportion, the obtained average noise reduction parameter value of the second image is the preset target noise reduction parameter value.
Similarly, whether the first wide dynamic intensity value is determined according to a preset target wide dynamic intensity value or the first wide dynamic intensity value is determined according to an empirical value, the wide dynamic intensity value of the first image is adjusted based on the first wide dynamic intensity value, and the obtained average wide dynamic intensity value of the second image is the preset target wide dynamic intensity value.
Generally, when the average contrast value of the second image is a preset target contrast value, the average contrast value of the two-dimensional code region in the second image is the preset target contrast value. And when the average noise reduction parameter value of the second image is the preset target noise reduction parameter value, the average noise reduction parameter value of the two-dimensional code region in the second image is the preset target noise reduction parameter value. And when the average wide dynamic intensity value of the second image is the preset target wide dynamic intensity value, the average wide dynamic intensity value of the two-dimensional code area in the second image is the preset target wide dynamic intensity value.
In a possible implementation manner, in a strong backlight scene corresponding to the first gain value not greater than the gain value threshold and the first dynamic range value greater than the preset dynamic range threshold, when the brightness of the image of the environment portion of the non-two-dimensional code region of the first image is brighter but the brightness of the image of the two-dimensional code region is darker, based on the first reduction ratio, after the first average brightness value of the first image is adjusted, the average brightness value of the second image is the preset target brightness value, and possibly the second average brightness value of the two-dimensional code region in the second image will be lower. At this time, the second average brightness value of the two-dimensional code region does not meet the identification requirement of the two-dimensional code, for example, in the existing scheme, if the second average brightness value of the two-dimensional code region in the second image is not adjusted, under a strong backlight scene with strong outdoor sunlight, the identification rate of the two-dimensional code is almost zero.
In order to improve the two-dimensional code recognition rate, in the embodiment of the present invention, a second average brightness value of the two-dimensional code region in the second image may be further obtained, and if the second average brightness value is not a preset target brightness value, for example, if the second average brightness value of the two-dimensional code region in the second image is very low, the second average brightness value of the two-dimensional code region may be adjusted to the target brightness value, and then the two-dimensional code in the two-dimensional code region whose brightness value is adjusted is recognized. The embodiment of the invention can further adjust the second average brightness value of the two-dimensional code area, so that the second average brightness value of the two-dimensional code area can be adjusted to the target brightness value no matter the two-dimensional code displayed in a mobile phone screen or the paper two-dimensional code is displayed in an outdoor strong backlight scene, and the two-dimensional code identification rate is ensured.
Fig. 3 is a schematic diagram of a third image processing process provided by the embodiment of the invention, as shown in fig. 3:
s301: the method comprises the steps of monitoring that a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device, and determining a first reduction proportion of a first average brightness value of the first image.
S302: a first gain value and a first dynamic range value of the first image are obtained.
S303: if the first gain value is not larger than the gain value threshold value and the first dynamic range value is larger than the preset dynamic range threshold value, determining a fourth improvement proportion of the contrast value of the first image, a fifth improvement proportion of the noise reduction parameter value and a first wide dynamic intensity value of the wide dynamic intensity value.
S304: and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
S305: and acquiring a second average brightness value of the two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to be a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
It can be understood that, if the first gain value is not greater than the gain value threshold and the first dynamic range value is not greater than the preset dynamic range threshold, the scene may be considered as a daytime indoor scene, the first reduction ratio of the first average brightness value may be determined, and the first average brightness value of the first image may be adjusted to obtain the second image, where the contrast value, the sharpness value, the noise reduction parameter value, and the like of the first image may not be adjusted. And then, acquiring a second average brightness value of the two-dimension code area in the second image, and if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimension code area to be the target brightness value.
In the embodiment of the invention, the adjustment proportions of the contrast value, the definition value, the noise reduction parameter value and the like of the first image under different scenes can be determined by comparing the gain with the gain threshold value and the size relation between the dynamic range and the dynamic range threshold value, so that the entrance guard intercom device can correspondingly adjust the first average brightness value, the contrast value, the definition value and the like of the first image according to the determined result to obtain the second image, thereby improving the two-dimensional code recognition rate.
Example 3:
in order to improve the efficiency of two-dimensional code identification, on the basis of the foregoing embodiments, in an embodiment of the present invention, the method further includes:
determining a fourth image to be processed according to a set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in each fourth image;
if so, taking the fourth image as a first image, adjusting a first average brightness value of the first image to obtain a second image, adjusting a second average brightness value of the two-dimensional code area to be the target brightness value when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In order to improve the image processing efficiency, in the embodiment of the present invention, a fourth image to be processed may be determined according to a set polling frequency for each third image acquired by the door access intercom device within a first set time period after the first image is acquired. The first set time period can be flexibly set according to requirements, and can be 3 seconds, 10 seconds, 15 seconds and the like.
The polling frequency may be flexibly set as needed, and may be, for example, one polling for 1 frame of image at a time, or one polling for 1 second. In general, it takes about 2 frames of image time, i.e., 0.08 seconds, to adjust the brightness value of the first image where the two-dimensional code exists to a preset target brightness value. The brightness value of the first image without the two-dimensional code but with the face is increased to be adjusted to the preset target face brightness value, so that the whole process of recognizing the face in the first image needs about 4 frames of image time, namely 0.16 seconds. In one possible implementation, in order to process each third image acquired by the doorway intercom device in time, the polling frequency may be set to be one time polling for 1 frame of image. It can be understood that if the polling frequency is 1 frame of time polling, each third image acquired by the door access intercom device may be determined as a fourth image to be processed. If the polling frequency is one polling at a time of 2 frames of images, the extracted third image may be determined as a fourth image to be processed at a frequency of extracting 1 frame of third image every 2 frames of third images.
In this embodiment of the present invention, after determining the fourth image to be processed, it may be determined whether the fourth image has the two-dimensional code, where the determining that the fourth image has the two-dimensional code at least includes: not only the face exists, but also the two-dimensional code exists; and only the two-dimension code exists, and no human face exists.
If a two-dimensional code exists in the fourth image, the fourth image with the two-dimensional code may be used as the first image, the first image is subjected to image processing based on the same image processing manner as the first image, that is, the first average brightness value of the first image is adjusted based on the first reduction ratio to obtain the second image, the second average brightness value of the two-dimensional code region in the second image is obtained, and if the second average brightness value is not the preset target brightness value, the second average brightness value of the two-dimensional code region is adjusted to the target brightness value, and the two-dimensional code in the two-dimensional code region with the adjusted brightness value is identified.
It can be understood that if the second average brightness value of the two-dimensional code region in the second image is the preset target brightness value, the brightness value of the second image may not be adjusted, and the two-dimensional code in the two-dimensional code region may be directly identified.
That is to say, within a first set duration after the first image is acquired, if the two-dimensional code exists in the fourth image, the fourth image in which the two-dimensional code exists is taken as the first image, and the fourth image is subjected to image processing by using the image processing method of the first image in the above embodiment, which is not described herein again.
According to the embodiment of the invention, if the two-dimensional code exists in the fourth image within the first set time length after the first image is acquired, the fourth image with the two-dimensional code can be used as the first image, the same image processing mode as the first image is adopted, and the adjustment proportion of the brightness value, the contrast value, the definition value, the noise reduction parameter value or the wide dynamic strength value of the fourth image does not need to be determined again from the beginning, so that the image processing efficiency and the two-dimensional code identification efficiency are improved.
In a possible implementation manner, a user may simultaneously give each person a paper two-dimensional code or a two-dimensional code displayed in a mobile phone screen to a plurality of temporary people, so that the door access intercom device can identify each two-dimensional code to allow each temporary person to enter. In order to improve image processing efficiency and two-dimensional code recognition efficiency in a scene when the plurality of temporary personnel continuously place respective two-dimensional codes in the entrance guard intercom device, in a first set duration after the first image is obtained, a fourth image to be processed can be determined according to a set polling frequency for each third image obtained by the entrance guard intercom device, whether the two-dimensional codes exist in the fourth image is judged for each fourth image, if yes, the fourth image is directly used as the first image for image processing, and the adjustment proportions of the brightness value, the contrast value, the definition value, the noise reduction parameter value or the wide dynamic strength value and the like of the fourth image do not need to be re-determined from the beginning, so that the image processing efficiency and the two-dimensional code recognition efficiency are improved, and user experience is improved.
Example 4:
in order to improve the flexibility of face and two-dimensional code recognition, on the basis of the foregoing embodiments, in an embodiment of the present invention, the method further includes:
and if the two-dimensional code does not exist in the fourth image but the face exists, adjusting the image parameter value of the fourth image to be the set target face image parameter value, and identifying the face in the fourth image after the image parameter value is adjusted.
If the two-dimensional code does not exist in the fourth image but the face exists within the first set time length after the first image is acquired, it can be considered that face image processing and face recognition need to be performed on the monitored face at this time. Specifically, the image parameter value of the fourth image including the face may be adjusted to the set target face image parameter value, and the face in the fourth image after the image parameter value adjustment is identified. Specifically, the image parameter value of the fourth image may be adjusted to the set target face image parameter value by using the prior art, and the face in the fourth image is recognized, which is not described herein again.
For convenience of understanding, the image processing procedure provided by the embodiment of the present invention is described in detail below by using a specific embodiment. Fig. 4 is a schematic diagram of a fourth image processing process provided by the embodiment of the present invention, as shown in fig. 4:
s401: if the two-dimensional code exists in the first image currently acquired by the entrance guard intercom device, determining a first reduction ratio of the first average brightness value of the first image.
S402: a first gain value and a first dynamic range value of the first image are obtained.
S403: and if the first gain value is larger than the preset gain value threshold, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value, and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
For convenience of understanding, in one possible embodiment, an adjustment mode for correspondingly adjusting the first average brightness value, the contrast value, and the sharpness value of the first image based on the first reduction ratio, the second reduction ratio, and the third increase ratio may be referred to as a linear black-and-white two-dimensional code configuration mode.
S404: if the first gain value is not larger than the gain value threshold value and the first dynamic range value is larger than the preset dynamic range threshold value, determining a fourth improvement proportion of the contrast value of the first image, a fifth improvement proportion of the noise reduction parameter value and a first wide dynamic intensity value of the wide dynamic intensity value, and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
For convenience of understanding, in one possible embodiment, an adjustment mode for correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter value, and the wide dynamic intensity value of the first image based on the first reduction ratio, the fourth improvement ratio, the fifth improvement ratio, and the first wide dynamic intensity value may be referred to as a wide dynamic two-dimensional code configuration mode.
S405: if the first gain value is not larger than the gain value threshold value and the first dynamic range value is smaller than a preset dynamic range threshold value, the first average brightness value of the first image is adjusted based on a first reduction ratio to obtain a second image.
For convenience of understanding, in one possible embodiment, an adjustment mode for adjusting the first average luminance value of the first image based on only the first reduction ratio may be referred to as a linear color two-dimensional code configuration mode.
S406: and determining fourth images to be processed according to the set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, judging whether a two-dimensional code exists in each fourth image, if so, performing S407, and if not, performing S408, but a human face exists.
S407: and when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area with the adjusted brightness value.
S408: and adjusting the image parameter value of the fourth image to the set target face image parameter value, and identifying the face in the fourth image after the image parameter value is adjusted.
Example 5:
in order to improve the efficiency of recognizing the face and the two-dimensional code, on the basis of the above embodiment, in the embodiment of the present invention, if there is no two-dimensional code but there is a face in the first image currently acquired by the monitoring door access intercom device, the image parameter value of the first image is adjusted to the set target face image parameter value, and the face in the first image after the image parameter value is adjusted is recognized.
In the embodiment of the invention, the entrance guard intercom device can identify the face and the two-dimensional code. Specifically, when the face exists in the first image that monitoring entrance guard's intercom equipment obtained at present, had the two-dimensional code again, carry out two-dimensional code image processing and discernment two-dimensional code to first image, the preferred discernment two-dimensional code promptly.
The embodiment of the invention can directly enter the two-dimension code recognition mode by recognizing whether the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, and preferentially enters the two-dimension code recognition mode when the face and the two-dimension code simultaneously exist in the first image. Compared with the technical scheme that the main screen interface of the access control intercom device is mainly in the face recognition mode, if a user needs to perform two-dimensional code recognition, the user needs to manually click the switching button in the main screen interface and switch the face recognition mode of the access control intercom device into the two-dimensional code recognition mode to recognize the two-dimensional code, the embodiment of the invention does not need to arrange the switching button for switching from the face recognition mode to the two-dimensional code recognition mode on the main screen interface of the access control intercom device, simplifies user operation and improves user experience.
In the embodiment of the invention, when the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, but the face exists, the face image processing and the face recognition can be performed on the first image, that is, the image parameter value of the first image can be adjusted to the set target face image parameter value, and the face in the first image after the image parameter value adjustment is recognized. Specifically, the image parameter value of the first image may be adjusted to the set target face image parameter value by using the prior art, and the face in the first image after the image parameter value adjustment is identified, which is not described herein again.
In the embodiment of the invention, when the door access intercom device monitors that the two-dimensional code exists in the first image, the door access intercom device adopts an image processing mode corresponding to the two-dimensional code to identify the two-dimensional code. Correspondingly, when the two-dimension code does not exist in the monitored first image and the face exists, the face is recognized by adopting an image processing mode corresponding to the face, so that a switching button for switching from the face recognition mode to the two-dimension code recognition mode does not need to be arranged on a screen main interface of the entrance guard intercom device, manual operation of a user is not needed, the entrance guard intercom device can intelligently and simply select the corresponding image processing mode and the two-dimension code or the face recognition mode, user operation is simplified, and user experience is improved.
In a possible implementation manner, the access control intercom device may set a default image processing mode to perform image processing on the monitored first image. For example, the access control intercom device may perform image processing on the first image by default in an existing image processing manner of global exposure.
In order to improve the recognition rate of the two-dimensional code when the two-dimensional code exists in the first image, a corresponding two-dimensional code image processing mode may be started in advance. Specifically, the two-dimensional code image processing mode may adopt the two-dimensional code image processing mode in embodiments 1 to 4 described above.
Similarly, in order to improve the recognition rate of the face when the two-dimensional code does not exist in the first image but the face exists, the corresponding face image processing mode may be started in advance. Specifically, the face image processing mode in the embodiment of the present invention may be adopted as the face image processing mode.
It can be understood that if the corresponding two-dimension code image processing mode is not opened in advance, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the first image is subjected to image processing by adopting the default image processing mode of the entrance guard intercom device. When a corresponding two-dimension code image processing mode is opened in advance, if a two-dimension code exists in a first image currently acquired by the monitoring entrance guard intercom device, the corresponding two-dimension code image processing mode is adopted to perform image processing on the first image, so that the two-dimension code recognition rate is improved.
Similarly, if the corresponding face image processing mode is not opened in advance, the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, and when the face exists, the default image processing mode of the entrance guard intercom device is adopted to perform image processing on the first image. When the corresponding face image processing mode is opened in advance, if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, and when a face exists, the corresponding face processing mode is adopted to perform image processing on the first image, so that the face recognition rate is improved.
In a possible implementation manner, in order to improve the space for selectable operation of the access intercom device, a face image processing mode switch and a two-dimensional code image processing mode switch may be set at a client such as a WEB of the access intercom device. In general, in order to improve the two-dimensional code recognition rate and the face recognition rate, both a face image processing mode switch and a two-dimensional code image processing mode switch in a client such as a WEB of the access intercom device may be turned on in advance.
In the embodiment of the present invention, even if the face image processing mode is turned on, when the face and the two-dimensional code are simultaneously present in the first image acquired by the monitoring access intercom device, or the two-dimensional code is present in the first image but the face is not present, the two-dimensional code image processing and the two-dimensional code in the first image are preferentially performed, that is, in the embodiment of the present invention, the two-dimensional code is preferentially processed and identified compared with the face.
For convenience of understanding, the image processing procedure provided by the embodiment of the present invention is described in detail below by using a specific embodiment. Fig. 5 is a schematic diagram of a fifth image processing process according to an embodiment of the present invention, as shown in fig. 5:
s501: the entrance guard intercom device monitors whether a human face or a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device by adopting a default global exposure image processing mode, and S502 and S511 are carried out.
S502: the entrance guard intercom device judges whether a switch of the two-dimensional code image processing mode is opened, if so, S503 is carried out, and if not, S509 is carried out.
S503: and monitoring whether the two-dimensional code exists in the first image currently acquired by the entrance guard intercom device, and if so, performing S504.
S504: a first reduction ratio of the first average luminance value of the first image is determined, and the first average luminance value of the first image is adjusted based on the first reduction ratio.
After determining a first reduction ratio of the first average brightness value of the first image, a first gain value and a first dynamic range value of the first image can be obtained;
if the first gain value is larger than the preset gain value threshold, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value, and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
If the first gain value is not greater than the gain value threshold and the first dynamic range value is greater than the preset dynamic range threshold, a fourth improvement proportion of the contrast value of the first image, a fifth improvement proportion of the noise reduction parameter value and a first wide dynamic intensity value of the wide dynamic intensity value can be determined, and the first average brightness value, the contrast value, the noise reduction parameter value and the wide dynamic intensity value of the first image are correspondingly adjusted based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
It can be understood that, if the first gain value is not greater than the gain threshold value and the first dynamic range value is smaller than the preset dynamic range threshold value, the first average brightness value of the first image is adjusted based on the first reduction ratio to obtain the second image.
S505: and acquiring a second average brightness value of a two-dimensional code area in a second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to be a target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
S506: and determining fourth images to be processed according to the set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, judging whether a two-dimensional code exists in each fourth image, if so, performing S507, and if not, performing S512, but a human face exists.
S507: and when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to be a target brightness value, and identifying the two-dimensional code in the two-dimensional code area with the adjusted brightness value.
S508: after the first set time period is exceeded, S501 is performed.
S509: monitoring whether the two-dimensional code exists in a first image currently acquired by the entrance guard intercom device, if so, performing S510, and if not, performing S501.
S510: the two-dimensional code in the first image is recognized and S501 is performed.
S511: the entrance guard intercom device judges whether a switch of the face image processing mode is opened or not, if yes, S512 and S503 are carried out, and if not, S503 is carried out.
S512: monitoring whether the two-dimensional code does not exist in the first image currently acquired by the entrance guard intercom device, but the face exists, if so, performing S513, and if the two-dimensional code does not exist, the face does not exist, performing S501.
S513: and adjusting the image parameter value of the first image to the set target face image parameter value, and identifying the face in the first image after the image parameter value is adjusted.
In an indoor scene, the brightness value of the first image may be generally increased to adjust to a set target face brightness value, so as to identify the face in the first image.
S514: determining a sixth image to be processed according to a set polling frequency for each fifth image acquired by the access intercom device within a second set time length after the first image is acquired, and judging whether a two-dimensional code exists in the sixth image for each sixth image; if so, S504 is performed with the sixth image as the first image, and if there is no two-dimensional code but there is a face, S513 is performed.
The second set time period may be flexibly set according to a requirement, for example, the second set time period may be 3 seconds, 10 seconds, 15 seconds, and the like, and the first set time period and the second set time period may be the same or different.
S515: after the second set time period is exceeded, S501 is performed.
Example 6:
fig. 6 is a schematic diagram of an image processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, on the basis of the foregoing embodiments, the image processing apparatus according to an embodiment of the present invention includes:
the monitoring module 61 is used for monitoring whether the two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
a first adjusting module 62, configured to determine a first reduction ratio of a first average luminance value of the first image if the two-dimensional code exists in the first image, and adjust the first average luminance value of the first image based on the first reduction ratio to obtain a second image;
the second adjusting module 63 is configured to obtain a second average brightness value of the two-dimensional code region in the second image, adjust the second average brightness value of the two-dimensional code region to the target brightness value if the second average brightness value is not a preset target brightness value, and identify the two-dimensional code in the two-dimensional code region after the brightness value adjustment.
In a possible embodiment, the apparatus further comprises:
a first determining module, configured to obtain a first gain value and a first dynamic range value of the first image after determining a first reduction ratio of a first average brightness value of the first image; if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the first adjusting module 62 is specifically configured to correspondingly adjust the first average brightness value, the contrast value, and the sharpness value of the first image based on the first reduction ratio, the second reduction ratio, and the third improvement ratio to obtain a second image.
In a possible implementation manner, if the first gain value is not greater than the gain threshold value and the first dynamic range value is greater than the preset dynamic range threshold value, the apparatus further includes:
a second determination module for determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of the noise reduction parameter value, and a first wide dynamic intensity value of the wide dynamic intensity values;
the first adjusting module 62 is specifically configured to correspondingly adjust the first average brightness value, the contrast value, the noise reduction parameter, and the wide dynamic intensity value of the first image based on the first reduction ratio, the fourth improvement ratio, the fifth improvement ratio, and the first wide dynamic intensity value, so as to obtain a second image.
In a possible embodiment, the apparatus further comprises:
the polling module is used for determining a fourth image to be processed according to a set polling frequency for each third image acquired by the entrance guard intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in the fourth image for each fourth image;
and the third adjusting module is configured to, if the fourth image has the two-dimensional code, use the fourth image as the first image, adjust the first average brightness value of the first image to obtain a second image, adjust the second average brightness value of the two-dimensional code region to the target brightness value when the second average brightness value of the two-dimensional code region in the second image is not the preset target brightness value, and identify the two-dimensional code in the two-dimensional code region with the adjusted brightness value.
In a possible embodiment, the apparatus further comprises:
and the fourth adjusting module is used for adjusting the image parameter value of the fourth image to a set target face image parameter value if the two-dimensional code does not exist in the fourth image but the face exists, and identifying the face in the fourth image after the image parameter value is adjusted.
In a possible embodiment, the apparatus further comprises:
and the fifth adjusting module is used for adjusting the image parameter value of the first image to a set target face image parameter value if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device but the face exists, and identifying the face in the first image after the image parameter value is adjusted.
According to the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
Example 7:
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 7, including: the system comprises a processor 71, a communication interface 72, a memory 73 and a communication bus 74, wherein the processor 71, the communication interface 72 and the memory 73 are communicated with each other through the communication bus 74;
the memory 73 has stored therein a computer program which, when executed by the processor 71, causes the processor 71 to perform the steps of:
monitoring whether a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
if so, determining a first reduction ratio of a first average brightness value of the first image, and adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image;
and acquiring a second average brightness value of a two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In a possible implementation, the processor 71 is further configured to, after the determining of the first reduction ratio of the first average brightness value of the first image, obtain a first gain value and a first dynamic range value of the first image; if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value; and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
In a possible embodiment, the processor 71 is further configured to determine a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of the noise reduction parameter value, and a first wide dynamic intensity value of the wide dynamic intensity values if the first gain value is not greater than the gain value threshold and the first dynamic range value is greater than the preset dynamic range threshold; and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
In a possible implementation manner, the processor 71 is further configured to determine, according to a set polling frequency, fourth images to be processed for each third image acquired by the door access intercom device within a first set duration after the first image is acquired, and determine, for each fourth image, whether a two-dimensional code exists in the fourth image; if so, taking the fourth image as a first image, adjusting a first average brightness value of the first image to obtain a second image, adjusting a second average brightness value of the two-dimensional code area to be the target brightness value when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In a possible embodiment, the processor 71 is further configured to, if the two-dimensional code does not exist in the fourth image but a human face exists, adjust the image parameter value of the fourth image to the set target human face image parameter value, and identify the human face in the fourth image after the image parameter value is adjusted.
In a possible implementation manner, the processor 71 is further configured to, if there is no two-dimensional code in a first image currently acquired by the monitoring door access intercom device but there is a human face, adjust an image parameter value of the first image to a set target human face image parameter value, and identify the human face in the first image after the image parameter value is adjusted.
Because the principle of the electronic device for solving the problem is similar to the image processing method, the implementation of the electronic device can refer to the implementation of the method, and repeated details are not repeated.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface 72 is used for communication between the above-described electronic apparatus and other apparatuses.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a central processing unit, a Network Processor (NP), and the like; but may also be a Digital instruction processor (DSP), an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
According to the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
Example 8:
on the basis of the foregoing embodiments, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
monitoring whether a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
if so, determining a first reduction ratio of a first average brightness value of the first image, and adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image;
and acquiring a second average brightness value of the two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In a possible implementation, after the determining the first reduction ratio of the first average luminance value of the first image, the method further includes:
acquiring a first gain value and a first dynamic range value of the first image;
if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
In a possible implementation manner, if the first gain value is not greater than the gain threshold value and the first dynamic range value is greater than the preset dynamic range threshold value, the method further includes:
determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of a noise reduction parameter value, and a first wide dynamic intensity value of wide dynamic intensity values;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
In one possible embodiment, the method further comprises:
determining a fourth image to be processed according to a set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in each fourth image;
if so, taking the fourth image as a first image, adjusting a first average brightness value of the first image to obtain a second image, adjusting a second average brightness value of the two-dimensional code area to be the target brightness value when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
In one possible embodiment, the method further comprises:
and if the two-dimensional code does not exist in the fourth image but the face exists, adjusting the image parameter value of the fourth image to be the set target face image parameter value, and identifying the face in the fourth image after the image parameter value is adjusted.
In one possible embodiment, the method further comprises:
if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, but the face exists, adjusting the image parameter value of the first image to the set target face image parameter value, and identifying the face in the first image after the image parameter value is adjusted.
The computer readable storage medium may be any available media or data storage device that can be accessed by a processor in an electronic device, including but not limited to magnetic memory such as floppy disks, hard disks, magnetic tape, magneto-optical disks (MOs), etc., optical memory such as CDs, DVDs, BDs, HVDs, etc., and semiconductor memory such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND FLASH), Solid State Disks (SSDs), etc.
According to the embodiment of the invention, when the two-dimension code exists in the first image currently acquired by the entrance guard intercom device, the brightness value of the first image is reduced to obtain the second image, and if the second average brightness value of the two-dimension code area is not the preset target brightness value, the second average brightness value of the two-dimension code area is adjusted to the target brightness value, so that the brightness of the two-dimension code area is ensured, and the recognition rate of the two-dimension code is improved.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (8)
1. An image processing method, characterized in that the method comprises:
monitoring whether a two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
if so, determining a first reduction ratio of a first average brightness value of the first image, and adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image;
acquiring a second average brightness value of a two-dimensional code area in the second image, if the second average brightness value is not a preset target brightness value, adjusting the second average brightness value of the two-dimensional code area to the target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted;
after the determining the first reduction ratio of the first average luminance value of the first image, the method further comprises:
acquiring a first gain value and a first dynamic range value of the first image;
if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value and the definition value of the first image based on the first reduction proportion, the second reduction proportion and the third improvement proportion to obtain a second image.
2. The method of claim 1, wherein if the first gain value is not greater than the gain value threshold and the first dynamic range value is greater than a predetermined dynamic range threshold, the method further comprises:
determining a fourth improvement ratio of the contrast value of the first image, a fifth improvement ratio of a noise reduction parameter value, and a first wide dynamic intensity value of wide dynamic intensity values;
the adjusting the first average brightness value of the first image based on the first reduction ratio to obtain a second image includes:
and correspondingly adjusting the first average brightness value, the contrast value, the noise reduction parameter and the wide dynamic intensity value of the first image based on the first reduction proportion, the fourth improvement proportion, the fifth improvement proportion and the first wide dynamic intensity value to obtain a second image.
3. The method of claim 1, further comprising:
determining a fourth image to be processed according to a set polling frequency for each third image acquired by the access intercom device within a first set time length after the first image is acquired, and judging whether a two-dimensional code exists in each fourth image;
if so, taking the fourth image as a first image, adjusting a first average brightness value of the first image to obtain a second image, adjusting a second average brightness value of the two-dimensional code area to be the target brightness value when the second average brightness value of the two-dimensional code area in the second image is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted.
4. The method of claim 3, further comprising:
and if the two-dimensional code does not exist in the fourth image but the face exists, adjusting the image parameter value of the fourth image to be the set target face image parameter value, and identifying the face in the fourth image after the image parameter value is adjusted.
5. The method of claim 1, further comprising:
if the two-dimensional code does not exist in the first image currently acquired by the monitoring entrance guard intercom device, but the face exists, adjusting the image parameter value of the first image to the set target face image parameter value, and identifying the face in the first image after the image parameter value is adjusted.
6. An image processing apparatus, characterized in that the apparatus comprises:
the monitoring module is used for monitoring whether the two-dimensional code exists in a first image currently acquired by the entrance guard intercom device;
a first adjusting module, configured to determine a first reduction ratio of a first average luminance value of the first image if the two-dimensional code exists in the first image, and adjust the first average luminance value of the first image based on the first reduction ratio to obtain a second image;
the second adjusting module is used for acquiring a second average brightness value of a two-dimensional code area in the second image, adjusting the second average brightness value of the two-dimensional code area to be the target brightness value if the second average brightness value is not a preset target brightness value, and identifying the two-dimensional code in the two-dimensional code area after the brightness value is adjusted;
a first determining module, configured to obtain a first gain value and a first dynamic range value of the first image after determining a first reduction ratio of a first average brightness value of the first image; if the first gain value is larger than a preset gain value threshold value, determining a second reduction proportion of the contrast value of the first image and a third improvement proportion of the definition value;
the first adjusting module is specifically configured to correspondingly adjust a first average brightness value, a contrast value, and a sharpness value of the first image based on the first reduction ratio, the second reduction ratio, and the third improvement ratio to obtain a second image.
7. An electronic device, characterized in that the electronic device comprises at least a processor and a memory, the processor being adapted to carry out the steps of the image processing method according to any of claims 1-5 when executing a computer program stored in the memory.
8. A computer-readable storage medium, characterized in that it stores a computer program which, when being executed by a processor, carries out the steps of the image processing method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010782450.6A CN112036201B (en) | 2020-08-06 | 2020-08-06 | Image processing method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010782450.6A CN112036201B (en) | 2020-08-06 | 2020-08-06 | Image processing method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112036201A CN112036201A (en) | 2020-12-04 |
CN112036201B true CN112036201B (en) | 2022-06-17 |
Family
ID=73582518
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010782450.6A Active CN112036201B (en) | 2020-08-06 | 2020-08-06 | Image processing method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112036201B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112863010B (en) * | 2020-12-29 | 2022-08-05 | 宁波友好智能安防科技有限公司 | Video image processing system of anti-theft lock |
CN113177426A (en) * | 2021-05-20 | 2021-07-27 | 浙江大华技术股份有限公司 | Two-dimensional code detection method and device |
CN113641431A (en) * | 2021-08-04 | 2021-11-12 | 青岛海信移动通信技术股份有限公司 | Method and terminal equipment for enhancing display of two-dimensional code |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106855934A (en) * | 2015-12-09 | 2017-06-16 | 阿里巴巴集团控股有限公司 | The display methods and device of the barcode scanning page |
CN107818283A (en) * | 2017-11-02 | 2018-03-20 | 深圳天珑无线科技有限公司 | Quick Response Code image pickup method, mobile terminal and computer-readable recording medium |
CN108763999B (en) * | 2018-04-17 | 2021-08-17 | 维沃移动通信有限公司 | Bar code identification method and terminal equipment |
CN109510948B (en) * | 2018-09-30 | 2020-11-17 | 先临三维科技股份有限公司 | Exposure adjusting method, exposure adjusting device, computer equipment and storage medium |
CN110210272A (en) * | 2019-06-10 | 2019-09-06 | 北京意锐新创科技有限公司 | Access control equipment control method and device based on invisible two-dimensional codes |
CN111083388B (en) * | 2019-12-26 | 2021-04-16 | 浙江大华技术股份有限公司 | Light supplement lamp control method and device, electronic equipment and storage medium |
-
2020
- 2020-08-06 CN CN202010782450.6A patent/CN112036201B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112036201A (en) | 2020-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112036201B (en) | Image processing method, device, equipment and medium | |
CN109166261B (en) | Image processing method, device and equipment based on image recognition and storage medium | |
CN108322646B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
US9934438B2 (en) | Scene recognition method and apparatus | |
CN108377345B (en) | Exposure parameter value determination method and device, multi-view camera and storage medium | |
US9137456B2 (en) | Intelligent auto-exposure bracketing | |
US11425309B2 (en) | Image capture method and apparatus | |
CN111614892B (en) | Face image acquisition method, shooting device and computer-readable storage medium | |
US20140232895A1 (en) | Method and System for Adjusting Exposure Settings of Video Cameras | |
US11678180B2 (en) | Iris recognition workflow | |
CN104200431A (en) | Processing method and processing device of image graying | |
CN111028792B (en) | Display control method and device | |
CN110971841B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
CN107690804B (en) | Image processing method and user terminal | |
US20180365836A1 (en) | Image processing method and related camera device and camera system | |
EP3672221A1 (en) | Imaging device and imaging method | |
CN106941588B (en) | Data processing method and electronic equipment | |
CN110868547A (en) | Photographing control method, photographing control device, electronic equipment and storage medium | |
CN110971833B (en) | Image processing method and device, electronic equipment and storage medium | |
CN115205172A (en) | Image processing method and device, electronic equipment and storage medium | |
CN115767260A (en) | Anti-overexposure processing method and device, image acquisition equipment and storage medium | |
CN113422893B (en) | Image acquisition method and device, storage medium and mobile terminal | |
CN111915529B (en) | Dim light enhancement method and device for video, mobile terminal and storage medium | |
CN114125293B (en) | Image quality control method, device, medium and equipment for double-light camera | |
CN112801932A (en) | Image display method, image display device, electronic equipment and storage medium |
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 |