WO2023184863A9 - 补光方法、装置、设备、存储介质及补光亮度调整装置 - Google Patents

补光方法、装置、设备、存储介质及补光亮度调整装置 Download PDF

Info

Publication number
WO2023184863A9
WO2023184863A9 PCT/CN2022/117077 CN2022117077W WO2023184863A9 WO 2023184863 A9 WO2023184863 A9 WO 2023184863A9 CN 2022117077 W CN2022117077 W CN 2022117077W WO 2023184863 A9 WO2023184863 A9 WO 2023184863A9
Authority
WO
WIPO (PCT)
Prior art keywords
image
brightness
fill light
sensor
fill
Prior art date
Application number
PCT/CN2022/117077
Other languages
English (en)
French (fr)
Other versions
WO2023184863A1 (zh
Inventor
高坡
Original Assignee
北京京东乾石科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京京东乾石科技有限公司 filed Critical 北京京东乾石科技有限公司
Publication of WO2023184863A1 publication Critical patent/WO2023184863A1/zh
Publication of WO2023184863A9 publication Critical patent/WO2023184863A9/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods 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/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods 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/1404Methods for optical code recognition
    • G06K7/146Methods for optical code recognition the method including quality enhancement steps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Definitions

  • the present disclosure relates to the field of sensor technology, and specifically, to a fill light method, device, electronic equipment, readable storage medium, and fill light brightness adjustment device.
  • the Automated Guided Vehicle mainly uses QR codes for navigation.
  • the QR code navigation sensor is its core component and can provide the AGV with accurate information in the warehouse. The position and pose information of the AGV relative to the QR code.
  • the QR code navigation sensor is similar to the commonly used QR code reader. It first uses a camera to take pictures and then analyzes the pictures. The quality of the captured pictures is the most important decisive factor affecting the analysis results.
  • the QR code navigation sensor When the QR code navigation sensor is working, it will move at high speed with the AGV, so the camera generally uses a global shutter with a fixed shutter time. In order to ensure sufficient lighting within the imaging field of view, the QR code navigation sensor is usually equipped with a fill light panel, which can provide fill light to the photographed area.
  • the QR code navigation sensor In order to install the QR code navigation sensor quickly and easily in the compact AGV internal space, its size needs to be designed as small as possible. From the perspective of AGV motion control, the decodable field of view of the QR code navigation sensor is also required to be as large as possible.
  • the fill light board is generally installed inside the QR code navigation sensor, so compactly distributed lamp beads are usually used as the light source of the fill light board to illuminate an imaging field of view that is much larger than the size of the fill light board.
  • a fill light method including: obtaining a plurality of candidate fill light schemes according to a fill light source provided in a sensor; for each of the plurality of candidate fill light schemes, When the sensor is shooting, the fill light source is controlled to fill in light according to the candidate fill light scheme to obtain the first image captured; the first image is partitioned and processed to obtain the center of the first image area and corner area; obtain the average brightness of the center area of the first image and the average brightness of the corner area of the first image; based on the average brightness of the center area of the first image and the corner area of the first image The average brightness of the area is used to obtain a brightness difference index value; the candidate fill light scheme with the smallest brightness difference index value among the plurality of candidate fill light schemes is determined as the target fill light scheme to control the sensor when shooting The fill light source performs fill light according to the target fill light scheme.
  • the angular area of the first image includes multiple angular areas of the first image; according to the average brightness of the central area of the first image and the angular area of the first image Obtaining the brightness difference index value based on the average brightness of the first image includes: obtaining the average value of the difference between the average brightness of the central area of the first image and the average brightness of each corner area of the first image as the brightness difference index value. .
  • the method further includes: determining whether the average brightness of the central area of the first image is less than a first brightness threshold, the first brightness threshold being obtained according to the number of sampling bits of the sensor; Determining the candidate fill light scheme with the smallest brightness difference index value among the plurality of candidate fill light schemes as the target fill light scheme includes: if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold , the candidate fill-in light scheme with the smallest brightness difference index value among the plurality of candidate fill-in-light schemes is determined as the target fill-in-light scheme.
  • the method further includes: determining whether the average brightness of the central area of the first image is greater than a second brightness threshold.
  • the second brightness threshold is calculated by multiplying the first brightness threshold by a predetermined value.
  • the coefficient is obtained; if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold, the candidate fill light scheme with the smallest brightness difference index value among the plurality of candidate fill light schemes is determined as the target.
  • the supplementary light scheme includes: if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold, and it is determined that the average brightness of the central area of the first image is greater than the second brightness threshold, the Among the plurality of candidate fill-in light schemes, the candidate fill-in light scheme with the smallest brightness difference index value is determined as the target fill-in light scheme.
  • performing partition processing on the first image to obtain the central area and corner areas of the first image includes: evenly dividing the first image into a target number of sub-areas; The sub-region at the center of the first image is taken as the central region of the first image; the sub-regions at the four corners of the first image are taken as the corner regions of the first image.
  • the supplementary light source includes a plurality of lamp bead groups, and each of the plurality of lamp bead groups includes a plurality of brightness levels; multiple brightness levels are obtained according to the supplementary light source provided in the sensor.
  • a candidate supplementary light scheme includes: traversing and setting each brightness level for each of the plurality of lamp bead groups to obtain the plurality of candidate supplementary light schemes.
  • a supplementary light brightness adjustment device including: used to implement any of the above methods.
  • the device includes: a first fixing structure for fixing a sensor; a second fixing structure for for fixing the evaluation board; a connection structure for connecting the first fixed structure and the second fixed structure so that the evaluation board is located directly in front of the camera of the sensor; an adjustment structure provided on the connection structure on, used to adjust the distance between the evaluation board and the sensor; a controller, connected to the sensor, used to control the sensor to traverse the candidate fill light scheme, and control the sensor to capture all the images through its camera
  • the evaluation board obtains the first image and performs any of the above methods.
  • a fill light device including: an acquisition module configured to obtain a plurality of candidate fill light solutions according to a fill light source provided in a sensor; and an image acquisition module configured to obtain a plurality of candidate fill light solutions for the plurality of fill light sources.
  • Each candidate fill-in light scheme among the candidate fill-in light schemes controls the fill-in light source to fill in light according to the candidate fill-in-light scheme when the sensor is shooting, and obtains the first image captured; an image processing module, used for Perform partition processing on the first image to obtain the central area and corner areas of the first image; a brightness optimization module used to obtain the average brightness of the central area of the first image and the corner areas of the first image
  • the average brightness of The candidate fill-in light scheme with the smallest brightness difference index value among the plurality of candidate fill-in light schemes is determined as the target fill-in light scheme, so that when the sensor is shooting, the fill-in light source is controlled according to the target fill-in light scheme. Fill light.
  • the corner area of the first image includes multiple corner areas of the first image; the brightness optimization module is also used to obtain the average brightness of the central area of the first image. The average value of the difference from the average brightness of each corner area of the first image is used as the brightness difference index value.
  • the brightness optimization module is further configured to determine whether the average brightness of the central area of the first image is less than a first brightness threshold, and the first brightness threshold is based on the sampling bit of the sensor.
  • the parameter determination module is further configured to, if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold, minimize the brightness difference index value among the plurality of candidate fill light schemes.
  • the candidate fill light solution is determined as the target fill light solution.
  • the brightness optimization module is further configured to determine whether the average brightness of the central area of the first image is greater than a second brightness threshold, the second brightness threshold being the first brightness The threshold is obtained by multiplying the preset coefficient; the parameter determination module is further configured to: if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold, and determine the average brightness of the central area of the first image. If the average brightness is greater than the second brightness threshold, the candidate fill-in light scheme with the smallest brightness difference index value among the plurality of candidate fill-in-light schemes is determined as the target fill-in-light scheme.
  • the image processing module is further configured to: uniformly divide the first image into a target number of sub-regions; and use the sub-region in the center of the first image as the first image. Center area; use the sub-areas of the four corners of the first image as the corner areas of the first image.
  • the supplementary light source includes a plurality of lamp bead groups, and each of the plurality of lamp bead groups includes a plurality of brightness levels; the acquisition module is also configured to: Each of the plurality of lamp bead groups traverses and sets each brightness level to obtain the plurality of candidate supplementary light solutions.
  • an electronic device including: a memory, a processor, and executable instructions stored in the memory and executable in the processor.
  • the processor executes the executable instructions. Implement any of the above methods when commanding.
  • a computer-readable storage medium on which computer-executable instructions are stored.
  • the executable instructions are executed by a processor, any one of the above methods is implemented.
  • the fill light source is controlled according to the candidate fill light when the sensor is shooting.
  • the solution is to perform fill light to obtain the first image captured, and then perform partition processing on the first image to obtain the central area and corner areas of the first image, and obtain the average brightness of the central area of the first image and the corner areas of the first image.
  • the average brightness of the area and then obtain the brightness difference index value based on the average brightness of the center area of the first image and the average brightness of the corner area of the first image, and finally select the candidate fill light with the smallest brightness difference index value among the multiple candidate fill light solutions.
  • the plan is determined as the target fill light plan, so that when the sensor is shooting, the fill light source is controlled to fill the light according to the target fill light plan.
  • Figure 1 shows a schematic view of a QR code navigation sensor.
  • Figure 2 shows a schematic diagram of the brightness distribution of a captured image.
  • Figure 3 shows a schematic diagram of the lamp bead grouping of a fill light panel.
  • Figure 4 shows a flow chart of a light filling method in an embodiment of the present disclosure.
  • FIG. 5 shows a schematic diagram of the process of step S406 shown in FIG. 4 in an embodiment.
  • Figure 6 shows a schematic diagram of a graphics segmentation scheme according to an exemplary embodiment.
  • FIG. 7 is a schematic diagram of an automatic adjustment process of fill light brightness shown in FIGS. 4 to 6 .
  • FIG. 8 is a schematic structural diagram of a supplementary light brightness adjustment device according to an exemplary embodiment.
  • FIG. 9 is a schematic structural diagram of another supplementary light brightness adjustment device according to an exemplary embodiment.
  • Figure 10 shows a block diagram of a light filling device in an embodiment of the present disclosure.
  • Figure 11 shows a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments.
  • the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale.
  • the same reference numerals in the drawings represent the same or similar parts, and thus their repeated description will be omitted.
  • first”, “second”, etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as “first” and “second” may explicitly or implicitly include one or more of these features.
  • “plurality” means at least two, such as two, three, etc., unless otherwise expressly and specifically limited.
  • the symbol “/” generally indicates that the related objects are an "or” relationship.
  • connection should be understood in a broad sense. For example, it can be electrically connected or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium.
  • connection should be understood in a broad sense. For example, it can be electrically connected or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium.
  • FIG 1 shows a schematic view of a QR code navigation sensor.
  • the fill light 104 is provided on the QR code navigation sensor 102.
  • the camera 1022 of the QR code navigation sensor 102 takes pictures, the fill light 104 will illuminate the field of view of the QR code navigation sensor 102. Fill in the area being photographed. If the brightness of the fill light is low, the brightness of the captured image will be dark; if the brightness of the fill light is too high, the captured image will be overexposed and the image will be distorted. Both situations will affect the decoding success rate and decoding accuracy.
  • the fill light board is generally installed inside the QR code navigation sensor, and usually uses a compact distribution of lamp beads to illuminate an imaging field of view that is much larger than the size of the fill light board.
  • the area within the imaging field of view that is close to the lamp bead has high brightness, and the area far from the lamp bead has low brightness.
  • the brightness somewhere within the imaging area is the superposition of the brightness of each lamp bead there. Therefore, the image brightness within the imaging field of view is generally bright in the center and dark in the four corners.
  • Figure 2 shows a schematic diagram of the brightness distribution of a captured image.
  • the x and y axes represent the two directions of the plane where the captured image is located
  • the z axis represents the brightness of each point on the captured image.
  • the central area of the captured image has a larger value on the z-axis, and the closer to the center, the larger the value, indicating that the center is brighter; the four corner areas of the captured image have smaller values on the z-axis, indicating that the four corners are darker.
  • the fill light panel is designed as an array of lamp beads, which is divided into different groups according to the area where the lamp beads are located. Each group is independently driven and has adjustable brightness. Therefore, in order to reduce the brightness difference between the center and the four corners of the field of view, it is necessary to finely adjust the brightness parameters and combinations of different groups of lamp beads on the fill light panel.
  • Figure 3 shows a schematic diagram of the lamp bead grouping of a fill light panel.
  • the lamp beads on the fill light panel are divided into three groups: lamp beads labeled “1”, lamp beads labeled “2” and lamp beads labeled “3”.
  • the lamp beads in different groups can be divided into three groups: lamp beads labeled “1”, lamp beads labeled “2” and lamp beads labeled “3”.
  • Set the brightness parameters and control them For example, the brightness of the lamp bead labeled "1" can be greater than the lamp bead labeled "2" and the lamp bead labeled "3".
  • the fill light panels in some related technologies have fixed brightness and cannot be adjusted.
  • the fill light panels in other related technologies have adjustable brightness, but manual adjustment of brightness parameters is required. In actual use, there are problems such as poor flexibility, cumbersome adjustment steps, and low efficiency.
  • the present disclosure provides a fill light method, for each of a plurality of candidate fill light solutions obtained according to the fill light source provided in the sensor, by controlling the fill light source according to the candidate when the sensor is shooting.
  • the fill light scheme performs fill light to obtain the first image captured, and then performs partition processing on the first image to obtain the central area and corner areas of the first image, and obtain the average brightness of the central area of the first image and the first image the average brightness of the corner area of the first image, and then obtain the brightness difference index value based on the average brightness of the center area of the first image and the average brightness of the corner area of the first image, and finally select the candidate with the smallest brightness difference index value among the multiple candidate fill light solutions.
  • the fill light scheme is determined as the target fill light scheme to realize automatic adjustment of the fill light brightness of the QR code navigation sensor. It can automatically evaluate the average brightness and uniformity of imaging, and then automatically adjust the brightness of each group of lamp beads on the fill light panel to find the optimal Brightness combination, thereby improving the sensor's decoding efficiency and accuracy.
  • FIG. 4 is a flow chart of a light filling method according to an exemplary embodiment. The method shown in FIG. 4 may, for example, be applied to the controller 814 in FIG. 8 or the power control display terminal 10 in FIG. 9 .
  • the method 40 provided by the embodiment of the present disclosure may include the following steps.
  • step S402 multiple candidate fill light solutions are obtained according to the fill light sources provided in the sensor.
  • the senor may be a QR code navigation sensor.
  • the fill light source may include one or more lamp bead groups, each of the one or more lamp bead groups includes multiple brightness levels, and each lamp bead group may be adjusted by setting parameters. brightness to form different candidate fill light solutions.
  • each brightness level can be traversed and set to obtain multiple candidate supplementary light solutions.
  • an algorithm with Multiple candidate fill light solutions for lamp bead groups with different brightness levels For example, assuming that the brightness of each lamp bead group has q adjustable levels, and the entire fill light panel has p lamp bead groups, then the entire fill light panel has q p brightness distributions, that is, there are q p candidate fill light solutions. .
  • step S404 for each candidate fill-light scheme among the plurality of candidate fill-light schemes, the fill-light source is controlled to perform fill-light according to the candidate fill-light scheme when the sensor is photographing, and the captured first image is obtained.
  • supplementary light is provided according to the correspondingly set brightness of each lamp bead group, and the sensor captures the first image.
  • step S406 partition processing is performed on the first image to obtain the center area and corner areas of the first image.
  • the corner area of the first image may include multiple corner areas of the first image.
  • the first image may be a rectangle and may include four corner areas.
  • the first image can be evenly divided into several sub-regions, the sub-region in the middle of the first image is selected as the central region, and the sub-regions at the four corners of the first image are selected as the corner regions.
  • the sub-regions at the four corners of the first image are selected as the corner regions.
  • step S408 the average brightness of the center area of the first image and the average brightness of the corner areas of the first image are obtained.
  • the average brightness of all pixels in the area can be calculated as the average brightness of the area.
  • step S410 a brightness difference index value is obtained based on the average brightness of the central area of the first image and the average brightness of the corner areas of the first image.
  • the average value of the difference between the average brightness of the central area of the first image and the average brightness of the respective corner areas of the first image can be obtained as the brightness difference index value.
  • the average value of the brightness difference ⁇ L [i, j] between the central area and the four corner areas of the first image It can be expressed as:
  • the respective brightness differences can be weighted and added as the brightness difference index value.
  • step S412 the candidate fill light scheme with the smallest brightness difference index value among the plurality of candidate fill light schemes is determined as the target fill light scheme, so that when the sensor is shooting, the fill light source is controlled to perform fill light according to the target fill light scheme.
  • the camera of the QR code navigation sensor collects a grayscale image, and the grayscale value of each pixel is equal to the brightness value.
  • the brightness of each pixel is an integer between 0 and 255.
  • white is 255 and black is 0.
  • the collected image brightness data is a data array with W rows and H columns in space, where each element is an integer between 0 and 255.
  • the average brightness of the central area of the first image can be expressed as L [n,n]
  • the first brightness threshold can be 2 m -1, where m is the number of sampling bits of the sensor, that is, L [n,n] ⁇ 2 m - 1.
  • L [n,n] ⁇ 255.
  • 2 m -1 is the maximum value of the brightness collection value, which is the maximum output value of the image sensor. After reaching this value, even if the brightness increases again, the output of the sensor will be this value.
  • ADC Analog-to-Digital Converter
  • the average brightness of the central area of the first image can be expressed as L [n, n]
  • the second brightness threshold can be ⁇ *(2 m -1), where 0 ⁇ 1, that is, L [ n,n] > ⁇ *(2 m -1), for example, the preset coefficient ⁇ can be 0.5.
  • the average brightness of the center area of the image is the highest, and the average brightness of the four corner areas is much smaller than the center area.
  • the average brightness of the entire image is between the center area and the four corner areas. If the average brightness of the entire image is too low, the distinction between the black and white blocks of the QR code in the image will be relatively small, and it is easy to decode the wrong code or not be able to decode it.
  • the average brightness of the central area is required to be greater than the second brightness. This achieves a minimum requirement for the overall average brightness, which can keep the average brightness of the entire image from being too dark, and can also improve the decoding efficiency of the sensor and Accuracy.
  • the order of determining whether the average brightness of the central area of the first image is less than the first brightness threshold and determining whether the average brightness of the central area of the second image is greater than the second brightness threshold can be changed, and is not limited by this disclosure.
  • Figure 7 exemplarily shows a process for determining lamp bead group parameters, and the judgment sequence is an implementation manner.
  • FIG. 5 shows a schematic diagram of the process of step S406 shown in FIG. 4 in an embodiment. As shown in Figure 5, in the embodiment of the present disclosure, the above step S406 may further include the following steps.
  • Step S502 Evenly divide the first image into a target number of sub-regions.
  • Step S504 Use the sub-region at the very center of the first image as the central region of the first image.
  • Step S506 Use the sub-regions of the four corners of the first image as the corner regions of the first image.
  • the resolution of the sensor camera is relatively large, such as the commonly used 720P, 1080P, etc., resulting in a huge amount of data for an image, and it takes a long time to process.
  • the higher the resolution of the camera and the finer the captured image the brightness value of a single pixel is easily affected by external factors, such as dust, small stains, small damage, etc. on the evaluation standard board.
  • Using the method provided by the embodiments of the present disclosure to segment the first image can reduce the amount of calculation and reduce external interference at the same time.
  • FIG. 7 is a schematic diagram of an automatic adjustment process of fill light brightness shown in FIGS. 4 to 6 .
  • the first step is to install and fix the QR code navigation sensor on the device shown in Figure 9.
  • the installation height can be adjusted to be consistent with the actual working height.
  • the fill light brightness automatic adjustment process may include the following steps S702 to S720.
  • Step S702 control the QR code navigation sensor to enter the automatic adjustment process of fill light parameters, and the process begins.
  • Step S704 The control system of the QR code navigation sensor sets a set of lamp bead group brightness parameters.
  • Step S706 The control system of the QR code navigation sensor collects an image (that is, the above-mentioned first image), and then performs preprocessing such as image cropping and segmentation.
  • Step S708 The control system of the QR code navigation sensor calculates the average brightness L [i,j] of each partition and the average ⁇ L [i,j] of the average brightness difference between the central area and the four corner areas.
  • step S710 the control system of the QR code navigation sensor determines whether L [n, n] ⁇ 2 m -1 is true. If true, proceed to step S712. If not true, it means that the brightness parameters of this group of lamp beads are inappropriate, and proceed to step S718.
  • Step S712 The control system of the QR code navigation sensor determines whether L [n,n] > ⁇ *(2 m -1),0 ⁇ 1 is true. If true, proceed to step S714. If not true, indicate this group of lights. If the brightness parameter of the bead group is inappropriate, proceed to step S718.
  • Step S714 the control system of the QR code navigation sensor determines Whether it is established, if it is established, proceed to step S716; if it is not established, it means that the brightness parameters of this group of lamp beads are inappropriate, and proceed to step S718.
  • Step S716 the control system of the QR code navigation sensor converts the calculated Update to the latest And save the brightness parameters of the lamp bead group.
  • Step S718 The control system of the QR code navigation sensor verifies whether the traversal of all parameter groups has been completed. If the traversal is not completed, return to step S704 to verify the next set of parameters until the parameter group traversal is completed. If the parameter group traversal is completed, the entire parameter tuning process ends.
  • Step S720 the process ends, and the QR code navigation sensor returns the parameter tuning process results to the power control display terminal 10 for display.
  • the QR code navigation sensor traverses and sets the brightness of each lamp bead group, collects an image, segments and trims the image according to the above method, and calculates the average brightness L [i,j] of each area. Then it is verified whether the brightness of the central area meets the conditions of step S710. If the conditions of step S710 are met, it is then verified whether the conditions of step S712 are met. If the conditions of step S712 are met, the average brightness difference in step S714 is calculated and summed. Compare to the previously found minimum value. If the average brightness difference calculated this time is higher than the last calculated value, discard this calculated value; if the average brightness difference calculated this time is lower than the last calculated value, save this calculated value as the minimum value currently found. value, and save the lamp group brightness setting parameters. Repeat the above process until all lamp bead group brightness parameter combinations are traversed, and the optimal parameter combination is finally found.
  • FIG. 8 is a schematic structural diagram of a supplementary light brightness adjustment device according to an exemplary embodiment.
  • the fill light brightness adjustment device may include a sensor 802, a first fixed structure 804, a second fixed structure 806, an evaluation board 808, a connection structure 810, an adjustment structure 812 and a controller 814.
  • the sensor 802 may be a QR code navigation sensor.
  • the first fixing structure 804 can be used to fix the sensor 802, and can be a bracket including a fixing member, a horizontal arm, a vertical arm, a cross beam, etc.
  • the second fixing structure 806 can be used to fix the evaluation board 808, and can be a bracket, a cross arm, a vertical arm, a cross beam, a base, etc. including fixing members.
  • the connecting structure 810 can be used to connect the first fixed structure 804 and the second fixed structure 806, which can be a bracket, a horizontal arm, a vertical arm, a cross beam, etc., so that the evaluation board 808 is located directly in front of the camera 8022 of the sensor 802, and the evaluation board 808
  • the sensor 802 can be placed in a horizontal direction (as shown in Figure 8) or in a vertical direction (as shown in Figure 9), which is not limited by this disclosure.
  • the adjustment structure 812 can be provided on the connection structure 810 to adjust the distance between the evaluation board 808 and the sensor 802. It can be a long slotted hole and nut (as shown in Figure 9), or it can be an electrically controlled hydraulic structure, etc. .
  • the controller 814 is connected to the sensor 802 and can be used to control the sensor 802 to traverse the candidate fill light solutions, and control the sensor 802 to capture the evaluation board 808 through its camera 8022 to obtain the first image, and perform the method as described above.
  • FIG. 9 is a schematic structural diagram of another supplementary light brightness adjustment device according to an exemplary embodiment.
  • the description of each component in Figure 9 is as follows: 1—base, 2—white evaluation board, 3—sensor fixing bracket, 4—slotted hole, 5—scale, 6—locking nut, 7— Crossbeam, 8 - QR code navigation sensor, 9 - cable harness, 10 - power control display terminal, 11 - power plug.
  • the evaluation of picture brightness and brightness uniformity requires that the color, material, surface roughness, etc. of the picture shooting background are consistent.
  • the theoretical brightness value of a pure white background is the highest, so the brightness distinction of each area is also the highest. Therefore, a whole pure white test board can be used as the evaluation standard board.
  • the white evaluation board 2 needs to have a flat surface, uniform color, no impurities, no scratches, and no bubbles.
  • the size of the white evaluation board 2 should be large enough, larger than the field of view when the QR code navigation sensor is installed at its highest position.
  • the material and production process of the white evaluation board 2 should be consistent with the carrier where the QR code is located.
  • connection and fixed relationship of the entire device is as follows:
  • the sensor fixing bracket 3 can be a gantry-type fixing bracket or a cantilever-type fixing bracket.
  • the QR code navigation sensor 8 is fixed on the cross beam 7, and the cross beam 7 is fixed on the long slot 4 of the bracket 3 through the lock nut 6.
  • the QR code navigation sensor 8 is connected to the power control display terminal 10 through the cable harness 9, and then connected to the external power supply through the power plug 11.
  • the long slot 4 on the sensor fixing bracket 3 can adjust the vertical height of the QR code navigation sensor 8 and the white evaluation board 2. It can be set up so that the white evaluation board 2 is fixed and the QR code navigation sensor 8 is installed with an adjustable height, or it can be set up so that the QR code navigation sensor 8 is fixed and the white evaluation board 2 is height-adjustable.
  • the scale 5 can indicate the current installation height of the QR code navigation sensor 8 to facilitate adjustment of the installation height.
  • the power control display terminal 10 can convert the external power supply voltage into the operating voltage of the two-dimensional code navigation sensor 8. At the same time, there is customized program software on the power control display terminal 10. Through the software, control instructions can be issued to the QR code navigation sensor 8, and operating data and parameters can be collected and displayed in real time.
  • the power control display terminal 10 may be a PC, an industrial computer, or other electronic control motherboard with input and output functions.
  • the information transmission between the power control display terminal 10 and the QR code reading navigation sensor 8 can be various communication methods, such as RS232, RS485, CAN, UDP/TCP, SPI, I 2 C, etc.
  • the QR code navigation sensor 8 feeds back information, which can output a printed string, light up a relevant status indicator, or make a sound, etc.
  • the device shown in Figure 9 is mainly used for brightness parameter tuning during the development and production of QR code navigation sensors. If you want to re-adjust the brightness parameters of the QR code navigation sensor that has been installed at the user site, you can disassemble the QR code navigation sensor and then use the device shown in Figure 9 for tuning.
  • fill light panels have either fixed brightness or adjustable brightness, but manual parameter adjustment is required.
  • brightness adjustment is required for QR code navigation sensor reading distance adjustment, device consistency differences, etc.
  • the related technology has problems such as poor flexibility, cumbersome adjustment steps and low efficiency.
  • Embodiments of the present disclosure provide a method for automatically adjusting the supplementary light brightness of a QR code navigation sensor. According to the usage scenarios and characteristics of the QR code navigation sensor, a picture brightness and brightness uniformity calculation method is formulated, and a picture brightness and brightness uniformity evaluation are formulated. Guidelines, on this basis, the automatic adjustment of fill light brightness is realized, which solves the problems of poor flexibility, cumbersome adjustment steps and low efficiency of the existing manual adjustment method.
  • the device provided by the embodiment of the present disclosure can automatically statistically calculate the average brightness and brightness uniformity of the image, and then adjust the brightness of each group of lamp beads on the fill light panel to find the optimal brightness combination, thereby realizing automatic adjustment of the fill light brightness and eliminating components
  • the consistency effect makes it easier for products to adapt to different code reading heights and increases product adaptability.
  • FIG. 10 is a block diagram of a light supplement device according to an exemplary embodiment.
  • the device shown in FIG. 10 may be applied, for example, to the controller 814 in FIG. 8 or to the power control display terminal 10 in FIG. 9 .
  • the device 100 may include an acquisition module 1002, an image acquisition module 1004, an image processing module 1006, a brightness optimization module 1008, and a parameter determination module 1010.
  • the acquisition module 1002 may be used to obtain multiple candidate fill light solutions according to the fill light source provided in the sensor.
  • the supplementary light source may include multiple lamp bead groups, and each of the multiple lamp bead groups includes multiple brightness levels.
  • the acquisition module 1002 can also be used to traverse and set various brightness levels for each lamp bead group in the plurality of lamp bead groups, and obtain multiple candidate fill light solutions.
  • the image acquisition module 1004 may be configured to control the fill light source to perform fill light according to the candidate fill light plan when the sensor is shooting for each of the plurality of candidate fill light plans, and obtain the first captured image.
  • the image processing module 1006 can be used to perform partition processing on the first image to obtain the central area and corner areas of the first image.
  • the image processing module 1006 can also be used to evenly divide the first image into a target number of sub-areas; use the sub-area at the center of the first image as the center area of the first image; use the sub-areas at the four corners of the first image as the first image corner area.
  • the corner area of the first image may include a plurality of corner areas of the first image.
  • the brightness optimization module 1008 may be used to obtain the average brightness of the central area of the first image and the average brightness of the corner areas of the first image.
  • the brightness optimization module 1008 may also be configured to obtain a brightness difference index value based on the average brightness of the central area of the first image and the average brightness of the corner areas of the first image.
  • the brightness optimization module 1008 may also be used to obtain an average value of the difference between the average brightness of the central area of the first image and the average brightness of each corner area of the first image as a brightness difference index value.
  • the brightness optimization module 1008 can also be used to determine whether the average brightness of the central area of the first image is less than a first brightness threshold, and the first brightness threshold is obtained according to the number of sampling bits of the sensor.
  • the brightness optimization module 1008 may also be used to determine whether the average brightness of the central area of the first image is greater than a second brightness threshold.
  • the second brightness threshold is obtained by multiplying the first brightness threshold by a preset coefficient.
  • the parameter determination module 1010 can be used to determine the candidate fill light scheme with the smallest brightness difference index value among multiple candidate fill light schemes as the target fill light scheme, so as to control the fill light source to perform fill light according to the target fill light scheme when the sensor is shooting.
  • the parameter determination module 1010 may also be configured to determine the candidate fill light scheme with the smallest brightness difference index among multiple candidate fill light schemes as the target fill light scheme if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold.
  • the parameter determination module 1010 may also be configured to, if it is determined that the average brightness of the central area of the first image is less than the first brightness threshold, and it is determined that the average brightness of the central area of the first image is greater than the second brightness threshold, add the brightness of the multiple candidate fill light schemes to The candidate fill light scheme with the smallest difference index value is determined as the target fill light scheme.
  • Figure 11 shows a schematic structural diagram of an electronic device in an embodiment of the present disclosure. It should be noted that the device shown in Figure 11 is only a computer system as an example, and should not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.
  • the device 1100 includes a central processing unit (CPU) 1101 that can operate according to a program stored in a read-only memory (ROM) 1102 or loaded from a storage portion 1108 into a random access memory (RAM) 1103 Perform various appropriate actions and processing.
  • CPU central processing unit
  • RAM random access memory
  • various programs and data required for the operation of the device 1100 are also stored.
  • CPU 1101, ROM 1102 and RAM 1103 are connected to each other through bus 1104.
  • An input/output (I/O) interface 1105 is also connected to bus 1104.
  • the following components are connected to the I/O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., speakers, etc.; and a storage section 1108 including a hard disk, etc. ; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc.
  • the communication section 1109 performs communication processing via a network such as the Internet.
  • Driver 1110 is also connected to I/O interface 1105 as needed.
  • Removable media 1111 such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage portion 1108 as needed.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication portion 1109, and/or installed from removable media 1111.
  • CPU central processing unit
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmd read-only memory (EPROM or flash memory), fiber optics, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block in the block diagram or flowchart illustration, and combinations of blocks in the block diagram or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or may be implemented by special purpose hardware-based systems that perform the specified functions or operations. Achieved by a combination of specialized hardware and computer instructions.
  • the modules involved in the embodiments of the present disclosure can be implemented in software or hardware.
  • the described module can also be provided in a processor, for example, it can be described as: a processor includes an acquisition module, an image acquisition module, an image processing module, a brightness optimization module and a parameter determination module.
  • a processor includes an acquisition module, an image acquisition module, an image processing module, a brightness optimization module and a parameter determination module.
  • the names of these modules do not constitute a limitation on the module itself under certain circumstances.
  • the acquisition module can also be described as "a module that acquires the brightness parameters of multiple candidate fill light solutions.”
  • the present disclosure also provides a computer-readable medium.
  • the computer-readable medium may be included in the device described in the above embodiments; it may also exist separately without being assembled into the device.
  • the above computer-readable medium carries one or more programs. When the above one or more programs are executed by a device, the device includes:
  • Multiple candidate fill light schemes are obtained according to the fill light source set in the sensor; for each candidate fill light scheme among the multiple candidate fill light schemes, the fill light source is controlled to fill light according to the candidate fill light scheme when the sensor is shooting.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Studio Devices (AREA)

Abstract

本公开提供一种补光方法、装置、设备、存储介质及补光亮度调整装置,涉及传感器技术领域。该方法包括:根据设置在传感器中的补光光源获得多个候选补光方案,对于其中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像;对第一图像进行分区处理,获得第一图像的中心区域和角区域;获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度;根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值;获得多个候选补光方案中亮度差指标值最小的候选补光方案为目标补光方案,以在传感器进行拍摄时通过目标补光方案进行补光。该方法提高了传感器解码效率和准确率。

Description

补光方法、装置、设备、存储介质及补光亮度调整装置
本公开基于申请号为202210330267.1、申请日为2022年3月28日、发明名称为《补光方法、装置、设备、存储介质及补光亮度调整装置》的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
技术领域
本公开涉及传感器技术领域,具体而言,涉及一种补光方法、装置、电子设备、可读存储介质及补光亮度调整装置。
背景技术
在电商仓储的“货到人”拣选系统中,自导航车辆(Automated Guided Vehicle,AGV)主要利用二维码进行导航,二维码导航传感器是其核心零部件,能够提供AGV在仓库内的位置及AGV相对于二维码的位姿信息。二维码导航传感器与常用的二维码读码器类似,都是先采用摄像头拍摄图片,然后对图片进行解析。拍摄图片的质量是影响解析结果的最主要的决定性因素。
二维码导航传感器工作时会随AGV进行高速移动,因此摄像头一般采用全局快门且快门时间固定。为了保证成像视野内光照充足,二维码导航传感器内部通常配有补光灯板,可以对被拍摄区域进行补光。
为了在紧凑的AGV内部空间中方便快捷地安装二维码导航传感器,需要将其体积设计的尽可能小巧。而从AGV运动控制的角度,则还要求二维码导航传感器的可解码视野尽可能的大。而补光灯板一般安装在二维码导航传感器内部,所以通常采用紧凑分布的灯珠作为补光灯板的光源,照亮远大于补光灯板尺寸的成像视野。
在所述背景技术部分公开的上述信息仅用于加强对本公开的背景的理解,因此它可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。
根据本公开的一方面,提供一种补光方法,包括:根据设置在传感器中的补光光源获得多个候选补光方案;对于所述多个候选补光方案中的各个候选补光方案,在所述传感器进行拍摄时控制所述补光光源按照所述候选补光方案进行补光,获得拍摄得到的第一图像;对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域;获得所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度;根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值;将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,以在所述传感器进行拍摄时控制所述补光光源按照所述目标补光方案进行补光。
根据本公开的一实施例,所述第一图像的角区域包括所述第一图像的多个角的区域;根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值,包括:获得所述第一图像的中心区域的平均亮度与所述第一图像的各个角的区域的平均亮度的差的平均值,作为所述亮度差指标值。
根据本公开的一实施例,所述方法还包括:判断所述第一图像的中心区域的平均亮度是否小于第一亮度阈值,所述第一亮度阈值根据所述传感器的采样位数获得;将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,包括:若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
根据本公开的一实施例,所述方法还包括:判断所述第一图像的中心区域的平均亮度是否大于第二亮度阈值,所述第二亮度阈值为将所述第一亮度阈值乘以预设系数获得;若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,包括:若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,并且确定所述第 一图像的中心区域的平均亮度大于所述第二亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
根据本公开的一实施例,对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域,包括:将所述第一图像均匀划分为目标数量个子区域;将所述第一图像正中心的子区域作为所述第一图像的中心区域;将所述第一图像四个角的子区域作为所述第一图像的角区域。
根据本公开的一实施例,所述补光光源包括多个灯珠组,所述多个灯珠组中的各个灯珠组包括多个亮度等级;根据设置在传感器中的补光光源获得多个候选补光方案,包括:对于所述多个灯珠组中的各个灯珠组,遍历设置各个亮度等级,获得所述多个候选补光方案。
根据本公开的再一方面,提供一种补光亮度调整装置,包括:用于实现如上述任一种方法,所述装置包括:第一固定结构,用于固定传感器;第二固定结构,用于固定评估板;连接结构,用于连接所述第一固定结构和所述第二固定结构,以使所述评估板位于所述传感器的摄像头的正前方;调节结构,设置在所述连接结构上,用于调节所述评估板于所述传感器之间的距离;控制器,与所述传感器相连接,用于控制所述传感器遍历候选补光方案,并控制所述传感器通过其摄像头拍摄所述评估板获得第一图像,以及执行如上述任一种方法。
根据本公开的再一方面,提供一种补光装置,包括:获取模块,用于根据设置在传感器中的补光光源获得多个候选补光方案;图像获得模块,用于对于所述多个候选补光方案中的各个候选补光方案,在所述传感器进行拍摄时控制所述补光光源按照所述候选补光方案进行补光,获得拍摄得到的第一图像;图像处理模块,用于对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域;亮度优化模块,用于获得所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度;所述亮度优化模块,还用于根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值;参数确定模块,用于将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,以在所述传感器进行拍摄时控制所述补光光源按照所述目标补光方案进行补光。
根据本公开的一实施例,所述第一图像的角区域包括所述第一图像的多个角的区域;所述亮度优化模块,还用于获得所述第一图像的中心区域的平均亮度与所述第一图像的各个角的区域的平均亮度的差的平均值,作为所述亮度差指标值。
根据本公开的一实施例,所述亮度优化模块,还用于:判断所述第一图像的中心区域的平均亮度是否小于第一亮度阈值,所述第一亮度阈值根据所述传感器的采样位数获得;所述参数确定模块,还用于若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
根据本公开的一实施例,所述亮度优化模块,还用于:判断所述第一图像的中心区域的平均亮度是否大于第二亮度阈值,所述第二亮度阈值为将所述第一亮度阈值乘以预设系数获得;所述参数确定模块,还用于:若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,并且确定所述第一图像的中心区域的平均亮度大于所述第二亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
根据本公开的一实施例,所述图像处理模块,还用于:将所述第一图像均匀划分为目标数量个子区域;将所述第一图像正中心的子区域作为所述第一图像的中心区域;将所述第一图像四个角的子区域作为所述第一图像的角区域。
根据本公开的一实施例,所述补光光源包括多个灯珠组,所述多个灯珠组中的各个灯珠组包括多个亮度等级;所述获取模块,还用于:对于所述多个灯珠组中的各个灯珠组,遍历设置各个亮度等级,获得所述多个候选补光方案。
根据本公开的再一方面,提供一种电子设备,包括:存储器、处理器及存储在所述存储器中并可在所述处理器中运行的可执行指令,所述处理器执行所述可执行指令时实现如上述任一种方法。
根据本公开的再一方面,提供一种计算机可读存储介质,其上存储有计算机可执行指令,所述可执行指令被处理器执行时实现如上述任一 种方法。
本公开的实施例提供的补光方法,对于根据设置在传感器中的补光光源获得的多个候选补光方案中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像,然后对第一图像进行分区处理,获得第一图像的中心区域和角区域,并获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度,再根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值,最后将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,以在传感器进行拍摄时控制补光光源按照目标补光方案进行补光。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本公开。
附图说明
通过参照附图详细描述其示例实施例,本公开的上述和其它目标、特征及优点将变得更加显而易见。
图1示出了一种二维码导航传感器的视野示意图。
图2示出了一种拍摄图像亮度分布示意图。
图3示出了一种补光灯板的灯珠分组示意图。
图4示出本公开实施例中一种补光方法的流程图。
图5示出了图4中所示的步骤S406在一实施例中的处理过程示意图。
图6根据一示例性实施例示出了一种图形分割方案示意图。
图7是根据图4至图6示出的一种补光亮度自动调优流程示意图。
图8是根据一示例性实施例示出的一种补光亮度调整装置的结构示意图。
图9是根据一示例性实施例示出的另一种补光亮度调整装置的结构示意图。
图10示出本公开实施例中一种补光装置的框图。
图11示出本公开实施例中一种电子设备的结构示意图。
具体实施方式
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施例使得本公开将更加全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、装置、步骤等。在其它情况下,不详细示出或描述公知结构、方法、装置、实现或者操作以避免喧宾夺主而使得本公开的各方面变得模糊。
此外,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本公开的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。符号“/”一般表示前后关联对象是一种“或”的关系。
在本公开中,除非另有明确的规定和限定,“连接”等术语应做广义理解,例如,可以是电连接或可以互相通讯;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本公开中的具体含义。
如上所述,二维码导航传感器工作时,摄像头在拍摄二维码时通常需要进行补光。图1示出了一种二维码导航传感器的视野示意图。如图1所示,补光灯104设置在二维码导航传感器102上,在二维码导航传感器102的摄像头1022进行拍摄时,补光灯104会照亮二维码导航传感器102的视野,对被拍摄区域进行补光。若补光亮度偏低,则拍摄图像亮度偏暗;若补光亮度过高,则拍摄图像存在过曝光,图像会失真。这两种情况均会 影响解码成功率和解码精度。
补光灯板一般安装在二维码导航传感器内部,通常以紧凑的灯珠分布照亮远大于补光灯板尺寸的成像视野。成像视野内部距离灯珠近的区域亮度高,距离灯珠远的区域亮度低。在成像区域内某处的亮度是各个灯珠在该处亮度的叠加。因此,成像视野内图像亮度一般是中心亮、四角暗。图2示出了一种拍摄图像亮度分布示意图。图2中,x、y轴表示拍摄图像所在平面的两个方向,z轴表示拍摄图像上各个点的亮度大小。如图2所示,拍摄图像的中心区域在z轴上的数值较大,越接近正中心数值越大,表示中心亮;拍摄图像的四角区域在z轴上的数值较小,表示四角暗。
图像中心偏亮区域存在过曝光,会导致图像失真;图像四角偏暗区域则可能存在黑白区分度差问题。为了应对上述问题,相关技术中将补光灯板设计成灯珠阵列,根据灯珠所在区域划分为不同的组,每组单独驱动且亮度可调。因此为了缩小视野中心和四角的亮度差异,需要精细调整补光灯板不同组灯珠的亮度参数及其组合。图3示出了一种补光灯板的灯珠分组示意图。在图3中,补光灯板的灯珠划分为标号为“1”的灯珠、标号为“2”的灯珠和标号为“3”的灯珠三组,不同组的灯珠可以分别设置亮度参数并进行控制,例如标号为“1”的灯珠的亮度可以大于标号为“2”的灯珠和标号为“3”的灯珠。
由于电子元器件存在一致性差异、随着工作时间的增加灯珠的发光效率会降低等原因,采用固定驱动电流的补光灯板的图像亮度及均匀性会变化。在不同应用场景中,二维码导航传感器与二维码的物距变化时,补光灯板与成像平面的距离会发生变化,也会导致视野内混合平均亮度和亮度均匀性发生变化。因此需要根据实际情况调整补光灯板不同组灯珠的亮度及其组合,以避免补光亮度及均匀性的变化影响二维码导航传感器解码的效率和准确性。
一些相关技术中的补光灯板是固定亮度且不可调整的,另一些相关技术中的补光灯板是亮度可调,但是需要手动调整亮度参数。在实际使用中存在灵活性差、调整步骤繁琐、效率低等问题。
因此,本公开提供了一种补光方法,对于根据设置在传感器中的补光光源获得的多个候选补光方案中的各个候选补光方案,通过在传感器进行 拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像,然后对第一图像进行分区处理,获得第一图像的中心区域和角区域,并获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度,再根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值,最后将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,实现二维码导航传感器补光亮度的自动调优,能够自动评估成像平均亮度及均匀性,然后自动调整补光灯板各组灯珠亮度,找到最优亮度组合,从而提高了传感器的解码效率和准确率。
图4是根据一示例性实施例示出的一种补光方法的流程图。如图4所示的方法例如可以应用于图8中的控制器814,也可以应用于图9中的电源控制显示终端10。
参考图4,本公开实施例提供的方法40可以包括以下步骤。
在步骤S402中,根据设置在传感器中的补光光源获得多个候选补光方案。
在一些实施例中,例如,传感器可以是二维码导航传感器。
在一些实施例中,例如,补光光源可以包括一个或多个灯珠组,一个或多个灯珠组中的各个灯珠组包括多个亮度等级,可以通过设置参数来调节各个灯珠组的亮度,以形成不同的候选补光方案。
在一些实施例中,对于多个灯珠组中的各个灯珠组,可以遍历设置各个亮度等级,获得多个候选补光方案,其中,通过遍历设置各个灯珠组的亮度等级,获得了具有不同亮度等级的灯珠组的不同的多个候选补光方案。例如,假设各个灯珠组亮度都有q个可调等级,整个补光灯板共有p个灯珠组,则整个补光灯板共有q p种亮度分布,即有个q p候选补光方案。
在步骤S404中,对于多个候选补光方案中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像。
在一些实施例中,例如,对于q p种亮度分布中的每种亮度分布,按照对应设置的各个灯珠组亮度进行补光,传感器进行拍摄得到第一图像。
在步骤S406中,对第一图像进行分区处理,获得第一图像的中心区域和角区域。
在一些实施例中,第一图像的角区域可以包括第一图像的多个角的区域,例如,第一图像可以为矩形,可以包括四个角的区域。
在一些实施例中,例如,可以将第一图像均匀分割成若干个子区域,选择在第一图像正中的子区域为中心区域,在第一图像四角的子区域为角区域,具体实施方式可参照图5和图6。
在步骤S408中,获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度。
在一些实施例中,例如,参照图6,对于中心区域或角区域,可计算得到该区域内所有像素的亮度平均值作为该区域的平均亮度。
在步骤S410中,根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值。
在一些实施例中,例如,可以获得第一图像的中心区域的平均亮度与第一图像的各个角的区域的平均亮度的差的平均值,作为亮度差指标值。参照图6,第一图像的中心区域与四角区域亮度差值ΔL [i,j]的平均值
Figure PCTCN2022117077-appb-000001
可以表示为:
Figure PCTCN2022117077-appb-000002
在另一些实施例中,例如,可以分别获得第一图像的中心区域的平均亮度与第一图像的各个角的区域的平均亮度的差后,将各个亮度差加权相加,作为亮度差指标值。
在步骤S412中,将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,以在传感器进行拍摄时控制补光光源按照目标补光方案进行补光。
在一些实施例中,例如,通过选择多个候选补光方案中亮度差指标值最小的候选补光方案为目标补光方案,可满足中心和角区域的亮度差异尽可能小。可通过遍历各个候选补光方案并更新最小亮度差指标值来实现,具体实施方式可参照图7。理想情况下,中心和四角区域亮度无差异,即中心区域和四角区域亮度差值ΔL [i,j]平均值
Figure PCTCN2022117077-appb-000003
尽可能接近于0,即
Figure PCTCN2022117077-appb-000004
在一些实施例中,可以先判断第一图像的中心区域的平均亮度是否小于第一亮度阈值,第一亮度阈值根据传感器的采样位数获得;若确定第一图像的中心区域的平均亮度小于第一亮度阈值,获得多个候选补光方案中 亮度差指标值最小的候选补光方案为目标补光方案。
例如,二维码导航传感器的摄像头采集的是灰度图,每一个像素点的灰度值等同于亮度值。典型的8bit(比特)采样率的二维码导航传感器,其每一个像素的亮度是0~255之间的整数,如白色就是255,黑色就是0。参照图6,对于一幅分辨率为W*H的图像,采集到的图像亮度数据在空间上就是一个W行H列的数据阵列,其中每一个元素都是0~255之间的整数。第一图像的中心区域的平均亮度可以表示为L [n,n],第一亮度阈值可以为2 m-1,其中m为传感器的采样位数,即L [n,n]<2 m-1,对于8bit率的二维码导航传感器,则L [n,n]<255。其中2 m-1是亮度采集值的最大值,也就是图像传感器输出最大值,达到此值之后,亮度即使再增大,传感器的输出也是此值。假设图像传感器内部的模数转换器(Analog-to-Digital Converter,ADC)是8bit的,则它的亮度转换值范围是0~255。当亮度强到传感器转换最大值255后,亮度再增加,传感器的输出也是255,也不会跟着增加,导致当亮度特别大时,大到超出传感器测量范围,传感器是不能测量出来真实亮度的,一般称为过曝光,过曝光会降低解码成功率。因此,将第一图像的中心区域的平均亮度限制在第一亮度阈值内,可以避免中心区域过曝光,提高传感器的解码效率和准确率。
在一些实施例中,还可以先判断第一图像的中心区域的平均亮度是否大于第二亮度阈值,第二亮度阈值为将第一亮度阈值乘以预设系数获得;若确定第一图像的中心区域的平均亮度小于第一亮度阈值,并且确定第一图像的中心区域的平均亮度大于第二亮度阈值,获得多个候选补光方案中亮度差指标值最小的候选补光方案为目标补光方案。
例如,参照图6,第一图像的中心区域的平均亮度可以表示为L [n,n],第二亮度阈值可以为α*(2 m-1),其中0<α<1,即L [n,n]>α*(2 m-1),例如预设系数α可以取值0.5。通常图像中心区域的平均亮度是最高的,四角区域的平均亮度要比中心区域小很多。整幅图像的平均亮度介于中心区域和四角区域之间。整幅图像的平均亮度如果太低,则图片中二维码的黑白色块的区分度比较小,容易解错码或者解不出码。由于整幅图像中心区域亮度最大,因此要求中心区域平均亮度大于第二亮度,实现了对整体亮度平均值有一个最小要求,可以使整幅图像平均亮度不偏暗,也可 以提高传感器的解码效率和准确率。
在一些实施例中,判断第一图像的中心区域的平均亮度是否小于第一亮度阈值、判断第图像的中心区域的平均亮度是否大于第二亮度阈值的先后顺序可以变化,本公开不作限制。图7示例性示出了一种确定灯珠组参数的流程,其中的判断顺序为一种实施方式。
根据本公开实施例提供的补光方法,对于根据设置在传感器中的补光光源获得的多个候选补光方案中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像,然后对第一图像进行分区处理,获得第一图像的中心区域和角区域,并获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度,再根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值,最后将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,以在传感器进行拍摄时控制补光光源按照目标补光方案进行补光。本公开的实施例提供的补光方法通过选取中心区域与角区域的平均亮度差最小的候选补光方案,使得补光得到的传感器拍摄图像的亮度更为均匀,可实现补光亮度的自动调优,从而提高了传感器的解码效率和准确率。
图5示出了图4中所示的步骤S406在一实施例中的处理过程示意图。如图5所示,本公开实施例中,上述步骤S406可以进一步包括以下步骤。
步骤S502,将第一图像均匀划分为目标数量个子区域。
步骤S504,将第一图像正中心的子区域作为第一图像的中心区域。
步骤S506,将第一图像四个角的子区域作为第一图像的角区域。
图6根据一示例性实施例示出了一种图形分割方案示意图。如图6所示,把分辨率为W*H(W、H均为正整数)的图片均匀划分成(2n+1)*(2n+1)个区域,n取值为1,2,3,4....的正整数,例如n可以取4。如果W/(2n+1)和H/(2n+1)不能整除,即行列像素不能做到均分,则可以向下取整,这样就会有多余的行和列没有被划分到任何一个区域内。在划分时以图像正中心为中心区域,这样多余的行和列就分布在图像的边沿。而由于图像边沿的行和列可能会存在异常数据,因此向下取整也可以起到图像裁边的效果。
如图6所示,对于每一个区域X [i,j](0<i,j≤(2n+1)),可计算得 到区域内所有像素的亮度平均值作为此区域的平均亮度L [i,j]。可以获得中心区域平均亮度为L [n,n]。四角区域平均亮度分别为L [0,0]、L [o,2n]、L [2n,0]、L [2n,2n]
传感器的摄像头的分辨率都比较大,例如常用的720P、1080P等,导致一幅图像的数据量巨大,处理需要耗费很长时间。另外摄像头分辨率越高,拍摄的图像越精细,那么单个像素的亮度值就容易受到外界的影响,例如评估标准板上的灰尘、小污渍、小破损等。采用本公开实施例提供的方法对第一图像进行分割,可以缩减计算量,同时降低外界干扰。
图7是根据图4至图6示出的一种补光亮度自动调优流程示意图。首先是把二维码导航传感器安装固定在图9所示的装置上,安装高度可以调整为与实际工作高度一致,连接好线缆线束之后上电并等待启动完成。如图7所示,补光亮度自动调优流程可以包括以下步骤S702至步骤S720。
步骤S702,控制二维码导航传感器进入补光参数自动调优流程,流程开始。
步骤S704,二维码导航传感器的控制系统设置一组灯珠组亮度参数。
步骤S706,二维码导航传感器的控制系统采集一幅图像(即上述第一图像),然后进行图像裁剪及分割等预处理。
步骤S708,二维码导航传感器的控制系统计算各分区的平均亮度L [i,j]以及中心区域和四角区域平均亮度差的平均值ΔL [i,j]
步骤S710,二维码导航传感器的控制系统判断L [n,n]<2 m-1是否成立,若成立则进行步骤S712,不成立则说明此组灯珠组亮度参数不合适,进行步骤S718。
步骤S712,二维码导航传感器的控制系统判断L [n,n]>α*(2 m-1),0<α<1,是否成立,若成立则进行步骤S714,不成立则说明此组灯珠组亮度参数不合适,进行步骤S718。
步骤S714,二维码导航传感器的控制系统判断
Figure PCTCN2022117077-appb-000005
是否成立,若成立则进行步骤S716,不成立则说明此组灯珠组亮度参数不合适,进行步骤S718。
步骤S716,二维码导航传感器的控制系统把此次计算的
Figure PCTCN2022117077-appb-000006
更新为最新的
Figure PCTCN2022117077-appb-000007
并保存灯珠组亮度参数。
步骤S718,二维码导航传感器的控制系统验证是否已经完成所有参数组的遍历。如果未完成遍历,则返回到步骤S704,进行下一组参数的验证,直至参数组遍历完成。如果参数组遍历完成,则整个参数调优流程结束。
步骤S720,流程结束,二维码导航传感器把参数调优流程结果返回到电源控制显示终端10上进行显示。
自动调优时二维码导航传感器遍历设置各灯珠组亮度,采集一幅图像,按照上述方式对图像进行分割裁边,计算各区域平均亮度L [i,j]。然后验证中心区域亮度是否满足步骤S710的条件,如果满足步骤S710的条件,紧接着验证是否满足步骤S712的条件;如果满足步骤S712的条件,紧接着计算步骤S714中的亮度差平均值,并和之前找到的最小值进行比对。如果此次计算出来的亮度差平均值比上次计算的高则舍弃本次计算值;如果此次计算出来的亮度平均值比上次计算的低则保存此次计算值作为当前已找到的最小值,并保存灯珠组亮度设置参数。重复进行上述流程,直至遍历完所有灯珠组亮度参数组合,并最终找到最优的参数组合。
图8是根据一示例性实施例示出的一种补光亮度调整装置的结构示意图。补光亮度调整装置可以包括传感器802、第一固定结构804、第二固定结构806、评估板808、连接结构810、调节结构812和控制器814。
传感器802可以是二维码导航传感器。第一固定结构804可用于固定传感器802,可以为包括固定件的支架、横臂、竖臂、横梁等等。第二固定结构806可用于固定评估板808,可以为包括固定件的支架、横臂、竖臂、横梁、底座等等。连接结构810可用于连接第一固定结构804和第二固定结构806,可以为支架、横臂、竖臂、横梁等等,以使评估板808位于传感器802的摄像头8022的正前方,评估板808与传感器802可沿水平方向放置(如图8所示),也可沿竖直方向放置(如图9所示),本公开不作限制。调节结构812可以设置在连接结构810上,用于调节评估板808于传感器802之间的距离,可以为长槽孔与螺母(如图9所示),也可以为电控制的液压结构等等。控制器814,与传感器802相连接,可用于控制传感器802遍历候选补光方案,并控制传感器802通过其摄像头8022拍摄评估板808获得第一图像,以及执行如上述的方法。
图9是根据一示例性实施例示出的另一种补光亮度调整装置的结构示意图。图9中各组件说明如下:1——底座,2——白色评估板,3——传感器固定支架,4——长槽孔,5——刻度尺,6——锁紧螺母,7——横梁,8——二维码导航传感器,9——线缆线束,10——电源控制显示终端,11——电源插头。
其中,由于不同颜色的物体,拍成图片的亮度值不同。而图片亮度及亮度均匀度评估需要图片拍摄背景的颜色、材质、表面粗糙度等一致。另外纯白色背景的理论亮度值最高,因此各区域的亮度区分度也最高。所以可采用一整块纯白色测试板来作为评估标准板。白色评估板2需要表面平整、颜色均匀、无杂质、无划痕、无气泡。并且白色评估板2的尺寸应足够大,大于二维码导航传感器最高安装位置时的视野大小。白色评估板2材质及制作工艺与二维码所在的载体应一致。
整个装置的连接固定关系如下:
(1)整个装置安装固定在平台型底座1上。
(2)底座上固定着白色评估板2。
(3)底座两侧有两个竖直的传感器固定支架3,支架3上有长槽孔4,长槽孔4旁边有刻度尺5。传感器固定支架3可以为门架式固定架,也可以为悬臂式固定架。
(4)二维码导航传感器8固定在横梁7上,横梁7通过锁紧螺母6固定在支架3的长槽孔4上。
(5)二维码导航传感器8通过线缆线束9和电源控制显示终端10连接,然后通过电源插头11连接外部电源。
主要组件的功能描述如下:
(1)传感器固定支架3上的长槽孔4,可以实现二维码导航传感器8与白色评估板2的垂直高度的调整。可以设置为白色评估板2固定、二维码导航传感器8安装高度可调,也可以设置为二维码导航传感器8安装固定、白色评估板2高度可调。
(2)刻度尺5能够指示二维码导航传感器8的当前安装高度,方便安装高度的调整。
(3)电源控制显示终端10能够把外接电源电压转换成二维码导航传 感器8工作电压。同时电源控制显示终端10上有定制的程序软件,通过软件即可以向二维码导航传感器8下发控制指令,又可以实时采集显示运行数据及参数。
电源控制显示终端10可以是PC、工控机或者其他具有输入输出功能的电子控制主板。
电源控制显示终端10与二维码读导航传感器8之间的信息传递可以是各种通信方式,比如RS232、RS485、CAN、UDP/TCP、SPI、I 2C等等。
二维码导航传感器8反馈信息,可以输出打印字符串,也可以是点亮相关状态指示灯,也可以是发出声音等。
图9所示装置主要用于二维码导航传感器研发及生产过程中的亮度参数调优。已经安装到用户使用现场的二维码导航传感器如果想要重新进行亮度参数调优,则可以把二维码导航传感器拆卸下来,然后采用图9所示装置进行调优。
相关技术中补光灯板要么是固定亮度的,要么是亮度可调的,但是需要手动调参。在二维码导航传感器读码距离调整、器件一致性差异等需要亮度调优时,相关技术存在灵活性差,调整步骤繁琐效率低等问题。
本公开实施例提供了一种二维码导航传感器补光亮度自动调优方法,根据二维码导航传感器使用场景及特点,制定图片亮度及亮度均匀度计算方法,制定图片亮度及亮度均匀度评估准则,在此基础上实现补光亮度的自动调优,解决了现有手动调优方式存在的灵活性差,调整步骤繁琐效率低等问题。本公开实施例提供的装置能够自动统计计算图像平均亮度及亮度均匀性,然后调整补光灯板各组灯珠亮度,找到最优亮度组合,以此实现补光亮度的自动调优,消除器件一致性影响,方便产品适应不同读码高度,增加产品适应能力。
图10是根据一示例性实施例示出的一种补光装置的框图。如图10所示的装置例如可以应用于图8中的控制器814,也可以应用于图9中的电源控制显示终端10。
参考图10,本公开实施例提供的装置100可以包括获取模块1002、图像获得模块1004、图像处理模块1006、亮度优化模块1008和参数确定模块1010。
获取模块1002可用于根据设置在传感器中的补光光源获得多个候选补光方案。
补光光源可以包括多个灯珠组,多个灯珠组中的各个灯珠组包括多个亮度等级。
获取模块1002还可用于对于多个灯珠组中的各个灯珠组,遍历设置各个亮度等级,获得多个候选补光方案。
图像获得模块1004可用于对于多个候选补光方案中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像。
图像处理模块1006可用于对第一图像进行分区处理,获得第一图像的中心区域和角区域。
图像处理模块1006还可用于将第一图像均匀划分为目标数量个子区域;将第一图像正中心的子区域作为第一图像的中心区域;将第一图像四个角的子区域作为第一图像的角区域。
第一图像的角区域可以包括第一图像的多个角的区域。
亮度优化模块1008可用于获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度。
亮度优化模块1008还可用于根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值。
亮度优化模块1008还可用于获得第一图像的中心区域的平均亮度与第一图像的各个角的区域的平均亮度的差的平均值,作为亮度差指标值。
亮度优化模块1008还可用于判断第一图像的中心区域的平均亮度是否小于第一亮度阈值,第一亮度阈值根据传感器的采样位数获得。
亮度优化模块1008还可用于:判断第一图像的中心区域的平均亮度是否大于第二亮度阈值,第二亮度阈值为将第一亮度阈值乘以预设系数获得。
参数确定模块1010可用于将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,以在传感器进行拍摄时控制补光光源按照目标补光方案进行补光。
参数确定模块1010还可用于若确定第一图像的中心区域的平均亮度 小于第一亮度阈值,将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案。
参数确定模块1010还可用于若确定第一图像的中心区域的平均亮度小于第一亮度阈值,并且确定第一图像的中心区域的平均亮度大于第二亮度阈值,将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案。
本公开实施例提供的装置中的各个模块的具体实现可以参照上述方法中的内容,此处不再赘述。
图11示出本公开实施例中一种电子设备的结构示意图。需要说明的是,图11示出的设备仅以计算机系统为示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图11所示,设备1100包括中央处理单元(CPU)1101,其可以根据存储在只读存储器(ROM)1102中的程序或者从存储部分1108加载到随机访问存储器(RAM)1103中的程序而执行各种适当的动作和处理。在RAM 1103中,还存储有设备1100操作所需的各种程序和数据。CPU1101、ROM 1102以及RAM 1103通过总线1104彼此相连。输入/输出(I/O)接口1105也连接至总线1104。
以下部件连接至I/O接口1105:包括键盘、鼠标等的输入部分1106;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1107;包括硬盘等的存储部分1108;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1109。通信部分1109经由诸如因特网的网络执行通信处理。驱动器1110也根据需要连接至I/O接口1105。可拆卸介质1111,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1110上,以便于从其上读出的计算机程序根据需要被安装入存储部分1108。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1109从网络上被下载和安装,和/或从可拆卸介质1111被 安装。在该计算机程序被中央处理单元(CPU)1101执行时,执行本公开的系统中限定的上述功能。
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括获取模块、图像获得模块、图像处理模块、亮度优化模块和参数确定模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取模块还可以被描述为“获取多个候选补光方案的亮度参数的模块”。
作为另一方面,本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:
根据设置在传感器中的补光光源获得多个候选补光方案;对于多个候选补光方案中的各个候选补光方案,在传感器进行拍摄时控制补光光源按照候选补光方案进行补光,获得拍摄得到的第一图像;对第一图像进行分区处理,获得第一图像的中心区域和角区域;获得第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度;根据第一图像的中心区域的平均亮度和第一图像的角区域的平均亮度获得亮度差指标值;将多个候选补光方案中亮度差指标值最小的候选补光方案确定为目标补光方案,以在传感器进行拍摄时控制补光光源按照目标补光方案进行补光。
以上具体地示出和描述了本公开的示例性实施例。应可理解的是,本公开不限于这里描述的详细结构、设置方式或实现方法;相反,本公开意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效设置。

Claims (10)

  1. 一种补光方法,其中,包括:
    根据设置在传感器中的补光光源获得多个候选补光方案;
    对于所述多个候选补光方案中的各个候选补光方案,在所述传感器进行拍摄时控制所述补光光源按照所述候选补光方案进行补光,获得拍摄得到的第一图像;
    对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域;
    获得所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度;
    根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值;
    将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,以在所述传感器进行拍摄时控制所述补光光源按照所述目标补光方案进行补光。
  2. 根据权利要求1所述的方法,其中,所述第一图像的角区域包括所述第一图像的多个角的区域;
    根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值,包括:
    获得所述第一图像的中心区域的平均亮度与所述第一图像的各个角的区域的平均亮度的差的平均值,作为所述亮度差指标值。
  3. 根据权利要求1所述的方法,其中,还包括:
    判断所述第一图像的中心区域的平均亮度是否小于第一亮度阈值,所述第一亮度阈值根据所述传感器的采样位数获得;
    将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,包括:
    若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
  4. 根据权利要求3所述的方法,其中,还包括:
    判断所述第一图像的中心区域的平均亮度是否大于第二亮度阈值,所述第二亮度阈值为将所述第一亮度阈值乘以预设系数获得;
    若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,包括:
    若确定所述第一图像的中心区域的平均亮度小于所述第一亮度阈值,并且确定所述第一图像的中心区域的平均亮度大于所述第二亮度阈值,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案。
  5. 根据权利要求1所述的方法,其中,对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域,包括:
    将所述第一图像均匀划分为目标数量个子区域;
    将所述第一图像正中心的子区域作为所述第一图像的中心区域;
    将所述第一图像四个角的子区域作为所述第一图像的角区域。
  6. 根据权利要求1所述的方法,其中,所述补光光源包括多个灯珠组,所述多个灯珠组中的各个灯珠组包括多个亮度等级;
    根据设置在传感器中的补光光源获得多个候选补光方案,包括:
    对于所述多个灯珠组中的各个灯珠组,遍历设置各个亮度等级,获得所述多个候选补光方案。
  7. 一种补光亮度调整装置,其中,用于实现如权利要求1-6任一项所述的方法,所述装置包括:
    第一固定结构,用于固定传感器;
    第二固定结构,用于固定评估板;
    连接结构,用于连接所述第一固定结构和所述第二固定结构,以使所述评估板位于所述传感器的摄像头的正前方;
    调节结构,设置在所述连接结构上,用于调节所述评估板于所述传感器之间的距离;
    控制器,与所述传感器相连接,用于控制所述传感器遍历候选补光方案,并控制所述传感器通过其摄像头拍摄所述评估板获得第一图像,以及执行如权利要求1-6任一项所述的方法。
  8. 一种补光装置,其中,包括:
    获取模块,用于根据设置在传感器中的补光光源获得多个候选补光方案;
    图像获得模块,用于对于所述多个候选补光方案中的各个候选补光方案,在所述传感器进行拍摄时控制所述补光光源按照所述候选补光方案进行补光,获得拍摄得到的第一图像;
    图像处理模块,用于对所述第一图像进行分区处理,获得所述第一图像的中心区域和角区域;
    亮度优化模块,用于获得所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度;
    所述亮度优化模块,还用于根据所述第一图像的中心区域的平均亮度和所述第一图像的角区域的平均亮度获得亮度差指标值;
    参数确定模块,将所述多个候选补光方案中所述亮度差指标值最小的候选补光方案确定为目标补光方案,以在所述传感器进行拍摄时控制所述补光光源按照所述目标补光方案进行补光。
  9. 一种电子设备,包括:存储器、处理器及存储在所述存储器中并可在所述处理器中运行的可执行指令,其中,所述处理器执行所述可执行指令时实现如权利要求1-7任一项所述的方法。
  10. 一种计算机可读存储介质,其上存储有计算机可执行指令,其中,所述可执行指令被处理器执行时实现如权利要求1-7任一项所述的方法。
PCT/CN2022/117077 2022-03-28 2022-09-05 补光方法、装置、设备、存储介质及补光亮度调整装置 WO2023184863A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210330267.1A CN114900617B (zh) 2022-03-28 2022-03-28 补光方法、装置、设备、存储介质及补光亮度调整装置
CN202210330267.1 2022-03-28

Publications (2)

Publication Number Publication Date
WO2023184863A1 WO2023184863A1 (zh) 2023-10-05
WO2023184863A9 true WO2023184863A9 (zh) 2023-12-28

Family

ID=82714559

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117077 WO2023184863A1 (zh) 2022-03-28 2022-09-05 补光方法、装置、设备、存储介质及补光亮度调整装置

Country Status (2)

Country Link
CN (1) CN114900617B (zh)
WO (1) WO2023184863A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900617B (zh) * 2022-03-28 2023-08-08 北京京东乾石科技有限公司 补光方法、装置、设备、存储介质及补光亮度调整装置
CN116721103B (zh) * 2023-08-10 2023-10-27 山东明佳科技有限公司 乳玻瓶内底净度的图像检测方法、系统、设备和存储介质

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0727151B2 (ja) * 1990-01-30 1995-03-29 キヤノン株式会社 カメラ
JP3080968B2 (ja) * 1990-06-05 2000-08-28 旭光学工業株式会社 測光装置
JP2000039551A (ja) * 1998-07-23 2000-02-08 Canon Inc カメラ
JP2008298941A (ja) * 2007-05-30 2008-12-11 Konica Minolta Opto Inc 撮像装置
CN104113688B (zh) * 2014-06-26 2019-01-15 联想(北京)有限公司 一种图像处理方法及其电子设备
CN107948539B (zh) * 2015-04-30 2020-07-17 Oppo广东移动通信有限公司 一种闪光灯控制方法及终端
CN107566695B (zh) * 2017-08-14 2019-07-02 厦门美图之家科技有限公司 一种补光方法及移动终端
CN111294521B (zh) * 2018-12-06 2023-04-07 北京京东尚科信息技术有限公司 一种补光方法、装置和计算机可读存储介质
CN209416658U (zh) * 2019-02-11 2019-09-20 北京京东尚科信息技术有限公司 一种补光灯板光强均匀性测量装置
CN112243120A (zh) * 2019-07-17 2021-01-19 南昌欧菲生物识别技术有限公司 3d摄影模组镜头精度的标定方法、装置及设备
CN110995975A (zh) * 2019-12-19 2020-04-10 新立讯科技股份有限公司 一种自动采集拍照设备
CN111083388B (zh) * 2019-12-26 2021-04-16 浙江大华技术股份有限公司 一种补光灯控制方法、装置、电子设备及存储介质
CN112188112A (zh) * 2020-09-28 2021-01-05 苏州臻迪智能科技有限公司 一种补光控制方法、补光控制装置、存储介质和电子设备
CN112861839A (zh) * 2021-02-25 2021-05-28 佛山市顺德区美的洗涤电器制造有限公司 用于洗碗机的方法、装置以及洗碗机
CN113612991A (zh) * 2021-09-15 2021-11-05 深圳市丘钛微电子科技有限公司 一种补光型摄像机的亮度均匀性检测方法及装置
CN114900617B (zh) * 2022-03-28 2023-08-08 北京京东乾石科技有限公司 补光方法、装置、设备、存储介质及补光亮度调整装置

Also Published As

Publication number Publication date
WO2023184863A1 (zh) 2023-10-05
CN114900617B (zh) 2023-08-08
CN114900617A (zh) 2022-08-12

Similar Documents

Publication Publication Date Title
WO2023184863A9 (zh) 补光方法、装置、设备、存储介质及补光亮度调整装置
CN109360396B (zh) 基于图像识别技术和NB-IoT技术的远程抄表方法及系统
JP2009230537A (ja) 画像処理装置、画像処理プログラム、画像処理方法、および、電子機器
CN108574825A (zh) 一种云台摄像机的调整方法和装置
KR20060048746A (ko) 화상의 영역분할
CN112197766B (zh) 一种针对系留旋翼平台的视觉测姿装置
CN117541578B (zh) 一种高性能全视角液晶显示屏检测方法及系统
CN113516939A (zh) 亮度校正方法、装置、显示设备、计算设备及存储介质
CN114708326A (zh) 自适应调整亮度和模糊度的全自动相机标定系统及其方法
CN114079768A (zh) 图像的清晰度测试方法及装置
CN109348207B (zh) 色温调节方法、图像处理方法及装置、介质和电子设备
CN110728718A (zh) 改进摄像机标定各参数的方法
CN111598097B (zh) 一种基于机器人视觉的仪表位置、读数识别方法和系统
CN112762896B (zh) 一种大景深镜头相机水平度判定调整的装置及方法
CN113610782B (zh) 一种建筑物变形监测方法、设备及存储介质
CN112036401B (zh) 一种基于车牌图像属性标定的车牌识别一体机评测方法及装置
CN112381896B (zh) 一种显微图像的亮度校正方法及系统、计算机设备
CN116703803A (zh) 用于检测电池极片边缘的毛刺的方法、设备和系统
CN115482276A (zh) 一种基于相移偏折测量系统的高精度标定方法
CN110887488A (zh) 一种无人驾驶碾压机定位方法
CN117174036B (zh) 一种基于tft液晶面板的自动对焦方法及系统
CN109059800B (zh) 一种三维重建装置的光源位置校准方法
CN112131640A (zh) 一种基于svg的全景图像绘制方法、装置、计算机设备及存储介质
CN113834488B (zh) 基于结构光阵列远程识别的机器人空间姿态解算方法
CN114666558B (zh) 投影画面清晰度的检测方法、装置、存储介质及投影设备