A method and device for adjusting consistency of a multi-camera system
By performing flat-field correction on the multi-camera system and adjusting the camera parameters, the problem of detection consistency of the multi-camera system is solved, the consistency of image acquisition and detection results is achieved, and the adjustment process is simplified.
Patent Information
- Application Number
- CN202310587138.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-05-23
AI Technical Summary
In machine vision inspection, the problem of detection consistency in multi-camera systems is difficult to solve through simple and efficient methods, especially in terms of camera response differences, lens consistency and light source consistency.
By performing flat-field correction on the multi-camera system, adjusting the camera parameters of the reference camera to obtain a reference image, and continuously adjusting the camera parameters of the control camera until the grayscale of the control image is consistent with the reference image, including adjusting the exposure time, light source brightness and white balance coefficient, etc., to achieve consistency adjustment of the multi-camera system.
This improves the consistency of images captured by multi-camera systems for the same object to be inspected, ensuring consistency in inspection results. The adjustment process is simple and efficient.
Smart Images

Figure CN116668831B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision detection technology, and in particular to a consistency adjustment method and device for a multi-camera system. Background Art
[0002] In machine vision inspection applications, due to factors such as camera response differences, lens consistency, and light source consistency in different optical and mechanical systems, detection consistency issues with multi-camera systems are often encountered. The collected images are used as the input source for visual inspection. How to ensure the consistency of images collected by different cameras on the same object to be inspected is particularly important.
[0003] Currently, there is a lack of a simple and efficient method to adjust the consistency of multi-camera systems. Summary of the Invention
[0004] The present invention provides a method and device for adjusting the consistency of a multi-camera system, which realizes simple and efficient adjustment of the consistency of the multi-camera system.
[0005] In a first aspect, the present invention provides a consistency adjustment method for a multi-camera system, comprising: performing flat field correction on each camera in the multi-camera system; the multi-camera system includes multiple cameras; adjusting the camera parameters of a reference camera to obtain a reference image of a feature area to be inspected of an object to be inspected; the reference camera is any camera in the multi-camera system, and the reference image meets preset visual detection requirements; continuously adjusting the camera parameters of the control camera until it is determined that the grayscale of the control image is consistent with that of the reference image, so as to achieve consistency adjustment of the multi-camera system; the control camera is a camera in the multi-camera system other than the reference camera, and the control image is an image of the feature area to be inspected that meets the preset visual detection requirements.
[0006] According to the present invention, a method for adjusting consistency of a multi-camera system is provided, in which flat-field correction is performed on cameras in the multi-camera system, including the following steps: controlling the camera lenses to align with a calibration plate and capturing a target image in a defocused state; wherein the cameras are configured such that: the exposure time is a preset exposure time, and the light source brightness is such that the average grayscale value of the target image is a preset grayscale value and mura defects are absent; and flat-field correction is performed on the target image to complete the flat-field correction of the camera.
[0007] According to a method for adjusting consistency of a multi-camera system provided by the present invention, when the cameras of the multi-camera system are color cameras, before performing flat field correction on each camera in the multi-camera system, the method further includes: performing white balance adjustment on each color camera.
[0008] According to a consistency adjustment method for a multi-camera system provided by the present invention, before controlling the camera lens to align with the calibration plate and capturing the target image in defocus, the method further includes: selecting a calibration plate that matches the object to be inspected based on the reflective characteristics of the object to be inspected.
[0009] According to a consistency adjustment method for a multi-camera system provided by the present invention, the camera parameters of a reference camera are adjusted to obtain a reference image of a feature area to be inspected of an object to be inspected, including: adjusting the brightness of the light source of the reference camera to capture a reference image that meets preset visual inspection requirements; the preset visual inspection requirements include: image clarity requirements.
[0010] According to a consistency adjustment method for a multi-camera system provided by the present invention, when the cameras of the multi-camera system are black and white cameras, the camera parameters of the camera are continuously adjusted until it is determined that the grayscale of the control image is consistent with that of the reference image. The method includes: continuously adjusting the brightness of the light source of the camera until it is determined that the grayscale of the control image is consistent with that of the reference image.
[0011] According to a consistency adjustment method for a multi-camera system provided by the present invention, when the cameras of the multi-camera system are color cameras, the camera parameters of the counter camera are continuously adjusted until the grayscale of the control image is determined to be consistent with that of the reference image. The method includes: continuously adjusting the brightness of the light source of the counter camera until the grayscale of any channel of the control image is consistent with that of any channel of the reference image; the any channel is an R channel, a G channel, or a B channel; and continuously adjusting the white balance coefficients of the other two channels of the counter camera until the grayscale of the other two channels of the control image and the other two channels of the reference image are determined to be consistent in the corresponding channels.
[0012] According to a consistency adjustment method for a multi-camera system provided by the present invention, when the cameras of the multi-camera system are black and white cameras, determining that the grayscale of a control image is consistent with that of the reference image includes: respectively obtaining the average grayscale values of the reference image and the control image; and when the difference between the average grayscale values of the reference image and the control image is less than a preset threshold, determining that the grayscale of the control image is consistent with that of the reference image.
[0013] According to a consistency adjustment method for a multi-camera system provided by the present invention, when the cameras of the multi-camera system are color cameras, determining that the grayscale of a control image is consistent with that of the reference image includes: respectively calculating the average grayscale values of the reference image and the control image in different channels; judging whether the grayscale of each channel is consistent based on the difference between the average grayscale values of the reference image and the control image in each channel; and determining that the grayscale of the control image is consistent with that of the reference image in the current channel when it is determined that the difference between the average grayscale values of the control image and the reference image in the current channel is less than a preset threshold.
[0014] In a second aspect, the present invention further provides a consistency adjustment device for a multi-camera system, comprising: a flat field correction module, a reference image acquisition module, and a consistency adjustment module;
[0015] A flat field correction module, configured to perform flat field correction on each camera in a multi-camera system; the multi-camera system comprises a plurality of cameras;
[0016] A reference image acquisition module, configured to adjust camera parameters of a reference camera to acquire a reference image of a feature area to be inspected of the object to be inspected; the reference image is an image captured by a reference camera that meets preset visual inspection requirements, and the reference camera is any camera in the multi-camera system;
[0017] A consistency adjustment module is used to continuously adjust the camera parameters of the counter camera until it is determined that the grayscale of the control image is consistent with that of the reference image, so as to achieve consistency adjustment of the multi-camera system; the control image is an image of the feature area to be inspected captured by the counter camera that meets the preset visual inspection requirements, and the counter camera is a camera in the multi-camera system other than the reference camera.
[0018] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for adjusting the consistency of a multi-camera system as described in any one of the above are implemented.
[0019] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the consistency adjustment method for a multi-camera system as described in any one of the above.
[0020] The method and device for adjusting the consistency of a multi-camera system provided by the present invention first perform flat-field correction on the camera; then, the camera parameters of the reference camera are adjusted to obtain a reference image; further, with the goal of achieving grayscale consistency between the control image captured by the camera and the reference image, the camera parameters of the camera are adjusted to achieve consistency adjustment of the multi-camera system; the entire adjustment process of the present invention is simple and efficient, improving the consistency of images captured by multiple cameras on the same object to be inspected, and ensuring the consistency of the inspection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 1 is a flow chart of a method for adjusting the consistency of a multi-camera system provided by the present invention;
[0023] Figure 2 Schematic diagram of the structure of the consistency adjustment device for a multi-camera system provided by the present invention;
[0024] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0026] It should be noted that, in the description of the embodiments of the present invention, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0027] The following combination Figure 1-Figure 3The present invention provides a method and apparatus for adjusting the consistency of a multi-camera system.
[0028] Figure 1 : is a flow chart of the consistency adjustment method of the multi-camera system provided by the present invention, such as Figure 1 As shown, including but not limited to the following steps:
[0029] Step 101: Perform flat-field correction on each camera in a multi-camera system.
[0030] Flat-field correction (FFC) is a technique used to improve digital imaging quality. It eliminates image artifacts caused by variations in detector pixel-to-pixel sensitivity and optical path distortion. This method can implement flat-field correction using the built-in FFC correction or shading correction features of cameras in a multi-camera system.
[0031] It is understood that the multi-camera system of the present invention is mostly used for machine vision measurement and includes multiple cameras. Optionally, it includes at least two cameras, and in the present invention, all cameras in the multi-camera system are black and white cameras or color cameras.
[0032] Step 102: Adjust the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected.
[0033] The camera parameters include but are not limited to: camera exposure time, light source brightness, and white balance coefficient.
[0034] The reference image is an image that meets preset visual detection requirements and is captured by a reference camera. The reference camera is any camera in the multi-camera system. The reference camera can be determined manually or randomly selected.
[0035] The object to be inspected may be a display or other items, such as precious leather, metal parts, etc.
[0036] It should be noted that meeting the preset visual inspection requirements can be understood as preset requirements for the reference image, such as clarity requirements, pixel requirements, and resolution requirements, etc. These preset requirements can be adaptively set according to the actual needs of visual inspection of different objects to be inspected.
[0037] Step 103: Continuously adjust the camera parameters of the cameras until it is determined that the grayscale of the control image is consistent with the grayscale of the reference image, so as to achieve consistency adjustment of the multi-camera system.
[0038] Specifically, the control image is an image of the feature area to be inspected captured by a pair of cameras that meets preset visual inspection requirements, and the pair of cameras is a camera other than the reference camera in the multi-camera system.
[0039] The present invention provides a method for adjusting the consistency of a multi-camera system. First, a flat-field correction is performed on all cameras in the multi-camera system. Then, the camera parameters of a reference camera are adjusted to obtain a reference image. Furthermore, with the goal of achieving grayscale consistency between the control image captured by the camera and the reference image, the camera parameters of the camera are adjusted to achieve consistency adjustment of the multi-camera system. The entire adjustment process is simple and efficient, improving the consistency of images captured by multiple cameras on the same object to be inspected and ensuring the consistency of the inspection results.
[0040] Based on the contents of the above embodiment, as an optional embodiment, the present invention provides a method for adjusting consistency of a multi-camera system, which performs flat-field correction on cameras in the multi-camera system, including the following steps: controlling the camera lenses to align with a calibration plate and capturing a target image in a defocused manner; wherein the cameras are configured such that: the exposure time is a preset exposure time, and the light source brightness is such that the average grayscale value of the target image is a preset grayscale value and no mura defects are present; and flat-field correction is performed on the target image to complete the flat-field correction of the camera.
[0041] Specifically, when performing FFC calibration on each camera, aim the camera at the calibration plate, adjust the working distance so that the target image is out of focus and visually free of mura, set the camera exposure time to the preset exposure time, and adjust the light source brightness so that the average grayscale value (average grayscale value) of the target image is approximately 180 (i.e., the preset grayscale value). The camera's built-in FFC calibration or camera shading correction function is enabled to complete the camera's FFC calibration. Mura defects refer to uneven grayscale in the image, such as dark or bright spots.
[0042] In particular, when a camera is used at a certain exposure time, the corners of the image captured may appear red. Therefore, in order to ensure normal use of the camera in actual scenes, the present invention sets the camera exposure time to a preset exposure time, thereby overcoming the above-mentioned red corner phenomenon.
[0043] Based on the content of the above embodiment, as an optional embodiment, before controlling the camera lens to aim at the calibration plate and capturing the target image in defocus, it also includes: selecting a calibration plate that matches the object to be inspected according to the reflection characteristics of the object to be inspected.
[0044] Specifically, if the surface of the object to be inspected is mainly diffuse reflective, the present invention can select white paper or a diffuse reflective whiteboard as the calibration board; if the surface of the object to be inspected is mainly specular reflective, the present invention can select a plane mirror as the calibration board.
[0045] Optionally, if the multiple cameras in the multi-camera system are color cameras, before performing flat-field correction on each camera in the multi-camera system, the method further includes: performing white balance adjustment on each color camera. If the multiple cameras in the multi-camera system are black and white cameras, white balance adjustment is not required.
[0046] Typically, the present invention can utilize a camera to capture an out-of-focus image of a white object (white paper or whiteboard), and use the camera to perform automatic white balance.
[0047] Based on the contents of the above embodiments, as an optional embodiment, the present invention provides a consistency adjustment method for a multi-camera system, which adjusts the camera parameters of a reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected, including: adjusting the brightness of the light source of the reference camera to collect a reference image that meets preset visual inspection requirements; the preset visual inspection requirements include: image clarity requirements.
[0048] It is understandable that the exposure time of the reference camera here is still the preset exposure time set during flat field correction, that is, in this embodiment, only the brightness of the light source of the reference camera is adjusted to obtain a reference image that meets the preset clarity requirement.
[0049] Specifically, in the adjustment of the reference camera, any feature area to be inspected of the object to be inspected is selected and moved into the field of view of the reference camera, the camera exposure is set to the preset exposure time, and the brightness of the appropriate light source is adjusted so that the image captured by the reference camera of the object to be inspected meets the visual inspection requirements.
[0050] Image clarity is an important indicator of image quality. For images captured by a camera, the clarity of the image can be evaluated using a number of clarity evaluation metrics. The present invention can employ existing clarity evaluation methods to assess whether a reference image meets preset clarity requirements. For example, the Brenner gradient method and the Tenegrad gradient method are relatively mature methods and will not be detailed here.
[0051] Based on the contents of the above embodiments, as an optional embodiment, the present invention provides a consistency adjustment method for a multi-camera system. When the cameras of the multi-camera system are black and white cameras, the camera parameters of the paired cameras are continuously adjusted until the grayscale of the control image is determined to be consistent with that of the reference image. The method includes: continuously adjusting the brightness of the light source of the paired cameras until the grayscale of the control image is determined to be consistent with that of the reference image.
[0052] Specifically, during the adjustment of the black-and-white camera, the same feature region to be inspected as that of the reference camera on the same object is selected and placed in the same position within the camera's field of view. The camera's exposure time is still set to the preset exposure time, i.e., the exposure time set during the flat-field calibration process. It will be appreciated that in this embodiment, only the brightness of the camera's light source is adjusted until the grayscale of the captured control image matches that of the reference image.
[0053] Optionally, when the cameras of the multi-camera system are black and white cameras, determining that the grayscale of the control image is consistent with that of the reference image includes: respectively obtaining the average grayscale values of the reference image and the control image; when the difference between the average grayscale values of the reference image and the control image is less than a preset threshold, determining that the grayscale of the control image is consistent with that of the reference image.
[0054] The difference can be the absolute value of the difference. Of course, the present invention can also use the grayscale histogram difference comparison to determine the grayscale consistency, which will not be described in detail here.
[0055] Based on the contents of the above embodiments, as an optional embodiment, the present invention provides a consistency adjustment method for a multi-camera system. When the cameras of the multi-camera system are color cameras, the camera parameters of the pair camera are continuously adjusted until the grayscale of the control image is determined to be consistent with that of the reference image, including: continuously adjusting the brightness of the light source of the pair camera until the grayscale of any channel of the control image is determined to be consistent with that of any channel of the reference image; and continuously adjusting the white balance coefficients of the other two channels of the pair camera respectively until the grayscale of the other two channels of the control image and the other two channels of the reference image are determined to be consistent in corresponding channels.
[0056] Specifically, during the adjustment of the color camera's secondary camera, the same feature region to be inspected as that of the reference camera on the same object is selected and placed in the same position in the secondary camera's field of view. The secondary camera's exposure time is still set to the preset exposure time, i.e., the exposure time set during the flat-field calibration process. Continuously adjusting the brightness of the secondary camera's light source ensures that only the grayscale of one of the RGB channels (R, G, or B) of the secondary camera's image matches the grayscale of the corresponding channel in the reference image captured by the reference camera, while the grayscales of the other two channels differ significantly.
[0057] After adjusting the light source brightness to ensure that the grayscale of one of the R, G, or B channels of the control camera and the reference camera is consistent, keep the light source brightness constant and continuously adjust the white balance coefficients of the control camera's other two channels until the grayscale of the other two channels of the image captured by the control camera and the reference camera is consistent. For example, after adjusting the light source brightness, the grayscale of the G channel of the image of the object to be inspected by the control camera and the reference camera is consistent, while the grayscale difference of the R and B channels is small. Then, keep the light source brightness constant and adjust the white balance coefficients of the R and B channels of the control camera until the grayscale of the R and B channels of the image of the object to be inspected by the control camera and the reference camera is consistent.
[0058] Optionally, when the cameras of the multi-camera system are color cameras, determining whether the grayscale of the control image is consistent with that of the reference image includes: respectively calculating the average grayscale values of the reference image and the control image in different channels; judging whether the grayscale of each channel is consistent based on the difference in the average grayscale values of the reference image and the control image in each channel; and determining that the grayscale of the control image is consistent with that of the reference image in the current channel when it is determined that the difference in the average grayscale values of the control image and the reference image in the current channel is less than a preset threshold.
[0059] Similar to the above embodiment, the difference can be the absolute value of the difference. Of course, the present invention can also use the grayscale histogram difference comparison to determine the grayscale consistency, which will not be repeated here.
[0060] In summary, the present invention first performs flat-field correction on all cameras in a multi-camera system; then, the camera parameters of the reference camera are adjusted to obtain a reference image; further, with the goal of achieving grayscale consistency between the control image captured by the camera and the reference image, the camera parameters of the camera are adjusted to achieve consistency adjustment of the multi-camera system. The entire adjustment process of the present invention is simple and efficient. By adjusting the camera imaging uniformity, light source brightness, and camera white balance coefficient, the consistency of images captured by multiple cameras on the same object to be inspected is improved, ensuring the consistency of the detection results.
[0061] Figure 2 Schematic diagram of the structure of the consistency adjustment device for a multi-camera system provided by the present invention, as shown in FIG. Figure 2 As shown, the device includes: a flat field correction module 201 , a reference image acquisition module 202 and a consistency adjustment module 203 .
[0062] The flat field correction module 201 is used to perform flat field correction on each camera in the multi-camera system.
[0063] Among them, the multi-camera system includes multiple cameras.
[0064] The reference image acquisition module 202 is used to adjust the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected.
[0065] The reference image is an image captured by a reference camera that meets preset visual detection requirements, and the reference camera is any camera in the multi-camera system;
[0066] The consistency adjustment module 203 is used to continuously adjust the camera parameters of the cameras until it is determined that the grayscale of the control image is consistent with the reference image, so as to achieve consistency adjustment of the multi-camera system.
[0067] The control image is an image of the feature area to be inspected captured by a pair of cameras and meeting preset visual inspection requirements, and the pair of cameras is a camera other than the reference camera in the multi-camera system.
[0068] The consistency adjustment device for a multi-camera system provided by the present invention first performs flat-field correction on all cameras in the multi-camera system; then, the camera parameters of the reference camera are adjusted to obtain a reference image; further, with the goal of achieving grayscale consistency between the control image captured by the camera and the reference image, the camera parameters of the camera are adjusted to achieve consistency adjustment of the multi-camera system; the entire adjustment process is simple and efficient, which improves the consistency of images captured by multiple cameras on the same object to be inspected and ensures the consistency of the inspection results.
[0069] It should be noted that the consistency adjustment device for a multi-camera system provided in an embodiment of the present invention can, during specific operation, execute the consistency adjustment method for a multi-camera system described in any of the above embodiments, which will not be elaborated in this embodiment.
[0070] Figure 3 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call logic instructions in the memory 330 to execute a consistency adjustment method for a multi-camera system, the method comprising: performing flat field correction on each camera in the multi-camera system; the multi-camera system comprising multiple cameras; adjusting the camera parameters of a reference camera to obtain a reference image of a feature region to be inspected of an object to be inspected; the reference image is an image captured by a reference camera that meets preset visual inspection requirements, and the reference camera is any camera in the multi-camera system; and continuously adjusting the camera parameters of a control camera until it is determined that the grayscale of the control image is consistent with that of the reference image, thereby achieving consistency adjustment of the multi-camera system; the control image is an image of a feature region to be inspected that meets preset visual inspection requirements captured by the control camera, and the control camera is a camera in the multi-camera system other than the reference camera.
[0071] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0072] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the consistency adjustment method of the multi-camera system provided in the above-mentioned embodiments, the method comprising: performing flat field correction on each camera in the multi-camera system; the multi-camera system comprises multiple cameras; adjusting the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected; the reference image is an image captured by the reference camera that meets the preset visual detection requirements, and the reference camera is any camera in the multi-camera system; continuously adjusting the camera parameters of the control camera until it is determined that the grayscale of the control image is consistent with that of the reference image, so as to achieve consistency adjustment of the multi-camera system; the control image is an image of the feature area to be inspected captured by the control camera that meets the preset visual detection requirements, and the control camera is a camera in the multi-camera system other than the reference camera.
[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0074] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for adjusting the consistency of a multi-camera system, characterized in that: include: performing a flat-field correction on each camera in a multi-camera system; the multi-camera system comprising a plurality of cameras; Adjusting the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected; The reference image is an image captured by a reference camera that meets preset visual detection requirements, and the reference camera is any camera in the multi-camera system; Continuously adjusting the camera parameters of the counter camera until it is determined that the grayscale of the control image is consistent with that of the reference image, thereby achieving consistency adjustment of the multi-camera system; the control image is an image of the feature area to be inspected captured by the counter camera that meets preset visual inspection requirements, and the counter camera is a camera in the multi-camera system other than the reference camera; When the cameras of the multi-camera system are color cameras, the camera parameters of the cameras are continuously adjusted until it is determined that the grayscale of the control image is consistent with that of the reference image, including: Continuously adjusting the brightness of the light source of the pair of cameras until it is determined that the grayscale of any channel of the control image is consistent with that of any channel of the reference image; Any one of the channels is an R channel, a G channel or a B channel; The white balance coefficients of the other two channels of the pair of cameras are continuously adjusted until it is determined that the other two channels of the control image and the other two channels of the reference image have consistent grayscales in corresponding channels.
2. The consistency adjustment method of a multi-camera system according to claim 1, characterized in that: Performing a flat-field correction on cameras in a multi-camera system involves the following steps: Controlling the camera lens to align with the calibration plate and capturing the target image in defocus; wherein the camera is configured such that: the exposure time is a preset exposure time, and the light source brightness is such that the average grayscale value of the target image is a preset grayscale value, and there is no mura defect; Performing flat field correction on the target image to complete the flat field correction of the camera.
3. The consistency adjustment method of a multi-camera system according to claim 1, characterized in that: In a case where the multiple cameras of the multi-camera system are color cameras, before performing flat field correction on each camera in the multi-camera system, the method further includes: Perform white balance adjustment for each color camera.
4. The method for adjusting the consistency of a multi-camera system according to claim 2, wherein: Before controlling the camera lens to align with the calibration plate and capturing the target image in defocus, the method further includes: According to the reflection characteristics of the object to be inspected, a calibration plate that matches the object to be inspected is selected.
5. The method for adjusting the consistency of a multi-camera system according to claim 2, wherein: Adjust the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected, including: The brightness of the light source of the reference camera is adjusted to capture a reference image that meets preset visual inspection requirements; the preset visual inspection requirements include: image clarity requirements.
6. The method for adjusting the consistency of a multi-camera system according to claim 2, wherein: When the cameras of the multi-camera system are black and white cameras, the camera parameters of the cameras are continuously adjusted until it is determined that the grayscale of the control image is consistent with that of the reference image, including: The brightness of the light source of the pair of cameras is continuously adjusted until it is determined that the grayscale of the control image is consistent with that of the reference image.
7. The method for adjusting the consistency of a multi-camera system according to claim 6, wherein: In a case where the cameras of the multi-camera system are black and white cameras, determining whether the grayscale of the comparison image is consistent with the reference image includes: respectively obtaining average grayscale values of the reference image and the control image; When the difference between the average grayscale values of the reference image and the comparison image is smaller than a preset threshold, it is determined that the grayscale of the comparison image is consistent with that of the reference image.
8. The method for adjusting the consistency of a multi-camera system according to claim 1, wherein: When the cameras of the multi-camera system are color cameras, determining whether the grayscale of the comparison image is consistent with the reference image includes: Calculating the average grayscale values of the reference image and the control image in different channels respectively; Determining whether the grayscale of each channel is consistent based on the difference between the average grayscale value of each channel of the reference image and the control image; When it is determined that the difference between the average grayscale values of the comparison image and the reference image in the current channel is less than a preset threshold, it is determined that the grayscale of the comparison image and the reference image in the current channel is consistent.
9. A consistency adjustment device for a multi-camera system, characterized in that: include: A flat field correction module, configured to perform flat field correction on each camera in a multi-camera system; the multi-camera system comprises a plurality of cameras; A reference image acquisition module is used to adjust the camera parameters of the reference camera to obtain a reference image of the feature area to be inspected of the object to be inspected; The reference image is an image captured by a reference camera that meets preset visual detection requirements, and the reference camera is any camera in the multi-camera system; a consistency adjustment module, configured to continuously adjust camera parameters of a counter camera until the grayscale of the control image is determined to be consistent with the grayscale of the reference image, thereby achieving consistency adjustment of the multi-camera system; the control image is an image of the feature area to be inspected captured by the counter camera that meets preset visual inspection requirements; and the counter camera is a camera in the multi-camera system other than the reference camera; When the cameras of the multi-camera system are color cameras, the camera parameters of the cameras are continuously adjusted until it is determined that the grayscale of the control image is consistent with that of the reference image, including: Continuously adjusting the brightness of the light source of the pair of cameras until it is determined that the grayscale of any channel of the control image is consistent with that of any channel of the reference image; Any one of the channels is an R channel, a G channel or a B channel; The white balance coefficients of the other two channels of the pair of cameras are continuously adjusted until it is determined that the other two channels of the control image and the other two channels of the reference image have consistent grayscales in corresponding channels.