[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2019104622A1 - 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium - Google Patents

差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium Download PDF

Info

Publication number
WO2019104622A1
WO2019104622A1 PCT/CN2017/113890 CN2017113890W WO2019104622A1 WO 2019104622 A1 WO2019104622 A1 WO 2019104622A1 CN 2017113890 W CN2017113890 W CN 2017113890W WO 2019104622 A1 WO2019104622 A1 WO 2019104622A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
camera
difference
calibration
value
Prior art date
Application number
PCT/CN2017/113890
Other languages
French (fr)
Chinese (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 深圳市大疆创新科技有限公司
Priority to PCT/CN2017/113890 priority Critical patent/WO2019104622A1/en
Priority to CN201780037798.9A priority patent/CN109417604A/en
Publication of WO2019104622A1 publication Critical patent/WO2019104622A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • 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

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to a differential calibration method, a binocular vision system, and a computer readable storage medium.
  • the binocular vision system measurement may be caused ( Distance) failure or erroneous measurement.
  • Embodiments of the present invention provide a differential calibration method, a binocular vision system, and a computer readable storage medium.
  • a difference calibration method is used in a binocular vision system, the binocular vision system includes a first camera and a second camera, and the difference calibration method includes:
  • a binocular vision system includes a first camera, a second camera, and a processor, wherein the processor is configured to:
  • a computer readable storage medium in accordance with an embodiment of the present invention includes a computer program for use in conjunction with a binocular vision system, the computer program being executable by a processor to perform the difference calibration method of the above-described embodiments.
  • the difference calibration method, the binocular vision system, and the computer readable storage medium of the embodiments of the present invention are detected by real time
  • the image brightness difference value of the first image and the second image is used to update the exposure parameters of the first camera and the second camera when the image brightness difference value is large, so that the brightness difference values of the collected first image and the second image are controlled at a certain value Within the range, thereby reducing the measurement failure or erroneous measurement caused by the difference in image brightness of the two images acquired by the first camera and the second camera at the same time in the image processing.
  • FIG. 1 is a functional block diagram of a binocular vision system in accordance with some embodiments of the present invention.
  • FIG. 2 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 3 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 4 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 5 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 6 is a schematic diagram of image region division of a difference calibration method according to some embodiments of the present invention.
  • FIG. 7 is a schematic diagram of image region division of a difference calibration method according to some embodiments of the present invention.
  • FIG. 8 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 9 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 10 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • FIG. 11 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” or “second” may include one or more of the described features either explicitly or implicitly.
  • the meaning of "a plurality" is two or more unless specifically and specifically defined otherwise.
  • connection In the description of the present invention, it should be noted that the terms “installation”, “connected”, and “connected” are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected in one piece; can be mechanical, electrical, or can communicate with each other; either directly or through an intermediary Indirectly connected, it can be the internal communication of two components or the interaction of two components.
  • Connected, or connected in one piece can be mechanical, electrical, or can communicate with each other; either directly or through an intermediary Indirectly connected, it can be the internal communication of two components or the interaction of two components.
  • the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
  • a binocular vision system 10 of an embodiment of the present invention includes a first camera 12, a second camera 14, and a processor 16.
  • the processor 16 is configured to acquire the image brightness values of the first image and the second image of the same scene at the current time by the first camera 12 and the second camera 14 in real time.
  • the processor 16 is configured to calculate an image brightness difference value between the first image and the second image.
  • the processor 16 is configured to determine whether the image brightness difference value is greater than a predetermined threshold.
  • the processor 16 is configured to update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment when the image brightness difference value is greater than a predetermined threshold.
  • the difference calibration method of the embodiment of the present invention can be applied to the binocular vision system 10 of the embodiment of the present invention, that is, the binocular vision system 10 of the embodiment of the present invention can apply the difference of the embodiment of the present invention.
  • the calibration method updates the exposure parameters of the first camera 12 and/or the second camera 14.
  • the differential calibration method includes the following steps:
  • the binocular vision system 10 of the embodiment of the present invention simultaneously acquires digital images of the same scene from different angles by two camera modules mounted at fixed positions based on the principle of parallax to obtain three-dimensional shape and position information of the scene.
  • the binocular vision system 10 can be applied to devices such as drones, smart robots, driverless cars, and panoramic depth cameras to achieve perception of the three-dimensional shape of the scene around the device and measurement of the positional distance.
  • the binocular vision system 10 requires that system differences between the two camera modules be minimized, wherein two camera modules are collected. Minimizing the difference in image brightness between the images is advantageous for improving the accuracy of the measurement results of the binocular vision system 10. Therefore, it is necessary to calibrate the brightness of the image acquired by the two cameras, and reduce or eliminate system differences by compensating for the difference value of the calibration.
  • the difference values that need to be compensated under different brightness conditions may be different.
  • the binocular vision system 10 and the difference calibration method of the embodiment of the present invention detect the luminance difference value of the first image and the second image in real time, and update the first camera 12 and/or the second camera 14 when the luminance difference value is large.
  • the exposure parameters for the next moment The binocular vision system 10 can update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment when the brightness value of the scene in which the image is acquired changes, so that the first camera 12 and the second camera 14 are next.
  • the image brightness difference between the first image and the second image of the same scene is minimized at all times.
  • the first camera 12 and the second camera 14 are used to acquire the image brightness of the first image and the second image of the same scene at the next moment. Consistently, it is advantageous to reduce measurement failure or erroneous measurement due to image brightness difference in image processing.
  • the binocular vision system 10 captures a digital image of the current scene through the first camera 12 and the second camera 14, wherein the first camera 12 captures the first image of the current scene from one angle while the second camera 14 captures the same image from another angle
  • the processor 16 may implement step S1 to acquire image brightness values of the first image and the second image in real time.
  • the processor 16 may implement step S2 to calculate an image brightness difference value by a preset algorithm according to image brightness values of the first image and the second image.
  • the processor 16 may implement step S3 to compare the image brightness difference value with a predetermined threshold value to determine whether the image brightness difference value exceeds a predetermined threshold.
  • the image brightness difference value when the image brightness difference value is less than or equal to a predetermined threshold, the image brightness difference between the first image and the second image has little influence on the accuracy of the measurement result in the subsequent image processing. At this time, the first camera does not need to be updated. 12 and exposure parameters of the second camera 14.
  • the processor 16 may implement step S4. When the image brightness difference value is greater than a predetermined threshold, the image brightness difference between the first image and the second image is more likely to cause measurement failure or erroneous measurement in subsequent image processing.
  • the processor 16 updates the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment, so that the image brightness difference between the first image and the second image acquired after the update is reduced, which is beneficial to improve binocular vision.
  • System 10 measures the accuracy of the results.
  • the difference calibration method includes: S5, determining whether the binocular vision system 10 continues to work when the image brightness difference value is less than or equal to a predetermined threshold, and continues to work in the binocular vision system 10. At the same time, the image brightness values of the first image and the second image of the current scene acquired by the first camera 12 and the second camera 14 at the next moment are acquired.
  • the processor 16 can implement step S5.
  • the first camera 12 and the second camera 14 continuously collect images of the current scene.
  • the image brightness difference value is less than or equal to a predetermined threshold, it is not necessary to update the exposure parameters of the binocular vision system 10.
  • the processor 16 acquires the first image and the second image at the next moment to detect the brightness difference of the system in real time.
  • the difference calibration method includes: S5, after updating the exposure parameters of the first camera 12 and/or the second camera 14, determining whether the binocular vision system 10 continues to operate and continuing in the binocular vision system 10 In operation, the image brightness values of the first image and the second image of the current scene acquired by the first camera 12 and the second camera 14 at the next moment are acquired.
  • the processor 16 can implement step S5. After the update is completed, the exposure parameters of the first camera 12 and the second camera 14 at the next moment are updated exposure parameters, and the images of the first image and the second image are acquired thereby.
  • the decrease in the brightness difference value is advantageous for improving the accuracy of the measurement result of the binocular vision system 10.
  • the processor 16 acquires the first image and the second image at the next moment to detect the image brightness difference of the system in real time.
  • step S1 includes:
  • the processor 16 may implement steps S12 and S14, and the image brightness values of the first image and the second image may be weighted brightness values, and the processor 16 may divide the image into a plurality of regions and divide according to the location of the region of interest.
  • the corresponding weights are set for each area.
  • the weight of the region of interest is the largest, and the weights of other regions in the image that are far from the region of interest are gradually reduced.
  • the image brightness values of the first image and the second image are greatly affected by the brightness values of the region of interest, which is advantageous for improving the accuracy of the measurement results of the binocular vision system 10 in the image region of interest.
  • the region of interest can be determined according to the focus region. Of course, the region of interest can also be obtained by other implementations.
  • step S12 includes:
  • the binocular vision system 10 can be applied in different devices, and correspondingly, the regions of interest of the images can be different.
  • the binocular vision system 10 in a drone, the binocular vision system 10 is often in high altitude when it is running, and it is necessary to detect and notice whether there is an obstacle above the scene, so that the region of interest can be the upper half of the image; and in the driverless car.
  • the binocular vision system 10 is often located on the ground during operation, and needs to detect three-dimensional information of the road surface and distance information.
  • the region of interest may be the lower half of the image.
  • the binocular vision system 10 can select different region divisions and weights of corresponding regions according to different regions of interest.
  • the corresponding regions of interest of the images may be different.
  • the corresponding interest area may be the lower left part of the image, and the corresponding area
  • the weight size distribution is lower left > lower right > upper left and upper right.
  • the driverless car turns right, in addition to detecting the three-dimensional information and distance information of the road surface, it is also necessary to detect the road condition information on the right side.
  • the corresponding interest area may be the lower left part of the image, and the weight distribution of the corresponding area is lower right> lower left. > Top left, top right.
  • the processor 16 can implement step S122, step S124, and step S126, according to the binocular vision system 10
  • the working state determines an area of interest of the image, and obtains the area division of the image and the weight of the corresponding area according to the area of interest to calculate the image brightness value.
  • processor 16 pre-stores the correspondence of regions of interest to region partitions and weight distributions. In this way, after determining the region of interest, the region division can be acquired according to the correspondence relationship and the weighted luminance value of the image can be calculated.
  • the region partitioning of the binocular vision system 10 can divide the image equally into a plurality of regions of the same size.
  • the region of interest shown in FIG. 6 is the central region of the image, and the image is equally divided into 4*4 regions of the same size, and the number in the region is the weight of the corresponding region.
  • the area division of the binocular vision system 10 may be smaller in the area of interest region division, and the area divided away from the interest area may be larger.
  • the interest area shown in FIG. 7 is the lower left area of the image, and the lower left area of the image is divided into 4*4 small areas of the same size, and the upper left area and the lower right area of the image are divided into 3*3 small areas of the same size, images.
  • the upper right area is divided into 2*2 small areas of the same size, and the values in each small area are the weights of the corresponding areas. As such, the accuracy of the binocular vision system 10 in the region of interest can be improved.
  • the weight of the corresponding area when the image area is divided can be flexibly configured according to requirements.
  • step S14 includes:
  • the processor 16 may implement steps S142 and S144 to calculate image brightness values of the first image and the second image based on the respective region luminance values and corresponding weights.
  • the luminance values of the respective regions of the image are a1, a2, a3, ..., an
  • the weights of the corresponding regions are k1, k2, k3, ..., kn, respectively
  • the image luminance value a (k1 * a1 + k2 * a2 + k3 * a3 + ... + kn * an) / (k1 + k2 + k3 + ... + kn) calculated in step S144.
  • step S4 includes:
  • the exposure parameters can be calibrated for updating by the difference calibration parameters.
  • the difference calibration parameter is a difference coefficient between the exposure parameter of the first camera 12 and/or the second camera 14 that is not calibrated and the updated exposure parameter.
  • the processor 16 may implement step S42 to calculate a difference calibration parameter according to a preset algorithm when the image brightness difference value is greater than a predetermined threshold.
  • the processor 16 may implement step S44 to update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment based on the calculated difference calibration parameters.
  • the reference brightness value is any of an image brightness value of the first image, an image brightness value of the second image, or an average image brightness value of the first image and the second image. One.
  • the binocular vision system 10 needs to select a reference brightness value and update the first camera 12 and/or the second camera 14 with reference to the reference brightness value.
  • the exposure parameter at a moment makes the luminance value of the acquired first image coincide with the image luminance value of the second image.
  • the processor 16 When the image brightness difference value is greater than a predetermined threshold, the processor 16 generates a reference brightness value according to a preset algorithm according to the image brightness values of the first image and the second image, such that the reference brightness and the currently acquired brightness of the first image and the second image Correspondingly, it is advantageous to update the exposure parameters of the first camera 12 and the second camera 14 in real time and accurately.
  • the reference brightness value may be an image brightness value of the first image, and when the image brightness difference value is greater than a predetermined threshold, the exposure parameter of the next time of the second camera 14 is updated to make the image brightness value of the second image acquired at the next time. Consistent with the image brightness value of the first image.
  • the reference brightness value may be an image brightness value of the second image, and when the image brightness difference value is greater than a predetermined threshold, the exposure parameter of the next time of the first camera 12 is updated to make the image brightness value of the first image acquired at the next time. Consistent with the image brightness value of the second image.
  • the reference brightness value may be an average image brightness value of the first image and the second image
  • the exposure parameters of the next time of the first camera 12 and the second camera 14 are respectively updated to enable The image brightness value of the first image acquired at the next time is equal to the image brightness value of the second image and coincides with the average image brightness value of the first image and the second image.
  • the average image brightness value of the first image and the second image may be any one of a weighted average brightness value and an arithmetic mean brightness value.
  • the reference brightness generated by the processor 16 is the average image brightness value of the first image and the second image, it is necessary to simultaneously update the exposure parameters of the first camera 12 and the second camera 14 at the next time, and the parameter variation range is small.
  • the weighted average luminance values of the first image and the second image may be (m*a+n*b)/(m+n), where a and b are image luminances of the first image and the second image, respectively.
  • the values, m, n are weights corresponding to the image brightness values of the first image and the second image, respectively.
  • the arithmetic average luminance value of the first image and the second image may be (a+b)/2, where a and b are image luminance values of the first image and the second image, respectively.
  • the image brightness difference value includes an absolute difference value
  • step S2 includes: calculating an absolute difference according to the image brightness value of the first image and the second image and the current difference calibration parameter corresponding to the acquired first image and the second image.
  • the value of the absolute difference is calculated using the following conditional formula:
  • D
  • or D
  • D is the absolute difference value
  • a and b are the image brightness values of the first image and the second image, respectively, xa and xb respectively
  • D is the absolute difference value
  • a and b are the image brightness values of the first image and the second image, respectively, xa and xb respectively
  • the processor 16 can detect the absolute difference values of the first image and the second image. In the case where the brightness is large, the absolute difference values are significantly different, which is advantageous for comparison with a predetermined threshold to determine whether the binocular vision system 10 needs to be updated. Exposure parameters.
  • the image brightness difference value includes a relative difference value
  • step S2 includes: calibrating according to the image brightness value of the first image and the second image, the reference brightness value, and the current difference corresponding to the acquired first image and the second image.
  • the parameter calculates the relative difference value, wherein the relative difference value is the ratio of the absolute difference value to the reference brightness value, and the absolute difference value is calculated by the following conditional expression:
  • D
  • or D
  • D is an absolute difference value
  • a and b are image brightness values of the first image and the second image, respectively
  • xa and xb are current difference calibration parameters corresponding to the first image and the second image, respectively.
  • the processor 16 can detect the relative difference values of the first image and the second image. If the brightness is small, the absolute difference values are not significantly different. At this time, detecting the relative difference value is beneficial to compare with a predetermined threshold to determine Whether the exposure parameters of the binocular vision system 10 need to be updated.
  • the predetermined threshold includes an absolute threshold and a relative threshold
  • step S3 includes:
  • the processor 16 may implement step S32 and step S34.
  • the absolute difference value is greater than the absolute threshold and/or the relative difference value is greater than the relative threshold
  • the image brightness difference value of the first image and the second image may be considered to be greater than a predetermined threshold.
  • the exposure parameters of the first camera 12 and the second camera 14 should be updated to reduce measurement failure or erroneous measurements that occur in subsequent image processing.
  • step S42 includes: S422, according to image brightness values of the first image and the second image, and current difference calibration parameters and reference brightness values corresponding to the first image and the second image.
  • the difference calibration parameters of the first image and the second image are calculated, and the difference calibration parameters are calculated by the following conditional formula:
  • a and b are image brightness values of the first image and the second image, respectively, xa and xb are current difference calibration parameters corresponding to the first image and the second image, aedc is the difference calibration parameter, and ref is the reference.
  • the brightness value, xref is the difference calibration parameter corresponding to the reference brightness value, and aedc_ref(1) is the reference difference calibration parameter.
  • both xref and aedc_ref(1) are 1.
  • the processor 16 can implement the step S422.
  • the current difference calibration parameter may be a difference calibration parameter corresponding to the previous time when the exposure parameters of the first camera 12 and the second camera 14 are updated.
  • the image brightness values of the first image and the second image may be brightness after calibration by the current difference calibration parameter value.
  • the a/xa, b/xb may be considered as the image brightness values acquired by the first camera 12 and the second camera 14 that have not been calibrated by the current difference calibration parameter when the first image and the second image are currently acquired.
  • the difference calibration parameter xref and the reference difference calibration parameter aedc_ref(1) corresponding to the reference luminance value are both 1, that is, the right side of the conditional expression is the reference luminance ref, and thus, the processor 16 can calculate according to the above conditional expression.
  • the difference calibration parameter aedc makes the image brightness value of the first image and/or the second image after calibration coincide with the reference brightness value.
  • the exposure parameters include an automatic exposure parameter and a calibration exposure parameter
  • step S44 includes: S442, calculating the first camera 12 and/or the first based on the difference calibration parameter and the exposure parameters of the first camera 12 and the second camera 14.
  • the camera module can usually perform automatic exposure, and automatically adjust the exposure parameters according to the intensity of the light to prevent overexposure or deficiency.
  • the binocular vision system 10 can determine whether it is necessary to update the exposure parameters of the first camera 12 and/or the second camera 14 based on the brightness value of the automatically exposed image, and the automatic exposure and the difference calibration parameters simultaneously act to improve the double The accuracy of the visual system 10 measurement results ensures that the binocular vision system 10 is operating normally.
  • Processor 16 may implement step S442 to calculate a calibration exposure parameter when it is desired to update the exposure parameters of first camera 12 and second camera 14.
  • the processor 16 may update the exposure parameters of the first camera 12 and/or the second camera 14 to the calculated calibration exposure parameters.
  • the auto exposure parameter may be an exposure parameter obtained by the first camera 12 and/or the second camera 14 automatically exposing according to the image brightness values of the respective acquired images.
  • the auto exposure parameter may be an exposure parameter obtained by the first camera 12 and/or the second camera 14 automatically exposing according to a reference brightness value.
  • the auto exposure parameter includes at least one of a coarse adjustment exposure time, an analog gain, and a digital gain.
  • the calibration exposure parameters include at least one of a coarse adjustment exposure time, a fine adjustment exposure time, a line cycle time, an analog gain, and a digital gain.
  • the automatic exposure generally adjusts the coarse adjustment exposure time, the analog gain and the digital gain of the camera module
  • the automatic exposure parameter of the binocular vision system 10 can be at least one of a coarse adjustment exposure time, an analog gain, and a digital gain.
  • the calibration exposure parameter is adjusted based on the automatic exposure, and the adjusted parameters may be at least one of a coarse adjustment exposure time, a fine adjustment exposure time, a line cycle time, an analog gain, and a digital gain.
  • the calibration exposure parameter is calculated by the following conditional expression:
  • Y is the calibration exposure parameter
  • r is the default exposure parameter of the first camera 12 or the second camera 14
  • c is the difference calibration parameter.
  • the calibration exposure parameters calculated by the processor 16 are all different from the types of the automatic exposure parameters, that is, the parameters adjusted during the automatic exposure. There is no effect on the exposure parameters that need to be updated. As such, the calibration exposure parameters are calculated and updated directly from the difference calibration parameters and the default exposure parameters.
  • the default exposure parameter is a parameter value of each exposure parameter of the image acquired when the camera does not adopt the difference calibration parameter.
  • the calibration exposure parameters are calculated using the following conditional formula:
  • Y is a calibration exposure parameter
  • g is an automatic exposure parameter corresponding to the acquisition of the first image and/or the second image
  • c is a difference calibration parameter
  • the calibration exposure parameters calculated by the processor 16 are all the same as the types of the automatic exposure parameters, that is, the updated exposure parameters are automatically
  • the exposure adjustment and the adjustment of the difference calibration parameters enable the luminance values of the first image and/or the second image to coincide with the reference luminance values.
  • the calibration exposure parameters are calculated and updated based on the automatic exposure parameters based on the automatic exposure parameters and the difference calibration parameters.
  • the calibration exposure parameter is calculated using the following conditional formula:
  • Y1 and Y2 are calibration exposure parameters
  • g is an automatic exposure parameter corresponding to the first image and/or the second image
  • r is a default exposure parameter of the first camera 112 or the second camera 114
  • c1*c2 c
  • c is the difference calibration parameter
  • the calibration exposure parameters calculated by the processor 16 are partially the same as the types of the automatic exposure parameters and the other portions are different, ie, updated.
  • the part of the exposure parameter whose calibration exposure parameter is the same as the type of the automatic exposure parameter is adjusted by the automatic exposure adjustment and the difference calibration parameter.
  • the different parts of the calibration exposure parameter and the type of the automatic exposure parameter are adjusted by the difference calibration parameter, and the two parts work together to make adjustment.
  • the image brightness value of the first image and/or the second image coincides with the reference brightness value.
  • the portion of the calibration exposure parameter and the type of the automatic exposure parameter is calculated and updated based on the automatic exposure based on the automatic exposure parameter and the difference calibration parameter.
  • the part where the calibration exposure parameter is different from the type of the automatic exposure parameter, that is, the Y2 part is calculated and updated according to the difference calibration parameter and the default exposure parameter.
  • c1 and c2 in the above conditional formula can be flexibly configured according to requirements.
  • a computer readable storage medium in accordance with an embodiment of the present invention includes a computer program for use with a binocular vision system that can be executed by processor 16 to perform the differential calibration method of the above-described embodiments.
  • a computer program can be executed by processor 16 to perform the difference calibration method described in the following steps:
  • the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment are updated when the image brightness difference value is greater than a predetermined threshold.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • a plurality of steps or methods may be implemented by software stored in a memory and executed by a suitable instruction execution system or Firmware to achieve.
  • a suitable instruction execution system or Firmware to achieve.
  • it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Studio Devices (AREA)

Abstract

Disclosed is a differential calibration method. The differential calibration method can be implemented by a binocular vision system (10). The binocular vision system (10) comprises a first camera (12) and a second camera (14). The differential calibration method comprises: (S1) acquiring in real-time an image brightness value of a first image and that of a second image of a same scene captured at the current moment correspondingly by the first camera (12) and by the second camera (14); (S2) calculating the image brightness difference between the first image and the second image; (S3) determining whether the image brightness difference is greater than a predetermined threshold; and, (S4) when the image brightness difference is greater than the predetermined threshold, updating an exposure parameter for the next moment of the first camera (12) and/or that of the second camera (14). Also disclosed are the binocular vision system (10) and the computer-readable storage medium.

Description

差异校准方法、双目视觉系统和计算机可读存储介质Differential calibration method, binocular vision system, and computer readable storage medium 技术领域Technical field
本发明涉及电子技术领域,特别涉及一种差异校准方法、双目视觉系统和计算机可读存储介质。The present invention relates to the field of electronic technologies, and in particular, to a differential calibration method, a binocular vision system, and a computer readable storage medium.
背景技术Background technique
相关技术的双目视觉系统中,使用两个摄像头采集同一场景的左眼图像和右眼图像,假若两个摄像头采集的左眼图像和右眼图像存在亮度差异可能会导致双目视觉系统测量(距离)失效或者错误测量。In the related art binocular vision system, two cameras are used to acquire the left eye image and the right eye image of the same scene, and if there is a difference in brightness between the left eye image and the right eye image collected by the two cameras, the binocular vision system measurement may be caused ( Distance) failure or erroneous measurement.
发明内容Summary of the invention
本发明的实施例提供一种差异校准方法、双目视觉系统和计算机可读存储介质。Embodiments of the present invention provide a differential calibration method, a binocular vision system, and a computer readable storage medium.
本发明实施方式的一种差异校准方法用于双目视觉系统,所述双目视觉系统包括第一摄像头和第二摄像头,所述差异校准方法包括:A difference calibration method according to an embodiment of the present invention is used in a binocular vision system, the binocular vision system includes a first camera and a second camera, and the difference calibration method includes:
实时获取所述第一摄像头和所述第二摄像头当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;Acquiring image brightness values of the first image and the second image of the same scene currently acquired by the first camera and the second camera in real time;
计算所述第一图像和所述第二图像之间的图像亮度差异值;Calculating an image brightness difference value between the first image and the second image;
判断所述图像亮度差异值是否大于预定阈值;和Determining whether the image brightness difference value is greater than a predetermined threshold; and
在所述图像亮度差异值大于所述预定阈值时更新所述第一摄像头和/或所述第二摄像头下一时刻的曝光参数。And updating an exposure parameter of the first camera and/or the second camera at a next moment when the image brightness difference value is greater than the predetermined threshold.
本发明实施方式的一种双目视觉系统包括第一摄像头、第二摄像头和处理器,所述处理器用于:A binocular vision system according to an embodiment of the present invention includes a first camera, a second camera, and a processor, wherein the processor is configured to:
实时获取所述第一摄像头和所述第二摄像头当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;Acquiring image brightness values of the first image and the second image of the same scene currently acquired by the first camera and the second camera in real time;
计算所述第一图像和所述第二图像之间的图像亮度差异值;Calculating an image brightness difference value between the first image and the second image;
判断所述图像亮度差异值是否大于预定阈值;和Determining whether the image brightness difference value is greater than a predetermined threshold; and
在所述图像亮度差异值大于所述预定阈值时更新所述第一摄像头和/或所述第二摄像头下一时刻的曝光参数。And updating an exposure parameter of the first camera and/or the second camera at a next moment when the image brightness difference value is greater than the predetermined threshold.
本发明实施方式的一种计算机可读存储介质包括与双目视觉系统结合使用的计算机程序,所述计算机程序可被处理器执行以完成上述实施方式的差异校准方法。A computer readable storage medium in accordance with an embodiment of the present invention includes a computer program for use in conjunction with a binocular vision system, the computer program being executable by a processor to perform the difference calibration method of the above-described embodiments.
本发明实施方式的差异校准方法、双目视觉系统和计算机可读存储介质通过实时检测 第一图像和第二图像的图像亮度差异值,在图像亮度差异值较大时更新第一摄像头和第二摄像头的曝光参数,使得采集的第一图像和第二图像的亮度差异值控制在一定范围内从而减小在图像处理中因第一摄像头和第二摄像头同一时刻采集的两张图像的图像亮度差异产生的测量失效或错误测量。本发明的实施方式的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实施方式的实践了解到。The difference calibration method, the binocular vision system, and the computer readable storage medium of the embodiments of the present invention are detected by real time The image brightness difference value of the first image and the second image is used to update the exposure parameters of the first camera and the second camera when the image brightness difference value is large, so that the brightness difference values of the collected first image and the second image are controlled at a certain value Within the range, thereby reducing the measurement failure or erroneous measurement caused by the difference in image brightness of the two images acquired by the first camera and the second camera at the same time in the image processing. The additional aspects and advantages of the embodiments of the present invention will be set forth in part in the description which follows.
附图说明DRAWINGS
本发明的上述和/或附加的方面和优点从结合下面附图对实施方式的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from
图1是本发明某些实施方式的双目视觉系统的功能模块示意图。1 is a functional block diagram of a binocular vision system in accordance with some embodiments of the present invention.
图2是本发明某些实施方式的差异校准方法的流程示意图。2 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图3是本发明某些实施方式的差异校准方法的流程示意图。3 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图4是本发明某些实施方式的差异校准方法的流程示意图。4 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图5是本发明某些实施方式的差异校准方法的流程示意图。5 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图6是本发明某些实施方式的差异校准方法的图像区域划分示意图。6 is a schematic diagram of image region division of a difference calibration method according to some embodiments of the present invention.
图7是本发明某些实施方式的差异校准方法的图像区域划分示意图。7 is a schematic diagram of image region division of a difference calibration method according to some embodiments of the present invention.
图8是本发明某些实施方式的差异校准方法的流程示意图。8 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图9是本发明某些实施方式的差异校准方法的流程示意图。9 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图10是本发明某些实施方式的差异校准方法的流程示意图。10 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
图11是本发明某些实施方式的差异校准方法的流程示意图。11 is a flow diagram of a differential calibration method in accordance with some embodiments of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施方式,所述实施方式的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施方式是示例性的,仅用于解释本发明,而不能理解为对本发明的限制。The embodiments of the present invention are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the drawings are intended to be illustrative of the invention and are not to be construed as limiting.
在本发明的描述中,需要理解的是,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个所述特征。在本发明的描述中,“多个”的含义是两个或两个以上,除非另有明确具体的限定。In the description of the present invention, it is to be understood that the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" or "second" may include one or more of the described features either explicitly or implicitly. In the description of the present invention, the meaning of "a plurality" is two or more unless specifically and specifically defined otherwise.
在本发明的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接或可以相互通信;可以是直接相连,也可以通过中间媒介 间接相连,可以是两个元件内部的连通或两个元件的相互作用关系。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本发明中的具体含义。In the description of the present invention, it should be noted that the terms "installation", "connected", and "connected" are to be understood broadly, and may be fixed or detachable, for example, unless otherwise explicitly defined and defined. Connected, or connected in one piece; can be mechanical, electrical, or can communicate with each other; either directly or through an intermediary Indirectly connected, it can be the internal communication of two components or the interaction of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood on a case-by-case basis.
下文的公开提供了许多不同的实施方式或例子用来实现本发明的不同结构。为了简化本发明的公开,下文中对特定例子的部件和设置进行描述。当然,它们仅仅为示例,并且目的不在于限制本发明。此外,本发明可以在不同例子中重复参考数字和/或参考字母,这种重复是为了简化和清楚的目的,其本身不指示所讨论各种实施方式和/或设置之间的关系。此外,本发明提供了的各种特定的工艺和材料的例子,但是本领域普通技术人员可以意识到其他工艺的应用和/或其他材料的使用。The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and arrangements of the specific examples are described below. Of course, they are merely examples and are not intended to limit the invention. In addition, the present invention may be repeated with reference to the numerals and/or reference numerals in the various examples, which are for the purpose of simplicity and clarity, and do not indicate the relationship between the various embodiments and/or arrangements discussed. Moreover, the present invention provides examples of various specific processes and materials, but one of ordinary skill in the art will recognize the use of other processes and/or the use of other materials.
请参阅图1,本发明实施方式的双目视觉系统10包括第一摄像头12、第二摄像头14和处理器16。处理器16用于实时获取第一摄像头12和第二摄像头14当前时刻采集相同场景的第一图像和第二图像的图像亮度值。处理器16用于计算第一图像和第二图像之间的图像亮度差异值。处理器16用于判断图像亮度差异值是否大于预定阈值。处理器16用于在图像亮度差异值大于预定阈值时更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。Referring to FIG. 1, a binocular vision system 10 of an embodiment of the present invention includes a first camera 12, a second camera 14, and a processor 16. The processor 16 is configured to acquire the image brightness values of the first image and the second image of the same scene at the current time by the first camera 12 and the second camera 14 in real time. The processor 16 is configured to calculate an image brightness difference value between the first image and the second image. The processor 16 is configured to determine whether the image brightness difference value is greater than a predetermined threshold. The processor 16 is configured to update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment when the image brightness difference value is greater than a predetermined threshold.
请参阅图2,本发明实施方式的差异校准方法可以应用于本发明实施方式的双目视觉系统10,也即是说,本发明实施方式的双目视觉系统10可以应用本发明实施方式的差异校准方法来更新第一摄像头12和/或第二摄像头14的曝光参数。差异校准方法包括以下步骤:Referring to FIG. 2, the difference calibration method of the embodiment of the present invention can be applied to the binocular vision system 10 of the embodiment of the present invention, that is, the binocular vision system 10 of the embodiment of the present invention can apply the difference of the embodiment of the present invention. The calibration method updates the exposure parameters of the first camera 12 and/or the second camera 14. The differential calibration method includes the following steps:
S1,实时获取第一摄像头12和第二摄像头14当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;S1, real-time acquiring image brightness values of the first image and the second image of the same scene acquired by the first camera 12 and the second camera 14 at a time;
S2,计算第一图像和第二图像之间的图像亮度差异值;S2, calculating an image brightness difference value between the first image and the second image;
S3,判断图像亮度差异值是否大于预定阈值;和S3, determining whether the image brightness difference value is greater than a predetermined threshold; and
S4,在图像亮度差异值大于预定阈值时更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。S4. Update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment when the image brightness difference value is greater than a predetermined threshold.
本发明实施方式的双目视觉系统10基于视差原理,由安装在固定位置的两个摄像头模组从不同角度同时采集同一场景的数字图像以获得该场景的三维形状和位置信息。在一些实施例中,双目视觉系统10可以应用于无人机、智能机器人、无人驾驶汽车以及全景深度相机等设备中,以便实现对设备周围场景的三维形状的感知和位置距离的测量。The binocular vision system 10 of the embodiment of the present invention simultaneously acquires digital images of the same scene from different angles by two camera modules mounted at fixed positions based on the principle of parallax to obtain three-dimensional shape and position information of the scene. In some embodiments, the binocular vision system 10 can be applied to devices such as drones, smart robots, driverless cars, and panoramic depth cameras to achieve perception of the three-dimensional shape of the scene around the device and measurement of the positional distance.
可以理解,双目视觉系统10的两个摄像头模组之间常常存在系统差异,因此,双目视觉系统10要求两个摄像头模组之间的系统差异最小化,其中,两个摄像头模组采集的图像之间的图像亮度差异最小化有利于提高双目视觉系统10测量结果的准确度。因此,需要对两个摄像头采集的图像亮度进行标定,通过补偿标定的差异值减少或消除系统差异,然而 在双目视觉系统10处于亮度多变的场景环境时,不同亮度条件下需要补偿的差异值可能不同。如此,本发明实施方式的双目视觉系统10和差异校准方法通过实时检测第一图像和第二图像的亮度差异值,在亮度差异值较大时更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。双目视觉系统10能够在采集图像的场景的亮度值发生变化时,及时更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数,使第一摄像头12和第二摄像头14下一时刻采集相同场景的第一图像和第二图像的图像亮度差异最小化,优选的,是使第一摄像头12和第二摄像头14下一时刻采集相同场景的第一图像和第二图像的图像亮度一致,有利于减小在图像处理中因图像亮度差异产生的测量失效或错误测量。It can be understood that there are often system differences between the two camera modules of the binocular vision system 10. Therefore, the binocular vision system 10 requires that system differences between the two camera modules be minimized, wherein two camera modules are collected. Minimizing the difference in image brightness between the images is advantageous for improving the accuracy of the measurement results of the binocular vision system 10. Therefore, it is necessary to calibrate the brightness of the image acquired by the two cameras, and reduce or eliminate system differences by compensating for the difference value of the calibration. When the binocular vision system 10 is in a scene environment with varying brightness, the difference values that need to be compensated under different brightness conditions may be different. As such, the binocular vision system 10 and the difference calibration method of the embodiment of the present invention detect the luminance difference value of the first image and the second image in real time, and update the first camera 12 and/or the second camera 14 when the luminance difference value is large. The exposure parameters for the next moment. The binocular vision system 10 can update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment when the brightness value of the scene in which the image is acquired changes, so that the first camera 12 and the second camera 14 are next. The image brightness difference between the first image and the second image of the same scene is minimized at all times. Preferably, the first camera 12 and the second camera 14 are used to acquire the image brightness of the first image and the second image of the same scene at the next moment. Consistently, it is advantageous to reduce measurement failure or erroneous measurement due to image brightness difference in image processing.
双目视觉系统10通过第一摄像头12和第二摄像头14采集当前场景的数字图像,其中,第一摄像头12从一个角度采集当前场景的第一图像,同时第二摄像头14从另一个角度采集同一场景的第二图像。处理器16可以实现步骤S1以实时获取第一图像和第二图像的图像亮度值。处理器16可以实现步骤S2以根据第一图像和第二图像的图像亮度值通过预设的算法计算图像亮度差异值。处理器16可以实现步骤S3以对比图像亮度差异值和预定阈值的大小以判断图像亮度差异值是否超出预定阈值。可以理解,图像亮度差异值小于或等于预定阈值时,第一图像和第二图像之间的图像亮度差异对后续图像处理中测量结果的准确度影响较小,此时,不需要更新第一摄像头12和第二摄像头14的曝光参数。处理器16可以实现步骤S4,在图像亮度差异值大于预定阈值时,第一图像和第二图像之间的图像亮度差异在后续图像处理中产生测量失效或错误测量的可能性较大,此时,处理器16更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数,使得更新后采集到的第一图像和第二图像的图像亮度差异减小,这样有利于提高双目视觉系统10测量结果的准确度。The binocular vision system 10 captures a digital image of the current scene through the first camera 12 and the second camera 14, wherein the first camera 12 captures the first image of the current scene from one angle while the second camera 14 captures the same image from another angle The second image of the scene. The processor 16 may implement step S1 to acquire image brightness values of the first image and the second image in real time. The processor 16 may implement step S2 to calculate an image brightness difference value by a preset algorithm according to image brightness values of the first image and the second image. The processor 16 may implement step S3 to compare the image brightness difference value with a predetermined threshold value to determine whether the image brightness difference value exceeds a predetermined threshold. It can be understood that when the image brightness difference value is less than or equal to a predetermined threshold, the image brightness difference between the first image and the second image has little influence on the accuracy of the measurement result in the subsequent image processing. At this time, the first camera does not need to be updated. 12 and exposure parameters of the second camera 14. The processor 16 may implement step S4. When the image brightness difference value is greater than a predetermined threshold, the image brightness difference between the first image and the second image is more likely to cause measurement failure or erroneous measurement in subsequent image processing. The processor 16 updates the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment, so that the image brightness difference between the first image and the second image acquired after the update is reduced, which is beneficial to improve binocular vision. System 10 measures the accuracy of the results.
请参阅图3,在某些实施方式中,差异校准方法包括:S5,在图像亮度差异值小于或等于预定阈值时,判断双目视觉系统10是否继续工作,并在双目视觉系统10继续工作时,获取下一时刻的第一摄像头12和第二摄像头14采集的当前场景的第一图像和第二图像的图像亮度值。Referring to FIG. 3, in some embodiments, the difference calibration method includes: S5, determining whether the binocular vision system 10 continues to work when the image brightness difference value is less than or equal to a predetermined threshold, and continues to work in the binocular vision system 10. At the same time, the image brightness values of the first image and the second image of the current scene acquired by the first camera 12 and the second camera 14 at the next moment are acquired.
可以理解,处理器16可以实现步骤S5,在双目视觉系统10工作过程中,第一摄像头12和第二摄像头14持续不断地采集当前场景的图像。图像亮度差异值小于或等于预定阈值时,不需要更新双目视觉系统10的曝光参数。此时,处理器16获取下一时刻的第一图像和第二图像,以实时检测系统的亮度差异。It can be understood that the processor 16 can implement step S5. During the operation of the binocular vision system 10, the first camera 12 and the second camera 14 continuously collect images of the current scene. When the image brightness difference value is less than or equal to a predetermined threshold, it is not necessary to update the exposure parameters of the binocular vision system 10. At this time, the processor 16 acquires the first image and the second image at the next moment to detect the brightness difference of the system in real time.
在某些实施方式中,差异校准方法包括:S5,在更新第一摄像头12和/或第二摄像头14的曝光参数后,判断双目视觉系统10是否继续工作,并在双目视觉系统10继续工作时,获取下一时刻的第一摄像头12和第二摄像头14采集的当前场景的第一图像和第二图像的图像亮度值。 In some embodiments, the difference calibration method includes: S5, after updating the exposure parameters of the first camera 12 and/or the second camera 14, determining whether the binocular vision system 10 continues to operate and continuing in the binocular vision system 10 In operation, the image brightness values of the first image and the second image of the current scene acquired by the first camera 12 and the second camera 14 at the next moment are acquired.
如此,处理器16可以实现步骤S5,在更新完成后,下一时刻第一摄像头12和第二摄像头14的曝光参数是更新后的曝光参数,以此采集的第一图像和第二图像的图像亮度差异值减小,有利于提高双目视觉系统10测量结果的准确度。此时,处理器16获取下一时刻的第一图像和第二图像,以实时检测系统的图像亮度差异。In this way, the processor 16 can implement step S5. After the update is completed, the exposure parameters of the first camera 12 and the second camera 14 at the next moment are updated exposure parameters, and the images of the first image and the second image are acquired thereby. The decrease in the brightness difference value is advantageous for improving the accuracy of the measurement result of the binocular vision system 10. At this time, the processor 16 acquires the first image and the second image at the next moment to detect the image brightness difference of the system in real time.
请参阅图4,在某些实施方式中,步骤S1包括:Referring to FIG. 4, in some embodiments, step S1 includes:
S12,获取第一图像和第二图像的区域划分和对应区域的权值;和S12. Acquire a region division of the first image and the second image and a weight of the corresponding region; and
S14,根据区域划分的区域亮度值和对应区域的权值分别计算第一图像和第二图像的亮度值。S14. Calculate the brightness values of the first image and the second image according to the area brightness value of the area division and the weight of the corresponding area, respectively.
如此,处理器16可以实现步骤S12和步骤S14,第一图像和第二图像的图像亮度值可以是加权亮度值,处理器16可以将图像划分为多个区域,并根据兴趣区域位置为划分的各个区域设置相应的权值。具体的,在一些实施例中,兴趣区域的权值最大,图像中远离兴趣区域的其他区域的权值逐渐减小。如此,第一图像和第二图像的图像亮度值受兴趣区域的亮度值影响较大,有利于提高双目视觉系统10在图像兴趣区域的测量结果的准确度。可以理解的是,兴趣区域可以根据对焦区域来确定,当然,兴趣区域也可以通过其他实现方式来获得。As such, the processor 16 may implement steps S12 and S14, and the image brightness values of the first image and the second image may be weighted brightness values, and the processor 16 may divide the image into a plurality of regions and divide according to the location of the region of interest. The corresponding weights are set for each area. Specifically, in some embodiments, the weight of the region of interest is the largest, and the weights of other regions in the image that are far from the region of interest are gradually reduced. As such, the image brightness values of the first image and the second image are greatly affected by the brightness values of the region of interest, which is advantageous for improving the accuracy of the measurement results of the binocular vision system 10 in the image region of interest. It can be understood that the region of interest can be determined according to the focus region. Of course, the region of interest can also be obtained by other implementations.
请参阅图5,在某些实施方式中,步骤S12包括:Referring to FIG. 5, in some embodiments, step S12 includes:
S122,获取双目视觉系统10的工作状态;S122. Acquire an operating state of the binocular vision system 10;
S124,根据工作状态确定第一图像和第二图像的兴趣区域;和S124. Determine an area of interest of the first image and the second image according to the working state; and
S126,根据兴趣区域获取第一图像和第二图像的区域划分和对应区域的权值。S126. Acquire a region division of the first image and the second image and a weight of the corresponding region according to the region of interest.
可以理解,双目视觉系统10可以应用在不同的设备中,对应的,图像的兴趣区域可以不同。例如,在无人机中,双目视觉系统10运行时常常处于高空中,需要检测并注意场景上方是否存在障碍物,如此,兴趣区域可以是图像的上半部分;而在无人驾驶汽车中,双目视觉系统10运行时常常位于地面上,需要检测路面三维信息及距离信息,如此,兴趣区域可以是图像的下半部分。双目视觉系统10根据不同的兴趣区域可以选择不同的区域划分以及对应区域的权值。It can be understood that the binocular vision system 10 can be applied in different devices, and correspondingly, the regions of interest of the images can be different. For example, in a drone, the binocular vision system 10 is often in high altitude when it is running, and it is necessary to detect and notice whether there is an obstacle above the scene, so that the region of interest can be the upper half of the image; and in the driverless car. The binocular vision system 10 is often located on the ground during operation, and needs to detect three-dimensional information of the road surface and distance information. Thus, the region of interest may be the lower half of the image. The binocular vision system 10 can select different region divisions and weights of corresponding regions according to different regions of interest.
同样的,双目视觉系统10处于不同的运行状态时,对应的,图像的兴趣区域可以不同。例如,在无人驾驶汽车中,无人驾驶汽车左转时,除了检测路面三维信息及距离信息外,还需要检测左方的路况信息,相应的兴趣区域可以是图像的左下部分,对应区域的权值大小分布为左下>右下>左上、右上。无人驾驶汽车右转时,除了检测路面三维信息及距离信息外,还需要检测右方的路况信息,相应的兴趣区域可以是图像的左下部分,对应区域的权值大小分布为右下>左下>左上、右上。Similarly, when the binocular vision system 10 is in different operating states, the corresponding regions of interest of the images may be different. For example, in an unmanned vehicle, when the driverless car turns left, in addition to detecting the three-dimensional information of the road surface and the distance information, it is also necessary to detect the left road condition information, and the corresponding interest area may be the lower left part of the image, and the corresponding area The weight size distribution is lower left > lower right > upper left and upper right. When the driverless car turns right, in addition to detecting the three-dimensional information and distance information of the road surface, it is also necessary to detect the road condition information on the right side. The corresponding interest area may be the lower left part of the image, and the weight distribution of the corresponding area is lower right> lower left. > Top left, top right.
如此,处理器16可以实现步骤S122、步骤S124和步骤S126,根据双目视觉系统10 的工作状态确定图像的兴趣区域,并根据兴趣区域获取图像的区域划分和对应区域的权值以便计算图像亮度值。As such, the processor 16 can implement step S122, step S124, and step S126, according to the binocular vision system 10 The working state determines an area of interest of the image, and obtains the area division of the image and the weight of the corresponding area according to the area of interest to calculate the image brightness value.
在一些实施例中,处理器16预存有兴趣区域与区域划分以及权值分布的对应关系。如此,确定兴趣区域后可以根据该对应关系获取区域划分并计算图像的加权亮度值。In some embodiments, processor 16 pre-stores the correspondence of regions of interest to region partitions and weight distributions. In this way, after determining the region of interest, the region division can be acquired according to the correspondence relationship and the weighted luminance value of the image can be calculated.
在某些实施方式中,双目视觉系统10的区域划分可以将图像平均划分为多个大小相同的区域。图6所示的兴趣区域为图像的中心区域,将图像平均划分为4*4个大小相同的区域,区域内数字为对应区域的权值。In some embodiments, the region partitioning of the binocular vision system 10 can divide the image equally into a plurality of regions of the same size. The region of interest shown in FIG. 6 is the central region of the image, and the image is equally divided into 4*4 regions of the same size, and the number in the region is the weight of the corresponding region.
在某些实施方式中,双目视觉系统10的区域划分在兴趣区域划分的区域可以较小,远离兴趣区域划分的区域可以较大。图7所示的兴趣区域为图像的左下区域,图像的左下区域划分为4*4个大小相同的小区域,图像的左上区域和右下区域划分为3*3个大小相同的小区域,图像的右上区域划分为2*2个大小相同的小区域,各个小区域中的数值为对应区域的权值。如此,可以提高双目视觉系统10在兴趣区域测量的准确度。In some embodiments, the area division of the binocular vision system 10 may be smaller in the area of interest region division, and the area divided away from the interest area may be larger. The interest area shown in FIG. 7 is the lower left area of the image, and the lower left area of the image is divided into 4*4 small areas of the same size, and the upper left area and the lower right area of the image are divided into 3*3 small areas of the same size, images. The upper right area is divided into 2*2 small areas of the same size, and the values in each small area are the weights of the corresponding areas. As such, the accuracy of the binocular vision system 10 in the region of interest can be improved.
具体的,图像区域划分时对应区域的权值可根据需要灵活配置。Specifically, the weight of the corresponding area when the image area is divided can be flexibly configured according to requirements.
请参阅图8,在某些实施方式中,步骤S14包括:Referring to FIG. 8, in some embodiments, step S14 includes:
S142,分别计算各个区域的亮度值和对应区域的权值之积的总和以得到第一图像和第二图像的总权重亮度值;和S142. Calculate, respectively, a sum of products of luminance values of respective regions and weights of corresponding regions to obtain total weight luminance values of the first image and the second image; and
S144,分别计算总权重亮度值与总权值的比值以得到第一图像和第二图像的图像亮度值。S144. Calculate a ratio of the total weight luminance value to the total weight to obtain image luminance values of the first image and the second image, respectively.
如此,处理器16可以实现步骤S142和步骤S144,根据各个区域亮度值和对应的权值计算得出第一图像和第二图像的图像亮度值。例如,图像的各个区域的亮度值分别为a1、a2、a3、…、an,对应区域的权值分别为k1、k2、k3、…、kn,步骤S142计算的总权重值A=k1*a1+k2*a2+k3*a3+…+kn*an。步骤S144计算的图像亮度值a=(k1*a1+k2*a2+k3*a3+…+kn*an)/(k1+k2+k3+…+kn)。As such, the processor 16 may implement steps S142 and S144 to calculate image brightness values of the first image and the second image based on the respective region luminance values and corresponding weights. For example, the luminance values of the respective regions of the image are a1, a2, a3, ..., an, and the weights of the corresponding regions are k1, k2, k3, ..., kn, respectively, and the total weight value calculated in step S142 is A = k1 * a1. +k2*a2+k3*a3+...+kn*an. The image luminance value a = (k1 * a1 + k2 * a2 + k3 * a3 + ... + kn * an) / (k1 + k2 + k3 + ... + kn) calculated in step S144.
请参阅图9,在某些实施方式中,步骤S4包括:Referring to FIG. 9, in some embodiments, step S4 includes:
S42,在图像亮度差异值大于预定阈值时根据第一图像和第二图像的图像亮度值和基准亮度值计算双目视觉系统10的差异校准参数;和S42. Calculate a difference calibration parameter of the binocular vision system 10 according to the image brightness value of the first image and the second image and the reference brightness value when the image brightness difference value is greater than a predetermined threshold; and
S44,根据差异校准参数和第一摄像头12或第二摄像头14的当前曝光参数更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。S44. Update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment according to the difference calibration parameter and the current exposure parameter of the first camera 12 or the second camera 14.
如此,处理器16确定需要更新第一摄像头12和第二摄像头14的曝光参数时,可以通过差异校准参数对曝光参数校准以进行更新。其中,差异校准参数为第一摄像头12和/或第二摄像头14未经过校准的曝光参数和更新后的曝光参数之间的差异系数。处理器16可以实现步骤S42以在图像亮度差异值大于预定阈值时,根据预设算法计算差异校准参数。 处理器16可以实现步骤S44以根据计算出来的差异校准参数更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。As such, when the processor 16 determines that the exposure parameters of the first camera 12 and the second camera 14 need to be updated, the exposure parameters can be calibrated for updating by the difference calibration parameters. The difference calibration parameter is a difference coefficient between the exposure parameter of the first camera 12 and/or the second camera 14 that is not calibrated and the updated exposure parameter. The processor 16 may implement step S42 to calculate a difference calibration parameter according to a preset algorithm when the image brightness difference value is greater than a predetermined threshold. The processor 16 may implement step S44 to update the exposure parameters of the first camera 12 and/or the second camera 14 at the next moment based on the calculated difference calibration parameters.
在某些实施方式中,在某些实施方式中,基准亮度值为第一图像的图像亮度值、第二图像的图像亮度值或第一图像和第二图像的平均的图像亮度值中的任意一个。In some embodiments, in some embodiments, the reference brightness value is any of an image brightness value of the first image, an image brightness value of the second image, or an average image brightness value of the first image and the second image. One.
可以理解,为使第一图像和第二图像的亮度差异最小化,双目视觉系统10需要选择一个基准亮度值,并以基准亮度值为参考更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数使得采集的第一图像的亮度值和第二图像的图像亮度值一致。图像亮度差异值大于预定阈值时,处理器16根据第一图像和第二图像的图像亮度值按照预设算法生成基准亮度值,如此,基准亮度与当前采集的第一图像和第二图像的亮度相关,有利于实时并准确地更新第一摄像头12和第二摄像头14的曝光参数。It can be understood that in order to minimize the difference in brightness between the first image and the second image, the binocular vision system 10 needs to select a reference brightness value and update the first camera 12 and/or the second camera 14 with reference to the reference brightness value. The exposure parameter at a moment makes the luminance value of the acquired first image coincide with the image luminance value of the second image. When the image brightness difference value is greater than a predetermined threshold, the processor 16 generates a reference brightness value according to a preset algorithm according to the image brightness values of the first image and the second image, such that the reference brightness and the currently acquired brightness of the first image and the second image Correspondingly, it is advantageous to update the exposure parameters of the first camera 12 and the second camera 14 in real time and accurately.
具体的,基准亮度值可以是第一图像的图像亮度值,图像亮度差异值大于预定阈值时,更新第二摄像头14下一时刻的曝光参数以使下一时刻采集的第二图像的图像亮度值与第一图像的图像亮度值一致。同样的,基准亮度值可以是第二图像的图像亮度值,图像亮度差异值大于预定阈值时,更新第一摄像头12下一时刻的曝光参数以使下一时刻采集的第一图像的图像亮度值与第二图像的图像亮度值一致。同样的,基准亮度值可以是第一图像和第二图像的平均的图像亮度值,图像亮度差异值大于预定阈值时,分别更新第一摄像头12和第二摄像头14下一时刻的曝光参数以使下一时刻采集的第一图像的图像亮度值和第二图像的图像亮度值相等且与第一图像和第二图像的平均的图像亮度值一致。Specifically, the reference brightness value may be an image brightness value of the first image, and when the image brightness difference value is greater than a predetermined threshold, the exposure parameter of the next time of the second camera 14 is updated to make the image brightness value of the second image acquired at the next time. Consistent with the image brightness value of the first image. Similarly, the reference brightness value may be an image brightness value of the second image, and when the image brightness difference value is greater than a predetermined threshold, the exposure parameter of the next time of the first camera 12 is updated to make the image brightness value of the first image acquired at the next time. Consistent with the image brightness value of the second image. Similarly, the reference brightness value may be an average image brightness value of the first image and the second image, and when the image brightness difference value is greater than a predetermined threshold, the exposure parameters of the next time of the first camera 12 and the second camera 14 are respectively updated to enable The image brightness value of the first image acquired at the next time is equal to the image brightness value of the second image and coincides with the average image brightness value of the first image and the second image.
在某些实施方式中,第一图像和第二图像的平均的图像亮度值可以是加权平均亮度值、算术平均亮度值中的任意一个。In some embodiments, the average image brightness value of the first image and the second image may be any one of a weighted average brightness value and an arithmetic mean brightness value.
如此,处理器16生成的基准亮度为第一图像和第二图像的平均的图像亮度值时,需要同时更新第一摄像头12和第二摄像头14下一时刻的曝光参数,参数变化范围较小。Thus, when the reference brightness generated by the processor 16 is the average image brightness value of the first image and the second image, it is necessary to simultaneously update the exposure parameters of the first camera 12 and the second camera 14 at the next time, and the parameter variation range is small.
具体的,第一图像和第二图像的加权平均亮度值可以是(m*a+n*b)/(m+n),其中,a、b分别为第一图像和第二图像的图像亮度值,m、n分别为第一图像和第二图像的图像亮度值对应的权值。Specifically, the weighted average luminance values of the first image and the second image may be (m*a+n*b)/(m+n), where a and b are image luminances of the first image and the second image, respectively. The values, m, n are weights corresponding to the image brightness values of the first image and the second image, respectively.
具体的,第一图像和第二图像的算术平均亮度值可以是(a+b)/2,其中,a、b分别为第一图像和第二图像的图像亮度值。Specifically, the arithmetic average luminance value of the first image and the second image may be (a+b)/2, where a and b are image luminance values of the first image and the second image, respectively.
在某些实施方式中,图像亮度差异值包括绝对差异值,步骤S2包括:根据第一图像和第二图像的图像亮度值和采集第一图像和第二图像对应的当前差异校准参数计算绝对差异值,绝对差异值采用下面条件式计算:In some embodiments, the image brightness difference value includes an absolute difference value, and step S2 includes: calculating an absolute difference according to the image brightness value of the first image and the second image and the current difference calibration parameter corresponding to the acquired first image and the second image. The value of the absolute difference is calculated using the following conditional formula:
D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
其中,D为绝对差异值,a、b分别为第一图像和第二图像的图像亮度值,xa、xb分别 为采集第一图像和第二图像对应的当前差异校准参数。Where D is the absolute difference value, a and b are the image brightness values of the first image and the second image, respectively, xa and xb respectively To collect current difference calibration parameters corresponding to the first image and the second image.
可以理解,处理器16可以检测第一图像和第二图像的绝对差异值,亮度大的情况下,绝对差异值相差较为明显,有利于和预定阈值进行对比以判断是否需要更新双目视觉系统10的曝光参数。It can be understood that the processor 16 can detect the absolute difference values of the first image and the second image. In the case where the brightness is large, the absolute difference values are significantly different, which is advantageous for comparison with a predetermined threshold to determine whether the binocular vision system 10 needs to be updated. Exposure parameters.
在某些实施方式中,图像亮度差异值包括相对差异值,步骤S2包括:根据第一图像和第二图像的图像亮度值、基准亮度值和采集第一图像和第二图像对应的当前差异校准参数计算相对差异值,其中相对差异值为绝对差异值与基准亮度值的比值,绝对差异值采用下面条件式计算:In some embodiments, the image brightness difference value includes a relative difference value, and step S2 includes: calibrating according to the image brightness value of the first image and the second image, the reference brightness value, and the current difference corresponding to the acquired first image and the second image. The parameter calculates the relative difference value, wherein the relative difference value is the ratio of the absolute difference value to the reference brightness value, and the absolute difference value is calculated by the following conditional expression:
D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
其中,D为绝对差异值,a、b分别为第一图像和第二图像的图像亮度值,xa、xb分别为采集第一图像和第二图像对应的当前差异校准参数。Where D is an absolute difference value, a and b are image brightness values of the first image and the second image, respectively, and xa and xb are current difference calibration parameters corresponding to the first image and the second image, respectively.
可以理解,处理器16可以检测第一图像和第二图像的相对差异值,亮度较小的情况下,绝对差异值相差不明显,此时,检测相对差异值有利于和预定阈值进行对比以判断是否需要更新双目视觉系统10的曝光参数。It can be understood that the processor 16 can detect the relative difference values of the first image and the second image. If the brightness is small, the absolute difference values are not significantly different. At this time, detecting the relative difference value is beneficial to compare with a predetermined threshold to determine Whether the exposure parameters of the binocular vision system 10 need to be updated.
请参阅图10,在某些实施方式中,预定阈值包括绝对阈值和相对阈值,步骤S3包括:Referring to FIG. 10, in some embodiments, the predetermined threshold includes an absolute threshold and a relative threshold, and step S3 includes:
S32,判断绝对差异值是否大于绝对阈值;和S32, determining whether the absolute difference value is greater than an absolute threshold; and
S34,判断相对差异值是否大于相对阈值。S34. Determine whether the relative difference value is greater than a relative threshold.
如此,处理器16可以实现步骤S32和步骤S34,绝对差异值大于绝对阈值和/或相对差异值大于相对阈值时,即可认为第一图像和第二额图像的图像亮度差异值大于预定阈值,应当更新第一摄像头12和第二摄像头14的曝光参数,以减小在后续图像处理中产生的测量失效或错误测量。As such, the processor 16 may implement step S32 and step S34. When the absolute difference value is greater than the absolute threshold and/or the relative difference value is greater than the relative threshold, the image brightness difference value of the first image and the second image may be considered to be greater than a predetermined threshold. The exposure parameters of the first camera 12 and the second camera 14 should be updated to reduce measurement failure or erroneous measurements that occur in subsequent image processing.
请参阅图11,在某些实施方式中,步骤S42包括:S422,根据第一图像和第二图像的图像亮度值和采集第一图像和第二图像时对应的当前差异校准参数以及基准亮度值计算第一图像和第二图像的差异校准参数,差异校准参数采用下面条件式计算:Referring to FIG. 11 , in some embodiments, step S42 includes: S422, according to image brightness values of the first image and the second image, and current difference calibration parameters and reference brightness values corresponding to the first image and the second image. The difference calibration parameters of the first image and the second image are calculated, and the difference calibration parameters are calculated by the following conditional formula:
a/xa*aedc=ref/xref*aedc_ref(1)和/或b/xb*aedc=ref/xref*aedc_ref(1);a/xa*aedc=ref/xref*aedc_ref(1) and/or b/xb*aedc=ref/xref*aedc_ref(1);
其中,a、b分别为第一图像和第二图像的图像亮度值,xa、xb分别为采集第一图像和第二图像对应的当前差异校准参数,aedc为所述差异校准参数,ref为基准亮度值,xref为基准亮度值对应的差异校准参数,aedc_ref(1)为基准差异校准参数,本实施例中,xref和aedc_ref(1)均为1。Where a and b are image brightness values of the first image and the second image, respectively, xa and xb are current difference calibration parameters corresponding to the first image and the second image, aedc is the difference calibration parameter, and ref is the reference. The brightness value, xref is the difference calibration parameter corresponding to the reference brightness value, and aedc_ref(1) is the reference difference calibration parameter. In this embodiment, both xref and aedc_ref(1) are 1.
可以理解,处理器16可以实现步骤S422,在双目视觉系统10持续工作过程中,当前差异校准参数可以是前一次更新第一摄像头12和第二摄像头14的曝光参数时对应的差异校准参数,第一图像和第二图像的图像亮度值可以是通过当前差异校准参数校准后的亮度 值。a/xa、b/xb可以认为是当前采集第一图像和第二图像时未经过当前差异校准参数校准的第一摄像头12和第二摄像头14采集的图像亮度值。上面的条件式中,基准亮度值对应的差异校准参数xref和基准差异校准参数aedc_ref(1)均为1,即条件式右边为基准亮度ref,如此,处理器16可以根据上面的条件式可以计算出差异校准参数aedc使得校准后第一图像和/或第二图像的图像亮度值和基准亮度值一致。It can be understood that the processor 16 can implement the step S422. During the continuous operation of the binocular vision system 10, the current difference calibration parameter may be a difference calibration parameter corresponding to the previous time when the exposure parameters of the first camera 12 and the second camera 14 are updated. The image brightness values of the first image and the second image may be brightness after calibration by the current difference calibration parameter value. The a/xa, b/xb may be considered as the image brightness values acquired by the first camera 12 and the second camera 14 that have not been calibrated by the current difference calibration parameter when the first image and the second image are currently acquired. In the above conditional expression, the difference calibration parameter xref and the reference difference calibration parameter aedc_ref(1) corresponding to the reference luminance value are both 1, that is, the right side of the conditional expression is the reference luminance ref, and thus, the processor 16 can calculate according to the above conditional expression. The difference calibration parameter aedc makes the image brightness value of the first image and/or the second image after calibration coincide with the reference brightness value.
在某些实施方式中,曝光参数包括自动曝光参数和校准曝光参数,步骤S44包括:S442,根据差异校准参数和第一摄像头12和第二摄像头14的曝光参数计算第一摄像头12和/或第二摄像头14的校准曝光参数。In some embodiments, the exposure parameters include an automatic exposure parameter and a calibration exposure parameter, and step S44 includes: S442, calculating the first camera 12 and/or the first based on the difference calibration parameter and the exposure parameters of the first camera 12 and the second camera 14. The calibration exposure parameters of the two cameras 14.
可以理解,摄像头模组通常可以进行自动曝光,根据光线的强弱自动调节曝光参数,防止曝光过度或者不足。如此,双目视觉系统10可以在自动曝光的图像亮度值的基础上判断是否需要更新第一摄像头12和/或第二摄像头14的曝光参数,自动曝光和差异校准参数同时作用,有利于提高双目视觉系统10测量结果的准确度,保证双目视觉系统10正常运行。It can be understood that the camera module can usually perform automatic exposure, and automatically adjust the exposure parameters according to the intensity of the light to prevent overexposure or deficiency. In this way, the binocular vision system 10 can determine whether it is necessary to update the exposure parameters of the first camera 12 and/or the second camera 14 based on the brightness value of the automatically exposed image, and the automatic exposure and the difference calibration parameters simultaneously act to improve the double The accuracy of the visual system 10 measurement results ensures that the binocular vision system 10 is operating normally.
处理器16可以实现步骤S442以在需要更新第一摄像头12和第二摄像头14的曝光参数时计算校准曝光参数。处理器16可以将第一摄像头12和/或第二摄像头14的曝光参数更新为计算出来的校准曝光参数。 Processor 16 may implement step S442 to calculate a calibration exposure parameter when it is desired to update the exposure parameters of first camera 12 and second camera 14. The processor 16 may update the exposure parameters of the first camera 12 and/or the second camera 14 to the calculated calibration exposure parameters.
在某些实施方式中,自动曝光参数可以是第一摄像头12和/或第二摄像头14根据各自采集图像的图像亮度值进行自动曝光得到的曝光参数。In some embodiments, the auto exposure parameter may be an exposure parameter obtained by the first camera 12 and/or the second camera 14 automatically exposing according to the image brightness values of the respective acquired images.
在某些实施方式中,自动曝光参数可以是第一摄像头12和/或第二摄像头14根据基准亮度值进行自动曝光得到的曝光参数。In some embodiments, the auto exposure parameter may be an exposure parameter obtained by the first camera 12 and/or the second camera 14 automatically exposing according to a reference brightness value.
在某些实施方式中,自动曝光参数包括粗调曝光时间、模拟增益和数字增益中的至少一个。校准曝光参数包括粗调曝光时间、细调曝光时间、行周期时间、模拟增益和数字增益中的至少一个。In some embodiments, the auto exposure parameter includes at least one of a coarse adjustment exposure time, an analog gain, and a digital gain. The calibration exposure parameters include at least one of a coarse adjustment exposure time, a fine adjustment exposure time, a line cycle time, an analog gain, and a digital gain.
可以理解,自动曝光通常调节摄像头模组的粗调曝光时间、模拟增益和数字增益,双目视觉系统10的自动曝光参数可以是粗调曝光时间、模拟增益和数字增益中的至少一个。校准曝光参数在自动曝光的基础上进行调整,调整的参数可以是粗调曝光时间、细调曝光时间、行周期时间、模拟增益和数字增益中的至少一个。It can be understood that the automatic exposure generally adjusts the coarse adjustment exposure time, the analog gain and the digital gain of the camera module, and the automatic exposure parameter of the binocular vision system 10 can be at least one of a coarse adjustment exposure time, an analog gain, and a digital gain. The calibration exposure parameter is adjusted based on the automatic exposure, and the adjusted parameters may be at least one of a coarse adjustment exposure time, a fine adjustment exposure time, a line cycle time, an analog gain, and a digital gain.
在某些实施方式中,计算的校准曝光参数与自动曝光参数的类型全部不同时,步骤S442中,校准曝光参数采用下面条件式计算:In some embodiments, when the calculated calibration exposure parameter is completely different from the type of the automatic exposure parameter, in step S442, the calibration exposure parameter is calculated by the following conditional expression:
Y=r*c;Y=r*c;
其中,Y为校准曝光参数,r为第一摄像头12或第二摄像头14的默认曝光参数,c为差异校准参数。 Where Y is the calibration exposure parameter, r is the default exposure parameter of the first camera 12 or the second camera 14, and c is the difference calibration parameter.
可以理解,双目视觉系统10需要更新第一摄像头12和/或第二摄像头14的曝光参数时,处理器16计算的校准曝光参数与自动曝光参数的类型全部不同,即自动曝光时调节的参数对需要更新的曝光参数没有影响。如此,校准曝光参数直接根据差异校准参数和默认曝光参数计算并更新。其中,默认曝光参数为摄像头未采用差异校准参数时采集图像的各项曝光参数的参数值。It can be understood that when the binocular vision system 10 needs to update the exposure parameters of the first camera 12 and/or the second camera 14, the calibration exposure parameters calculated by the processor 16 are all different from the types of the automatic exposure parameters, that is, the parameters adjusted during the automatic exposure. There is no effect on the exposure parameters that need to be updated. As such, the calibration exposure parameters are calculated and updated directly from the difference calibration parameters and the default exposure parameters. The default exposure parameter is a parameter value of each exposure parameter of the image acquired when the camera does not adopt the difference calibration parameter.
在某些实施方式中,计算的校准曝光参数与自动曝光参数的类型全部相同时,步骤S442中,校准曝光参数采用下面条件式计算:In some embodiments, when the calculated calibration exposure parameters are all the same as the types of the automatic exposure parameters, in step S442, the calibration exposure parameters are calculated using the following conditional formula:
Y=g*c;Y=g*c;
其中,Y为校准曝光参数,g为采集第一图像和/或第二图像时对应的自动曝光参数,c为差异校准参数。Wherein Y is a calibration exposure parameter, g is an automatic exposure parameter corresponding to the acquisition of the first image and/or the second image, and c is a difference calibration parameter.
可以理解,双目视觉系统10需要更新第一摄像头12和/或第二摄像头14的曝光参数时,处理器16计算的校准曝光参数与自动曝光参数的类型全部相同,即更新的曝光参数经过自动曝光调节以及经过差异校准参数调节后才能使得第一图像和/或第二图像的亮度值与基准亮度值一致。如此,校准曝光参数在自动曝光的基础上根据自动曝光参数和差异校准参数计算并更新。It can be understood that when the binocular vision system 10 needs to update the exposure parameters of the first camera 12 and/or the second camera 14, the calibration exposure parameters calculated by the processor 16 are all the same as the types of the automatic exposure parameters, that is, the updated exposure parameters are automatically The exposure adjustment and the adjustment of the difference calibration parameters enable the luminance values of the first image and/or the second image to coincide with the reference luminance values. Thus, the calibration exposure parameters are calculated and updated based on the automatic exposure parameters based on the automatic exposure parameters and the difference calibration parameters.
在某些实施方式中,计算的校准曝光参数与自动曝光参数的类型一部分相同且另一部分不同时,步骤S442中,校准曝光参数采用下面条件式计算:In some embodiments, when the calculated calibration exposure parameter is partially the same as the type of the automatic exposure parameter and the other portion is different, in step S442, the calibration exposure parameter is calculated using the following conditional formula:
Y1=(g*c1)和Y2=(r*c2);Y1=(g*c1) and Y2=(r*c2);
其中,Y1和Y2为校准曝光参数,g为采集第一图像和/或第二图像时对应的自动曝光参数,r为第一摄像头112或第二摄像头114的默认曝光参数,c1*c2=c且c为差异校准参数。Wherein, Y1 and Y2 are calibration exposure parameters, g is an automatic exposure parameter corresponding to the first image and/or the second image, and r is a default exposure parameter of the first camera 112 or the second camera 114, c1*c2=c And c is the difference calibration parameter.
可以理解,双目视觉系统10需要更新第一摄像头12和/或第二摄像头14的曝光参数时,处理器16计算的校准曝光参数与自动曝光参数的类型一部分相同且另一部分不同,即更新的曝光参数中校准曝光参数与自动曝光参数的类型相同的部分经过自动曝光调节以及经过差异校准参数调节,校准曝光参数与自动曝光参数的类型不同部分经过差异校准参数调节,两部分共同作用使得调节后的第一图像和/或第二图像的图像亮度值与基准亮度值一致。如此,校准曝光参数与自动曝光参数的类型相同的部分,即Y1部分,在自动曝光的基础上根据自动曝光参数和差异校准参数计算并更新。校准曝光参数与自动曝光参数的类型不同的部分,即Y2部分,根据差异校准参数和默认曝光参数计算并更新。具体的,上述条件式中的c1和c2可根据需求灵活配置。It can be understood that when the binocular vision system 10 needs to update the exposure parameters of the first camera 12 and/or the second camera 14, the calibration exposure parameters calculated by the processor 16 are partially the same as the types of the automatic exposure parameters and the other portions are different, ie, updated. The part of the exposure parameter whose calibration exposure parameter is the same as the type of the automatic exposure parameter is adjusted by the automatic exposure adjustment and the difference calibration parameter. The different parts of the calibration exposure parameter and the type of the automatic exposure parameter are adjusted by the difference calibration parameter, and the two parts work together to make adjustment. The image brightness value of the first image and/or the second image coincides with the reference brightness value. Thus, the portion of the calibration exposure parameter and the type of the automatic exposure parameter, that is, the Y1 portion, is calculated and updated based on the automatic exposure based on the automatic exposure parameter and the difference calibration parameter. The part where the calibration exposure parameter is different from the type of the automatic exposure parameter, that is, the Y2 part, is calculated and updated according to the difference calibration parameter and the default exposure parameter. Specifically, c1 and c2 in the above conditional formula can be flexibly configured according to requirements.
本发明实施方式的一种计算机可读存储介质包括与双目视觉系统结合使用的计算机程序,所述计算机程序可被处理器16执行以完成上述实施方式的差异校准方法。 A computer readable storage medium in accordance with an embodiment of the present invention includes a computer program for use with a binocular vision system that can be executed by processor 16 to perform the differential calibration method of the above-described embodiments.
例如,计算机程序可被处理器16执行以完成以下步骤所述的差异校准方法:For example, a computer program can be executed by processor 16 to perform the difference calibration method described in the following steps:
实时获取第一摄像头12和第二摄像头14当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;Acquiring image brightness values of the first image and the second image of the same scene currently acquired by the first camera 12 and the second camera 14 in real time;
计算第一图像和第二图像之间的图像亮度差异值;Calculating an image brightness difference value between the first image and the second image;
判断图像亮度差异值是否大于预定阈值;和Determining whether the image brightness difference value is greater than a predetermined threshold; and
在图像亮度差异值大于预定阈值时更新第一摄像头12和/或第二摄像头14下一时刻的曝光参数。The exposure parameters of the first camera 12 and/or the second camera 14 at the next moment are updated when the image brightness difference value is greater than a predetermined threshold.
在本说明书的描述中,参考术语“某些实施方式”、“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”、或“一些示例”等的描述意指结合所述实施方式或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the description of the present specification, reference is made to the terms "some embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "example", "specific examples", or "some examples", etc. The descriptions of the specific features, structures, materials or features described in connection with the embodiments or examples are included in at least one embodiment or example of the invention. In the present specification, the schematic representation of the above terms does not necessarily mean the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a particular logical function or process. And the scope of the preferred embodiments of the invention includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in an opposite order depending on the functions involved, in the order shown or discussed. It will be understood by those skilled in the art to which the embodiments of the present invention pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或 固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the invention may be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods may be implemented by software stored in a memory and executed by a suitable instruction execution system or Firmware to achieve. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
本技术领域的普通技术人员可以理解实现上述实施方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。A person skilled in the art can understand that all or part of the steps carried in implementing the above implementation method can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium, and the program is executed. Including one or a combination of the steps of the method embodiments.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。 The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. Although the embodiments of the present invention have been shown and described, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the invention. The embodiments are subject to variations, modifications, substitutions and variations.

Claims (25)

  1. 一种差异校准方法,用于双目视觉系统,其特征在于,所述双目视觉系统包括第一摄像头和第二摄像头,所述差异校准方法包括:A difference calibration method for a binocular vision system, wherein the binocular vision system comprises a first camera and a second camera, and the difference calibration method comprises:
    实时获取所述第一摄像头和所述第二摄像头当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;Acquiring image brightness values of the first image and the second image of the same scene currently acquired by the first camera and the second camera in real time;
    计算所述第一图像和所述第二图像之间的图像亮度差异值;Calculating an image brightness difference value between the first image and the second image;
    判断所述图像亮度差异值是否大于预定阈值;和Determining whether the image brightness difference value is greater than a predetermined threshold; and
    在所述图像亮度差异值大于所述预定阈值时更新所述第一摄像头和/或所述第二摄像头下一时刻的曝光参数。And updating an exposure parameter of the first camera and/or the second camera at a next moment when the image brightness difference value is greater than the predetermined threshold.
  2. 如权利要求1所述的差异校准方法,其特征在于,所述实时获取所述第一摄像头和所述第二摄像头采集的当前场景的第一图像和第二图像的图像亮度值的步骤包括:The difference calibration method according to claim 1, wherein the step of acquiring the image brightness values of the first image and the second image of the current scene acquired by the first camera and the second camera in real time comprises:
    获取所述第一图像和所述第二图像的区域划分和对应区域的权值;和Obtaining a region division of the first image and the second image and a weight of the corresponding region; and
    根据所述区域划分的区域亮度值和对应区域的所述权值分别计算所述第一图像和所述第二图像的图像亮度值。And calculating image brightness values of the first image and the second image according to the area brightness value of the area and the weight of the corresponding area.
  3. 如权利要求2所述的差异校准方法,其特征在于,所述获取所述第一图像和所述第二图像的区域划分和对应区域的权值的步骤包括:The difference calibration method according to claim 2, wherein the step of acquiring the area division of the first image and the second image and the weight of the corresponding area comprises:
    获取所述双目视觉系统的工作状态;Obtaining an operating state of the binocular vision system;
    根据所述工作状态确定第一图像和第二图像的兴趣区域;和Determining an area of interest of the first image and the second image according to the working state; and
    根据所述兴趣区域获取所述第一图像和所述第二图像的所述区域划分和对应区域的所述权值。Acquiring the weight of the region division and the corresponding region of the first image and the second image according to the region of interest.
  4. 如权利要求2所述的差异校准方法,其特征在于,所述根据所述区域划分的区域亮度值和对应区域的所述权值分别计算所述第一图像和所述第二图像的亮度值的步骤包括:The difference calibration method according to claim 2, wherein the luminance values of the first image and the second image are respectively calculated according to the region luminance value divided by the region and the weight of the corresponding region The steps include:
    分别计算各个所述区域亮度值和对应区域的所述权值之积的总和以得到所述第一图像和所述第二图像的总权重亮度值;和Calculating, respectively, a sum of a product of each of the region luminance values and the weights of the corresponding regions to obtain a total weight luminance value of the first image and the second image; and
    分别计算所述总权重亮度值与总权值的比值以得到所述第一图像和所述第二图像的亮度值。Calculating a ratio of the total weight luminance value to the total weight to obtain luminance values of the first image and the second image, respectively.
  5. 如权利要求1所述的差异校准方法,其特征在于,所述在所述图像亮度差异值大于所述预定阈值时更新所述第一摄像头和/或所述第二摄像头的下一时刻的曝光参数的步骤 包括:The difference calibration method according to claim 1, wherein said updating said exposure of said first camera and/or said second camera at a next moment when said image brightness difference value is greater than said predetermined threshold Step of the parameter include:
    在所述图像亮度差异值大于所述预定阈值时根据所述第一图像和所述第二图像的图像亮度值和基准亮度值计算所述双目视觉系统的差异校准参数;和Calculating a difference calibration parameter of the binocular vision system according to image brightness values and reference brightness values of the first image and the second image when the image brightness difference value is greater than the predetermined threshold; and
    根据所述差异校准参数和所述第一摄像头或所述第二摄像头的当前所述曝光参数更新所述第一摄像头和/或所述第二摄像头下一时刻的所述曝光参数。Updating the exposure parameter of the first camera and/or the second camera at a next moment according to the difference calibration parameter and the current exposure parameter of the first camera or the second camera.
  6. 如权利要求5所述的差异校准方法,其特征在于,所述基准亮度值为所述第一图像的图像亮度值、所述第二图像的图像亮度值或所述第一图像和所述第二图像的平均的图像亮度值中的任意一个。The difference calibration method according to claim 5, wherein the reference luminance value is an image luminance value of the first image, an image luminance value of the second image, or the first image and the first Any of the average image brightness values of the two images.
  7. 如权利要求6所述的差异校准方法,其特征在于,所述第一图像和所述第二图像的平均的图像亮度值可以是加权平均亮度值、算术平均亮度值中的任意一个。The difference calibration method according to claim 6, wherein the average image luminance value of the first image and the second image may be any one of a weighted average luminance value and an arithmetic average luminance value.
  8. 如权利要求6所述的差异校准方法,其特征在于,所述图像亮度差异值包括绝对差异值,所述计算所述第一图像和所述第二图像之间的图像亮度差异值的步骤包括:The difference calibration method according to claim 6, wherein said image brightness difference value comprises an absolute difference value, and said step of calculating an image brightness difference value between said first image and said second image comprises :
    根据所述第一图像和所述第二图像的图像亮度值和采集所述第一图像和所述第二图像对应的当前差异校准参数计算所述绝对差异值,所述绝对差异值采用下面条件式计算:And calculating the absolute difference value according to image brightness values of the first image and the second image and acquiring current difference calibration parameters corresponding to the first image and the second image, where the absolute difference value adopts the following condition Calculation:
    D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
    其中,D为所述绝对差异值,a、b分别为所述第一图像和所述第二图像的图像亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数。Wherein D is the absolute difference value, and a and b are image brightness values of the first image and the second image, respectively, and xa and xb are respectively corresponding to acquiring the first image and the second image. Current differential calibration parameters.
  9. 如权利要求6所述的差异校准方法,其特征在于,所述图像亮度差异值包括相对差异值,所述计算所述第一图像和所述第二图像之间的图像亮度差异值的步骤包括:The difference calibration method according to claim 6, wherein said image luminance difference value includes a relative difference value, and said step of calculating an image luminance difference value between said first image and said second image includes :
    根据所述第一图像和所述第二图像的图像亮度值、所述基准亮度值和采集所述第一图像和所述第二图像对应的当前差异校准参数计算所述相对差异值,其中所述相对差异值为绝对差异值与所述基准亮度值的比值,所述绝对差异值采用下面条件式计算:Calculating the relative difference value according to the image brightness value of the first image and the second image, the reference brightness value, and acquiring current difference calibration parameters corresponding to the first image and the second image, where The relative difference value is a ratio of the absolute difference value to the reference brightness value, and the absolute difference value is calculated by the following conditional expression:
    D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
    其中,D为所述绝对差异值,a、b分别为所述第一图像和所述第二图像的亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数。Where D is the absolute difference value, a and b are the brightness values of the first image and the second image, respectively, and xa and xb are respectively collected for the first image and the second image. Differential calibration parameters.
  10. 如权利要求5所述的差异校准方法,其特征在于,所述在所述图像亮度差异值大于所述预定阈值时根据所述第一图像和所述第二图像的图像亮度值和基准亮度值计算所述 双目视觉系统的差异校准参数的步骤包括:The difference calibration method according to claim 5, wherein said image brightness value and said reference brightness value of said first image and said second image are different when said image brightness difference value is greater than said predetermined threshold Calculate the The steps of the difference calibration parameters of the binocular vision system include:
    根据所述第一图像和所述第二图像的图像亮度值和采集所述第一图像和所述第二图像时对应的当前差异校准参数以及所述基准亮度值,计算所述第一图像和所述第二图像的所述差异校准参数,所述差异校准参数采用下面条件式计算:Calculating the first image and the image according to the image brightness value of the first image and the second image and the current difference calibration parameter corresponding to the first image and the second image and the reference brightness value The difference calibration parameter of the second image, the difference calibration parameter is calculated by the following conditional formula:
    a/xa*aedc=ref/xref*aedc_ref(1)和/或b/xb*aedc=ref/xref*aedc_ref(1);a/xa*aedc=ref/xref*aedc_ref(1) and/or b/xb*aedc=ref/xref*aedc_ref(1);
    其中,a、b分别为所述第一图像和所述第二图像的图像亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数,aedc为所述差异校准参数,ref为所述基准亮度值,xref为所述基准亮度值对应的差异校准参数,aedc_ref(1)为基准差异校准参数,其中xref和aedc_ref(1)均为1。Where a and b are the image brightness values of the first image and the second image, respectively, xa and xb are respectively collecting current difference calibration parameters corresponding to the first image and the second image, and aedc is The difference calibration parameter, ref is the reference brightness value, xref is the difference calibration parameter corresponding to the reference brightness value, and aedc_ref(1) is the reference difference calibration parameter, where xref and aedc_ref(1) are both 1.
  11. 如权利要求5所述的差异校准方法,其特征在于,所述曝光参数包括自动曝光参数和校准曝光参数,所述根据所述差异校准参数和所述第一摄像头或所述第二摄像头的当前曝光参数更新所述第一摄像头和/或所述第二摄像头的下一时刻的所述曝光参数包括:The difference calibration method according to claim 5, wherein the exposure parameter comprises an automatic exposure parameter and a calibration exposure parameter, the calibration parameter and the current state of the first camera or the second camera according to the difference Updating the exposure parameter of the next moment of the first camera and/or the second camera by the exposure parameter comprises:
    根据所述差异校准参数和所述第一摄像头和所述第二摄像头的当前所述曝光参数计算所述第一摄像头和/或所述第二摄像头的校准曝光参数。And calculating a calibration exposure parameter of the first camera and/or the second camera according to the difference calibration parameter and the current exposure parameter of the first camera and the second camera.
  12. 如权利要求11所述的差异校准方法,其特征在于,所述自动曝光参数包括粗调曝光时间、模拟增益和数字增益中的至少一个,所述校准曝光参数包括粗调曝光时间、细调曝光时间、行周期时间、模拟增益和数字增益中的至少一个。The difference calibration method according to claim 11, wherein the automatic exposure parameter comprises at least one of a coarse adjustment exposure time, an analog gain, and a digital gain, and the calibration exposure parameter includes a coarse adjustment exposure time and a fine adjustment exposure. At least one of time, line cycle time, analog gain, and digital gain.
  13. 如权利要求12所述的差异校准方法,其特征在于,计算的所述校准曝光参数与所述自动曝光参数的类型全部不同时,所述根据所述差异校准参数和所述第一摄像头和所述第二摄像头的当前所述曝光参数计算所述第一摄像头和/或所述第二摄像头的校准曝光参数的步骤中,所述校准曝光参数采用下面条件式计算:The difference calibration method according to claim 12, wherein when the calculated calibration exposure parameter is different from the type of the automatic exposure parameter, the calibration parameter and the first camera and the In the step of calculating the calibration exposure parameter of the first camera and/or the second camera of the current exposure parameter of the second camera, the calibration exposure parameter is calculated by the following conditional expression:
    Y=r*c;Y=r*c;
    其中,Y为所述校准曝光参数,r为所述第一摄像头或所述第二摄像头的默认曝光参数,c为所述差异校准参数。Wherein Y is the calibration exposure parameter, r is a default exposure parameter of the first camera or the second camera, and c is the difference calibration parameter.
  14. 如权利要求12所述的差异校准方法,其特征在于,计算的所述校准曝光参数与所述自动曝光参数的类型全部相同时,所述根据所述差异校准参数和所述第一摄像头和所述第二摄像头的当前所述曝光参数计算所述第一摄像头和/或所述第二摄像头的校准曝光参数的步骤中,所述校准曝光参数采用下面条件式计算: The difference calibration method according to claim 12, wherein when the calculated calibration exposure parameter and the automatic exposure parameter are all of the same type, the difference calibration parameter and the first camera and the In the step of calculating the calibration exposure parameter of the first camera and/or the second camera of the current exposure parameter of the second camera, the calibration exposure parameter is calculated by the following conditional expression:
    Y=g*x;Y=g*x;
    其中,Y为所述校准曝光参数,g为采集所述第一图像和/或所述第二图像时对应的自动曝光参数,c为所述差异校准参数。Wherein Y is the calibration exposure parameter, g is an automatic exposure parameter corresponding to the first image and/or the second image, and c is the difference calibration parameter.
  15. 如权利要求12所述的差异校准方法,其特征在于,计算的所述校准曝光参数与所述自动曝光参数的类型一部分相同且另一部分不同时,所述根据所述差异校准参数和所述第一摄像头和所述第二摄像头的当前所述曝光参数计算所述第一摄像头和/或所述第二摄像头的校准曝光参数的步骤中,所述校准曝光参数采用下面条件式计算:The difference calibration method according to claim 12, wherein said calculated calibration exposure parameter is identical to a portion of said automatic exposure parameter and the other portion is different, said calibration parameter and said said In the step of calculating the calibration exposure parameters of the first camera and/or the second camera by the current exposure parameter of a camera and the second camera, the calibration exposure parameter is calculated by the following conditional expression:
    Y1=(g*c1)和Y2=(r*c2);Y1=(g*c1) and Y2=(r*c2);
    其中,Y1和Y2为所述校准曝光参数,g为采集所述第一图像和/或所述第二图像时对应的自动曝光参数,r为所述第一摄像头或所述第二摄像头的默认曝光参数,c1*c2=c且c为所述差异校准参数。Wherein, Y1 and Y2 are the calibration exposure parameters, g is an automatic exposure parameter corresponding to the first image and/or the second image, and r is a default of the first camera or the second camera. The exposure parameter, c1*c2=c and c is the difference calibration parameter.
  16. 一种双目视觉系统,其特征在于,包括第一摄像头、第二摄像头和处理器,所述处理器用于:A binocular vision system, comprising: a first camera, a second camera and a processor, the processor is configured to:
    实时获取所述第一摄像头和所述第二摄像头当前时刻采集的相同场景的第一图像和第二图像的图像亮度值;Acquiring image brightness values of the first image and the second image of the same scene currently acquired by the first camera and the second camera in real time;
    计算所述第一图像和所述第二图像之间的图像亮度差异值;Calculating an image brightness difference value between the first image and the second image;
    判断所述图像亮度差异值是否大于预定阈值;和Determining whether the image brightness difference value is greater than a predetermined threshold; and
    在所述图像亮度差异值大于所述预定阈值时更新所述第一摄像头和/或所述第二摄像头下一时刻的曝光参数。And updating an exposure parameter of the first camera and/or the second camera at a next moment when the image brightness difference value is greater than the predetermined threshold.
  17. 如权利要求16所述的双目视觉系统,其特征在于,所述处理器用于:The binocular vision system of claim 16 wherein said processor is operative to:
    获取所述第一图像和所述第二图像的区域划分和对应区域的权值;和Obtaining a region division of the first image and the second image and a weight of the corresponding region; and
    根据所述区域划分的区域亮度值和对应区域的所述权值分别计算所述第一图像和所述第二图像的图像亮度值。And calculating image brightness values of the first image and the second image according to the area brightness value of the area and the weight of the corresponding area.
  18. 如权利要求17所述的双目视觉系统,其特征在于,所述处理器用于:The binocular vision system of claim 17 wherein said processor is operative to:
    获取所述双目视觉系统的工作状态;Obtaining an operating state of the binocular vision system;
    根据所述工作状态确定第一图像和第二图像的兴趣区域;和Determining an area of interest of the first image and the second image according to the working state; and
    根据所述兴趣区域获取所述第一图像和所述第二图像的所述区域划分和对应区域的所述权值。 Acquiring the weight of the region division and the corresponding region of the first image and the second image according to the region of interest.
  19. 如权利要求18所述的双目视觉系统,其特征在于,所述处理器用于:The binocular vision system of claim 18 wherein said processor is operative to:
    分别计算各个所述区域亮度值和对应区域的所述权值之积的总和以得到所述第一图像和所述第二图像的总权重亮度值;和Calculating, respectively, a sum of a product of each of the region luminance values and the weights of the corresponding regions to obtain a total weight luminance value of the first image and the second image; and
    分别计算所述总权重亮度值与总权值的比值以得到所述第一图像和所述第二图像的亮度值。Calculating a ratio of the total weight luminance value to the total weight to obtain luminance values of the first image and the second image, respectively.
  20. 如权利要求16所述的双目视觉系统,其特征在于,所述处理器用于:The binocular vision system of claim 16 wherein said processor is operative to:
    在所述图像亮度差异值大于所述预定阈值时根据所述第一图像和所述第二图像的图像亮度值和基准亮度值计算所述双目视觉系统的差异校准参数;和Calculating a difference calibration parameter of the binocular vision system according to image brightness values and reference brightness values of the first image and the second image when the image brightness difference value is greater than the predetermined threshold; and
    根据所述差异校准参数和所述第一摄像头或所述第二摄像头的当前所述曝光参数更新所述第一摄像头和/或所述第二摄像头下一时刻的所述曝光参数。Updating the exposure parameter of the first camera and/or the second camera at a next moment according to the difference calibration parameter and the current exposure parameter of the first camera or the second camera.
  21. 如权利要求20所述的双目视觉系统,其特征在于,所述图像亮度差异值包括绝对差异值,所述处理器用于:The binocular vision system of claim 20 wherein said image brightness difference value comprises an absolute difference value, said processor for:
    根据所述第一图像和所述第二图像的图像亮度值和采集所述第一图像和所述第二图像对应的当前差异校准参数计算所述绝对差异值,所述绝对差异值采用下面条件式计算:And calculating the absolute difference value according to image brightness values of the first image and the second image and acquiring current difference calibration parameters corresponding to the first image and the second image, where the absolute difference value adopts the following condition Calculation:
    D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
    其中,D为所述绝对差异值,a、b分别为所述第一图像和所述第二图像的图像亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数。Wherein D is the absolute difference value, and a and b are image brightness values of the first image and the second image, respectively, and xa and xb are respectively corresponding to acquiring the first image and the second image. Current differential calibration parameters.
  22. 如权利要求20所述的双目视觉系统,其特征在于,所述图像亮度差异值包括相对差异值,所述处理器用于:The binocular vision system of claim 20 wherein said image brightness difference value comprises a relative difference value, said processor for:
    根据所述第一图像和所述第二图像的图像亮度值、所述基准亮度值和采集所述第一图像和所述第二图像对应的当前差异校准参数计算所述相对差异值,其中所述相对差异值为绝对差异值与所述基准亮度值的比值,所述绝对差异值采用下面条件式计算:Calculating the relative difference value according to the image brightness value of the first image and the second image, the reference brightness value, and acquiring current difference calibration parameters corresponding to the first image and the second image, where The relative difference value is a ratio of the absolute difference value to the reference brightness value, and the absolute difference value is calculated by the following conditional expression:
    D=|a-(b/xb)*xa|或D=|(a/xa)*xb-b|;D=|a-(b/xb)*xa| or D=|(a/xa)*xb-b|;
    其中,D为所述绝对差异值,a、b分别为所述第一图像和所述第二图像的亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数。Where D is the absolute difference value, a and b are the brightness values of the first image and the second image, respectively, and xa and xb are respectively collected for the first image and the second image. Differential calibration parameters.
  23. 如权利要求20所述的双目视觉系统,其特征在于,所述处理器用于:The binocular vision system of claim 20 wherein said processor is operative to:
    根据所述第一图像和所述第二图像的图像亮度值和采集所述第一图像和所述第二图像时对应的当前差异校准参数以及所述基准亮度值,计算所述第一图像和所述第二图像的所 述差异校准参数,所述差异校准参数采用下面条件式计算:Calculating the first image and the image according to the image brightness value of the first image and the second image and the current difference calibration parameter corresponding to the first image and the second image and the reference brightness value The second image The difference calibration parameters are calculated, and the difference calibration parameters are calculated by the following conditional formula:
    a/xa*aedc=ref/xref*aedc_ref(1)和/或b/xb*aedc=ref/xref*aedc_ref(1);a/xa*aedc=ref/xref*aedc_ref(1) and/or b/xb*aedc=ref/xref*aedc_ref(1);
    其中,a、b分别为所述第一图像和所述第二图像的图像亮度值,xa、xb分别为采集所述第一图像和所述第二图像对应的当前差异校准参数,aedc为所述差异校准参数,ref为所述基准亮度值,xref为所述基准亮度值对应的差异校准参数,aedc_ref(1)为基准差异校准参数,其中xref和aedc_ref(1)均为1。Where a and b are the image brightness values of the first image and the second image, respectively, xa and xb are respectively collecting current difference calibration parameters corresponding to the first image and the second image, and aedc is The difference calibration parameter, ref is the reference brightness value, xref is the difference calibration parameter corresponding to the reference brightness value, and aedc_ref(1) is the reference difference calibration parameter, where xref and aedc_ref(1) are both 1.
  24. 如权利要求20所述的双目视觉系统,其特征在于,所述曝光参数包括自动曝光参数和校准曝光参数,所述处理器用于:The binocular vision system of claim 20 wherein said exposure parameters comprise automatic exposure parameters and calibration exposure parameters, said processor for:
    根据所述差异校准参数和所述第一摄像头和所述第二摄像头的当前所述曝光参数计算所述第一摄像头和/或所述第二摄像头的校准曝光参数。And calculating a calibration exposure parameter of the first camera and/or the second camera according to the difference calibration parameter and the current exposure parameter of the first camera and the second camera.
  25. 一种计算机可读存储介质,其特征在于,包括与双目视觉系统结合使用的计算机程序,所述计算机程序可被处理器执行以完成权利要求1-15任一项所述的差异校准方法。 A computer readable storage medium comprising a computer program for use in conjunction with a binocular vision system, the computer program being executable by a processor to perform the difference calibration method of any of claims 1-15.
PCT/CN2017/113890 2017-11-30 2017-11-30 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium WO2019104622A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/113890 WO2019104622A1 (en) 2017-11-30 2017-11-30 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium
CN201780037798.9A CN109417604A (en) 2017-11-30 2017-11-30 Variation calibration method, binocular vision system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/113890 WO2019104622A1 (en) 2017-11-30 2017-11-30 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2019104622A1 true WO2019104622A1 (en) 2019-06-06

Family

ID=65463378

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113890 WO2019104622A1 (en) 2017-11-30 2017-11-30 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN109417604A (en)
WO (1) WO2019104622A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112150556A (en) * 2020-08-31 2020-12-29 浙江赫千电子科技有限公司 Active alignment method based on image quality feedback loop, assembly and manufacturing method of camera module and vehicle-mounted camera
CN113572919A (en) * 2020-04-29 2021-10-29 思特威(上海)电子科技股份有限公司 Rapid automatic exposure adjusting method and binocular system
CN114125314A (en) * 2021-11-23 2022-03-01 展讯通信(上海)有限公司 Brightness synchronization method, device, storage medium and equipment

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110177269B (en) * 2019-05-31 2021-04-06 北京迈格威科技有限公司 Method and device for synchronously correcting exposure of double-shooting module
CN111713096A (en) * 2019-06-20 2020-09-25 深圳市大疆创新科技有限公司 Gain coefficient acquisition method and device
CN110766727A (en) * 2019-10-22 2020-02-07 歌尔股份有限公司 Depth module brightness calibration method and device, readable storage medium and depth camera
CN111614865B (en) * 2020-05-13 2023-06-09 展讯通信(上海)有限公司 Multi-shot brightness synchronization method, equipment, device and storage medium
CN112929575A (en) * 2021-02-01 2021-06-08 苏州玖物互通智能科技有限公司 Multi-view visual depth exposure synchronization method and system
CN113382143B (en) * 2021-06-09 2022-07-29 中国矿业大学 Automatic exposure adjusting method for binocular camera of fire-fighting robot
CN115550556B (en) * 2021-06-25 2023-10-24 荣耀终端有限公司 Exposure intensity adjusting method and related device
CN113696481B (en) * 2021-08-27 2023-04-14 上海联泰科技股份有限公司 Breadth brightness detection method and system of energy radiation device and 3D printing equipment
WO2023077421A1 (en) * 2021-11-05 2023-05-11 深圳市大疆创新科技有限公司 Movable platform control method and apparatus, and movable platform and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001157090A (en) * 1999-11-26 2001-06-08 Kyocera Corp Electronic finder system
CN105245785A (en) * 2015-08-10 2016-01-13 深圳市达程科技开发有限公司 Brightness balance adjustment method of vehicle panoramic camera
CN105516614A (en) * 2015-11-27 2016-04-20 联想(北京)有限公司 Information processing method and electronic device
CN105578021A (en) * 2014-10-15 2016-05-11 上海弘视通信技术有限公司 Imaging method of binocular camera and apparatus thereof
CN105827990A (en) * 2016-01-22 2016-08-03 维沃移动通信有限公司 Automatic exposure method and mobile terminal
CN106851122A (en) * 2017-02-27 2017-06-13 上海兴芯微电子科技有限公司 The scaling method and device of the auto exposure parameter based on dual camera system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI393992B (en) * 2009-02-05 2013-04-21 Nat Univ Chung Cheng High dynamic range image synthesis method
KR101207343B1 (en) * 2012-08-30 2012-12-04 재단법인대구경북과학기술원 Method, apparatus, and stereo camera for controlling image lightness
CN109660738B (en) * 2015-12-22 2021-01-12 北京奇虎科技有限公司 Exposure control method and system based on double cameras

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001157090A (en) * 1999-11-26 2001-06-08 Kyocera Corp Electronic finder system
CN105578021A (en) * 2014-10-15 2016-05-11 上海弘视通信技术有限公司 Imaging method of binocular camera and apparatus thereof
CN105245785A (en) * 2015-08-10 2016-01-13 深圳市达程科技开发有限公司 Brightness balance adjustment method of vehicle panoramic camera
CN105516614A (en) * 2015-11-27 2016-04-20 联想(北京)有限公司 Information processing method and electronic device
CN105827990A (en) * 2016-01-22 2016-08-03 维沃移动通信有限公司 Automatic exposure method and mobile terminal
CN106851122A (en) * 2017-02-27 2017-06-13 上海兴芯微电子科技有限公司 The scaling method and device of the auto exposure parameter based on dual camera system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113572919A (en) * 2020-04-29 2021-10-29 思特威(上海)电子科技股份有限公司 Rapid automatic exposure adjusting method and binocular system
CN113572919B (en) * 2020-04-29 2023-06-30 思特威(上海)电子科技股份有限公司 Rapid automatic exposure adjusting method and binocular system
CN112150556A (en) * 2020-08-31 2020-12-29 浙江赫千电子科技有限公司 Active alignment method based on image quality feedback loop, assembly and manufacturing method of camera module and vehicle-mounted camera
CN112150556B (en) * 2020-08-31 2024-01-23 浙江赫千电子科技有限公司 Active alignment method and assembly method of image quality feedback loop and camera
CN114125314A (en) * 2021-11-23 2022-03-01 展讯通信(上海)有限公司 Brightness synchronization method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN109417604A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
WO2019104622A1 (en) 差异校准方法、双目视觉系统和计算机可读存储介质 differential calibration method, binocular vision system, and computer-readable storage medium
US10701341B2 (en) Calibration method, calibration device, and computer program product
KR102320061B1 (en) Depth sensor calibration and per-pixel correction
EP3389268B1 (en) Depth information acquisition method and apparatus, and image collection device
JP6545997B2 (en) Image processing device
US20140118705A1 (en) Projection display device, information processing device, projection display system, and program
US8995753B2 (en) Stereo distance measurement apparatus and stereo distance measurement method
US9817207B2 (en) Image pickup information output apparatus and lens apparatus equipped with same
CN102831601A (en) Three-dimensional matching method based on union similarity measure and self-adaptive support weighting
CN107004277A (en) The on-line proving of motor vehicles camera system
JP2010204304A (en) Image capturing device, operator monitoring device, method for measuring distance to face
JPWO2011125937A1 (en) Calibration data selection device, selection method, selection program, and three-dimensional position measurement device
US8502880B2 (en) Image processing apparatus, image processing method, and program
JP3913901B2 (en) Camera internal parameter determination device
JP6755709B2 (en) Welding equipment and welding method
KR102061461B1 (en) Stereo camera system using vari-focal lens and operating method thereof
CN113379832B (en) Camera pose adjusting method and device, electronic equipment and storage medium
WO2020217283A1 (en) Object detection device, object detection system, object detection method, and non-transitory computer-readable medium in which program is stored
WO2013132950A1 (en) On-board camera device
US20170217371A1 (en) Vehicle-mounted stereo camera device and method for correcting the same
CN108449550A (en) A kind of adaptive camera exposure method and apparatus
CN117073988B (en) System and method for measuring distance of head-up display virtual image and electronic equipment
CN109389648B (en) Method for reducing measurement data error through data iteration
JP6204844B2 (en) Vehicle stereo camera system
CN117671033A (en) Quick calibration method and system for main point of camera image based on night light tracking

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17933295

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17933295

Country of ref document: EP

Kind code of ref document: A1