A method, device and storage medium for adjusting consistency of multiple cameras of a spliced screen
By unifying the camera environment and exposure time in a multi-industrial camera system, combining standard grayscale and reference grayscale image fitting, the problem of inconsistent image grayscale in stitching screen detection is solved, and the detection efficiency is improved.
Patent Information
- Application Number
- CN202411419942.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-10-12
AI Technical Summary
In the existing splicing screen detection technology, multi-station industrial cameras have inconsistent image grayscale due to environmental differences and equipment aging when shooting splicing screens, and the exposure time needs to be adjusted frequently, which increases the detection time.
By assembling a multi-industrial camera system, the operating environment and initial exposure time of each camera are consistent. The standard camera and the camera to be corrected are used to capture the standard grayscale and reference grayscale images of the spliced screen respectively. By fitting the polynomial, the exposure time is adjusted to reduce the Single-frame noise difference improves the accuracy of grayscale mean.
The number of exposure time adjustments for each industrial camera is reduced, the overall detection time of the splicing screen is reduced, and the image acquisition efficiency is improved.
Smart Images

Figure CN118945477B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of spliced screen detection, and in particular, to a method, device, and storage medium for adjusting consistency of multiple cameras of a spliced screen. Background Art
[0002] With the rapid development of industrial and Internet technologies, the industry's requirements for industrial product quality are becoming more and more refined and standardized. As far as the display panel industry is concerned, the quality of products directly affects its product competitiveness. Among them, the accuracy of product shape and size specifications is the most basic process indicator of product quality. As one of the display components of the device, the display screen is used in various high-end devices, such as mobile phones, TVs, tablets, etc. As people's requirements for screen display continue to increase, the display screen has gradually become a technologically sophisticated product.
[0003] A spliced screen is a display screen that can be spliced. Multiple spliced screens can form an independent box, and then multiple independent boxes are spliced into the final super-large display screen. Therefore, the super-large display screen formed by splicing has the great advantage of being able to be flexibly applied in a variety of usage scenarios and having no display seams. However, while having this advantage, this assembled screen will also derive other negative problems in terms of process, such as the problem of screen consistency caused by differences between display panels due to the manufacturing process. Specifically, in the manufacturing process, a multi-station industrial camera is used to capture images of the spliced screen, and multiple spliced screens use cameras at different positions for image capture, but the operating environments of cameras at different stations are different, which easily leads to inconsistent grayscale of the captured images, thereby affecting subsequent defect detection and other links. In the prior art, it is usually selected to adjust the consistency of acquisition parameters such as shooting angle, shooting aperture, shooting distance, and ambient light source for multiple industrial cameras on multiple stations. However, due to the differences in the aging of each industrial camera's own equipment and the differences in the assembly of parts, there is still a situation where the image grayscale of the same spliced screen is different when shot by the same industrial camera. In the prior art, the standard plate and the spliced screen are collected at the same time, and the captured images of the standard plate and the spliced screen are calculated for average grayscale detection. When the average grayscale of the spliced screen and the standard plate are inconsistent, the grayscale of the captured image of the spliced screen is corrected by the captured image of the standard plate. This method requires additional shooting of the standard plate image, and the amount of calculation is large, and the correction effect is poor. In order to solve the above situation, the prior art uses the method of adjusting the exposure time to adjust the grayscale. First, an average grayscale range is preset, and the average grayscale is calculated after shooting the spliced screen with an industrial camera. If the average grayscale is not within the average grayscale range, the exposure time is adjusted according to the preset step size, and the image is captured again to obtain the image of the spliced screen until the average grayscale reaches the preset range. However, this method still has problems. Before shooting a certain type of splicing screen, the industrial camera at each workstation is set to the same initial exposure time by default. However, due to the difference in single-frame noise in the pixel display of different types of splicing screens in the edge area and the center area, this initial exposure time may not be the most suitable for this type of splicing screen. This requires the industrial cameras at some workstations to continuously adjust the exposure time according to the step size, making the total number of exposure time adjustments for each industrial camera uncertain, increasing the grayscale adjustment time of the industrial camera for the splicing screen image, and thus increasing the overall detection time of the splicing screen. Summary of the invention
[0004] The present application discloses a method, a device and a storage medium for adjusting consistency of multiple cameras of a spliced screen, which are used to reduce the overall detection time of the spliced screen.
[0005] The first aspect of the present application discloses a method for adjusting consistency of multiple cameras of a spliced screen, comprising:
[0006] Assemble and debug a multi-industrial camera system through a splicing screen so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same. The multi-industrial camera system includes a standard camera and at least one camera to be calibrated;
[0007] Light up the spliced screen so that it reaches the standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during shooting according to a preset exposure time set, where N is an integer greater than 0;
[0008] Use a standard camera and a camera to be calibrated to shoot the spliced screen, generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set;
[0009] Determine the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen;
[0010] Performing central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set;
[0011] Perform fitting according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set of the standard camera;
[0012] Perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated;
[0013] Calculate the correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial and the second reference fitting polynomial set;
[0014] The initial exposure time of the camera to be calibrated is corrected according to the correction coefficient.
[0015] Optionally, determining the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen includes:
[0016] Select an image to be extracted from the first standard grayscale image set;
[0017] Determine a number of pending thresholds according to the spliced screen, and respectively determine the in-threshold area and out-threshold area of the image to be extracted under each of the pending thresholds;
[0018] According to the in-threshold area and out-threshold area corresponding to each pending threshold, the in-threshold ratio, the in-threshold grayscale mean, the out-threshold area ratio and the out-of-domain grayscale mean are generated;
[0019] Generate a weight value according to the ratio of the in-threshold area, the in-threshold grayscale mean, the ratio of the out-threshold area and the out-of-domain grayscale mean of each pending threshold;
[0020] Determine the target threshold value according to the weight value of each pending threshold value T;
[0021] Determine the central area of the image to be extracted according to the target threshold;
[0022] Target threshold calculation and central area extraction are performed for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set.
[0023] Optionally, performing central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set includes:
[0024] Determine the central area range and central area pixel value of each image of an exposure time in the first standard grayscale image set;
[0025] Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image;
[0026] According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused through the pixel averaging algorithm to generate a mean fused image. The mean fused image will replace each image of this exposure time.
[0027] Generate an inscribed rectangular area or a completely overlapping area and perform mean fusion processing for the images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set;
[0028] An inscribed rectangular area or a completely overlapping area is generated and a mean value fusion process is performed for images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set.
[0029] Optionally, calculating the correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the second reference fitting polynomial set includes:
[0030] According to the size of N, the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set are compared in M order to generate a first comparison coefficient, where M is an integer greater than 1;
[0031] According to the size of N, the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set are compared with each other to generate a second comparison coefficient;
[0032] According to the size of N, the coefficients of the first standard fitting polynomial and the second standard fitting polynomial are compared with each other to generate a third comparison coefficient;
[0033] Taking the standard camera as a reference, correction coefficients of the standard grayscale and N reference grayscales are generated for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient and the third comparison coefficient.
[0034] Optionally, assemble and debug a multi-industrial camera system through a splicing screen, including:
[0035] Assemble multiple industrial camera systems and select a splicing screen;
[0036] Adjust the shooting angle, aperture and external light source of industrial cameras in a multi-industrial camera system to be consistent;
[0037] Adjust the imaging height of industrial cameras in a multi-industrial camera system according to the splicing screen;
[0038] Generates initial exposure time for industrial cameras in a multi-industrial camera system based on the spliced screen.
[0039] Optionally, the imaging height of the industrial cameras in the multi-industrial camera system is adjusted according to the splicing screen, including:
[0040] Place the spliced screen on the workstation corresponding to the industrial camera;
[0041] Determine the acquisition range and step length. The acquisition range is the distance range between the industrial camera and the splicing screen, and the step length is the acquisition interval.
[0042] Control the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval, and generate a spliced screen image group;
[0043] Performing bilateral filtering on the images in the spliced screen image group to generate a bilateral filtered image;
[0044] Obtain the mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image;
[0045] Get pre-designed brightness formulas, contrast formulas, and structure formulas;
[0046] The focus value is calculated according to the mean, standard deviation, covariance of the spliced screen image and the bilateral filter image in combination with the brightness formula, the contrast formula and the structure formula to generate a focus value set;
[0047] The acquisition point corresponding to the maximum focus value is determined as the imaging height of the industrial camera.
[0048] Optionally, generate initial exposure time for industrial cameras in a multi-industrial camera system based on the spliced screen, including:
[0049] An industrial camera is determined as a standard camera from a multi-industrial camera system, and the remaining industrial cameras are determined as cameras to be calibrated;
[0050] Place the spliced screen on the workstation corresponding to the standard camera and light it up;
[0051] Use a standard camera to shoot the spliced screen and generate a grayscale image of the spliced screen;
[0052] Calculate the real-time grayscale mean of the grayscale image of the spliced screen;
[0053] When the real-time grayscale mean value is not within the preset grayscale range, the exposure time of the standard camera is adjusted to re-shoot the spliced screen until the real-time grayscale mean value reaches the preset grayscale range, and the unified initial exposure time is determined.
[0054] The second aspect of the present application discloses a device for adjusting consistency of multiple cameras of a spliced screen, comprising:
[0055] An assembly unit, used for assembling and debugging a multi-industrial camera system through a splicing screen, so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same, and the multi-industrial camera system includes a standard camera and at least one camera to be calibrated;
[0056] A start-up unit is used to light up the spliced screen so that the spliced screen reaches the standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during the shooting process according to a preset exposure time set, where N is an integer greater than 0;
[0057] A first generating unit is used to shoot the spliced screen using a standard camera and a camera to be calibrated, to generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set;
[0058] A determination unit, configured to determine the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen;
[0059] A fusion unit, configured to perform central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set;
[0060] A second generating unit is used to perform fitting according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set of the standard camera;
[0061] A third generating unit is used to perform fitting according to the grayscale mean and exposure time of the central area in the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated;
[0062] a calculation unit, configured to calculate a correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the second reference fitting polynomial set;
[0063] The correction unit is used to correct the initial exposure time of the camera to be corrected according to the correction coefficient.
[0064] Optionally, determine the unit, including:
[0065] Select an image to be extracted from the first standard grayscale image set;
[0066] Determine a number of pending thresholds according to the spliced screen, and respectively determine the in-threshold area and out-threshold area of the image to be extracted under each of the pending thresholds;
[0067] According to the in-threshold area and out-threshold area corresponding to each pending threshold, the in-threshold ratio, the in-threshold grayscale mean, the out-threshold area ratio and the out-of-domain grayscale mean are generated;
[0068] Generate a weight value according to the ratio of the in-threshold area, the in-threshold grayscale mean, the ratio of the out-threshold area and the out-of-domain grayscale mean of each pending threshold;
[0069] Determine the target threshold value according to the weight value of each pending threshold value T;
[0070] Determine the central area of the image to be extracted according to the target threshold;
[0071] Target threshold calculation and central area extraction are performed for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set.
[0072] Optional, fusion unit, including:
[0073] Determine the central area range and central area pixel value of each image of an exposure time in the first standard grayscale image set;
[0074] Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image;
[0075] According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused through the pixel averaging algorithm to generate a mean fused image. The mean fused image will replace each image of this exposure time.
[0076] Generate an inscribed rectangular area or a completely overlapping area and perform mean fusion processing for the images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set;
[0077] An inscribed rectangular area or a completely overlapping area is generated and a mean value fusion process is performed for images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set.
[0078] Optionally, a computing unit, including:
[0079] According to the size of N, the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set are compared in M order to generate a first comparison coefficient, where M is an integer greater than 1;
[0080] According to the size of N, the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set are compared with each other to generate a second comparison coefficient;
[0081] According to the size of N, the coefficients of the first standard fitting polynomial and the second standard fitting polynomial are compared with each other to generate a third comparison coefficient;
[0082] Taking the standard camera as a reference, correction coefficients of the standard grayscale and N reference grayscales are generated for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient and the third comparison coefficient.
[0083] Optional, assembly unit, including:
[0084] Assembly module, used to assemble multiple industrial camera systems and select a splicing screen;
[0085] An adjustment module is used to adjust the shooting angle, aperture and external light source of industrial cameras in a multi-industrial camera system to be consistent;
[0086] A height adjustment module is used to adjust the imaging height of industrial cameras in a multi-industrial camera system according to the splicing screen;
[0087] A generation module is used to generate an initial exposure time for an industrial camera in a multi-industrial camera system according to a spliced screen.
[0088] Optional, height adjustment module, including:
[0089] Place the spliced screen on the workstation corresponding to the industrial camera;
[0090] Determine the acquisition range and step length. The acquisition range is the distance range between the industrial camera and the splicing screen, and the step length is the acquisition interval.
[0091] Control the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval, and generate a spliced screen image group;
[0092] Performing bilateral filtering on the images in the spliced screen image group to generate a bilateral filtered image;
[0093] Obtain the mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image;
[0094] Get pre-designed brightness formulas, contrast formulas, and structure formulas;
[0095] The focus value is calculated according to the mean, standard deviation, covariance of the spliced screen image and the bilateral filter image in combination with the brightness formula, the contrast formula and the structure formula to generate a focus value set;
[0096] The acquisition point corresponding to the maximum focus value is determined as the imaging height of the industrial camera.
[0097] Optionally, generate modules, including:
[0098] An industrial camera is determined as a standard camera from a multi-industrial camera system, and the remaining industrial cameras are determined as cameras to be calibrated;
[0099] Place the spliced screen on the workstation corresponding to the standard camera and light it up;
[0100] Use a standard camera to shoot the spliced screen and generate a grayscale image of the spliced screen;
[0101] Calculate the real-time grayscale mean of the grayscale image of the spliced screen;
[0102] When the real-time grayscale mean value is not within the preset grayscale range, the exposure time of the standard camera is adjusted to re-shoot the spliced screen until the real-time grayscale mean value reaches the preset grayscale range, and the unified initial exposure time is determined.
[0103] The third aspect of the present application provides a device for adjusting consistency of multiple cameras of a spliced screen, comprising:
[0104] Processor, memory, input-output unit, and bus;
[0105] The processor is connected to the memory, the input and output unit, and the bus;
[0106] The memory stores a program, and the processor calls the program to execute the first aspect and any optional consistency adjustment method of the first aspect.
[0107] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program performs the first aspect and any optional consistency adjustment method of the first aspect.
[0108] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0109] In the present application, a multi-industrial camera system is first assembled. The multi-industrial camera system includes multiple industrial cameras of the same model. The multi-industrial camera system is debugged by a splicing screen so that the detection parameters of the system are as similar as possible. One of the industrial cameras in the multi-industrial camera system is set as a standard camera, and the others are determined as cameras to be calibrated. Input a standard grayscale image and N reference grayscale images to the splicing screen. In the actual process, the standard camera and the camera to be calibrated are used for shooting. During the shooting process, the exposure time of the standard camera and the camera to be calibrated is adjusted. At a certain grayscale, the standard camera and the camera to be calibrated will simultaneously shoot at least 2 images at each exposure time. Generate a first standard grayscale image set of the standard camera at the standard grayscale, and a first reference grayscale image set of the standard camera at N reference grayscales. A second standard grayscale image set of the camera to be calibrated at the standard grayscale, and a second reference grayscale image set of the camera to be calibrated at N reference grayscales. The central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set and the second reference grayscale image set is determined according to the type of the spliced screen, and the central area fusion processing is performed on the images with the same grayscale and the same exposure time. Then, the first standard fitting polynomial and the first reference fitting polynomial set of the standard camera are generated according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set. The second standard fitting polynomial and the second reference fitting polynomial set of the camera to be calibrated are generated according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set. The correction coefficient of the camera to be calibrated is calculated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial and the second reference fitting polynomial set. Finally, the initial exposure time of the camera to be calibrated is corrected according to the correction coefficient.
[0110] By setting a consistent initial exposure time for industrial cameras on multiple stations, and then using a standard camera to collect multiple images of standard grayscale and reference grayscale at different exposure times, by determining the central area with strong grayscale sensitivity of each image, filtering out the edge area with weak grayscale sensitivity, and then through the central area fusion processing, the single-frame noise difference generated by the pixels in the edge area and the central area is reduced, and the image can extract more accurate grayscale mean data. The subsequent polynomial fitting effect for the exposure time and grayscale mean of the image is improved. Then the correction coefficient is calculated by the polynomial of the standard camera and the camera to be corrected, and finally the initial exposure time of the camera to be corrected can be corrected by the correction coefficient. This method enables each camera to be corrected to use the standard camera as a reference to adjust the initial exposure time for a certain type of splicing screen. Before each camera to be corrected collects the type of splicing screen, its initial exposure time is as consistent as possible with the type of splicing screen, reducing the total number of exposure time adjustments for each industrial camera, and even without adjusting the initial exposure time, reducing the grayscale adjustment time of the industrial camera for the splicing screen acquisition image, thereby reducing the overall detection time of the splicing screen. BRIEF DESCRIPTION OF THE DRAWINGS
[0111] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0112] Figure 1 A schematic diagram of an embodiment of a method for adjusting consistency of multiple cameras of a spliced screen of the present application;
[0113] Figure 2 This is a schematic diagram of an embodiment of the first stage of the method for adjusting consistency of multiple cameras of a spliced screen of the present application;
[0114] Figure 3 A schematic diagram of an embodiment of the second stage of the method for adjusting consistency of multiple cameras of a spliced screen of the present application;
[0115] Figure 4 This is a schematic diagram of an embodiment of the third stage of the method for adjusting consistency of multiple cameras of a spliced screen of the present application;
[0116] Figure 5 This is a schematic diagram of an embodiment of the fourth stage of the method for adjusting consistency of multiple cameras of a spliced screen of the present application;
[0117] Figure 6 A schematic diagram of an embodiment of a device for adjusting the consistency of multiple cameras of a spliced screen of the present application;
[0118] Figure 7 A schematic diagram of another embodiment of the device for adjusting the consistency of multiple cameras of the spliced screen of the present application. DETAILED DESCRIPTION
[0119] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0120] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0121] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0122] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0123] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0124] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0125] In the prior art, the grayscale of the spliced screen image is adjusted by adjusting the exposure time. First, an average grayscale range needs to be preset. After shooting the spliced screen with an industrial camera, the average grayscale is calculated. If the average grayscale is not within the average grayscale range, the exposure time is adjusted according to the preset step length, and the image is collected again to obtain the image of the spliced screen until the average grayscale reaches the preset range. However, this method requires continuous adjustment of the exposure time according to the step length, and the initial exposure time of the industrial camera at each workstation is unified. Since different types of spliced screens show single-frame noise differences in the edge area and the center area, and the initial exposure time is not adjusted according to the internal differences of the spliced screen types, the total number of exposure time adjustments for each industrial camera is uncertain, which increases the grayscale adjustment time of the industrial camera for the spliced screen image, thereby increasing the overall detection time of the spliced screen.
[0126] Based on this, the present application discloses a method, device and storage medium for adjusting consistency of multiple cameras of a spliced screen, which are used to reduce the overall detection time of the spliced screen.
[0127] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0128] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.
[0129] See also Figure 1 The present application provides an embodiment of a method for adjusting consistency of multiple cameras of a spliced screen, including:
[0130] 101. Assemble and debug a multi-industrial camera system through a splicing screen so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same, and the multi-industrial camera system includes a standard camera and at least one camera to be calibrated;
[0131] In this embodiment, the terminal is assembled and the multi-industrial camera system is debugged through the splicing screen, so that the operating environment of each industrial camera of the same model in the multi-industrial camera system is as similar as possible.
[0132] Specifically, the requirements for the factors affecting the grayscale of the image of the industrial camera at each workstation are as follows:
[0133] First of all, the industrial cameras at all workstations must be of the same camera brand and model. Secondly, the industrial cameras at each workstation must capture images of the same standard splicing screen sample from the entire assembly to the subsequent calibration process. The industrial cameras at each workstation must be in the same operating environment, specifically requiring shooting angle, shooting center, external light source brightness, external light source angle, darkroom environment, camera aperture, initial exposure time and shooting height, etc. Among the above parameters, some parameters need to be set using a standard splicing screen so that the debugged multi-industrial camera system can adapt to the same type of splicing screen to be tested. It should be noted that the standard splicing screen used in debugging can be replaced with the splicing screen to be tested, and the model and specifications of the standard splicing screen and the splicing screen to be tested are the same.
[0134] In this embodiment, before capturing an image, the aperture of the industrial cameras of all stations can be uniformly adjusted to 8.0, and they can be fixed at the same height position on the camera bracket of each station. At the same time, it is also necessary to ensure that the camera lens of each station has the same horizontal or vertical angle with the detection table of the station. After the above operations are completed, adjust the focus of the industrial camera of each station to normal imaging. In short, it is necessary to avoid as much as possible the differentiated effects of various external factors on the quality of images captured by industrial cameras at each station. It should be noted that the aperture number may be different in different usage scenarios, and it is necessary to ensure that the same aperture is used in different stations under the same usage scenario. The aperture uniformly adjusted to 8.0 in the above example is only one of the cases.
[0135] It should be noted that the initial exposure time is a parameter that needs to be calibrated. It just remains consistent before calibration. After calibration, the initial exposure time of cameras other than standard cameras may change.
[0136] After the terminal completes the assembly and debugging of the multi-industrial camera system, next, the terminal determines one industrial camera from the multi-industrial camera system as a standard camera and another industrial camera as a camera to be calibrated.
[0137] 102. Light up the spliced screen so that the spliced screen reaches the standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during the shooting process according to a preset exposure time set, where N is an integer greater than 0;
[0138] 103. Use a standard camera and a camera to be calibrated to shoot the spliced screen, generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set;
[0139] The terminal lights up the spliced screen and allows the display to display the standard grayscale and N reference grayscales.
[0140] In this embodiment, the N reference grayscales are different from the standard grayscale, and the reference grayscale is determined according to the grayscale image that needs to be collected by the spliced screen to be detected.
[0141] In this embodiment, the value of the standard grayscale depends on the grayscale display effect of the standard splicing screen of this type. When this type of splicing screen displays a certain grayscale or a certain range of grayscales, the grayscale display effect reaches the preset conditions, and one of the grayscales is selected as a standard grayscale for detection, which will have a better effect in subsequent fitting.
[0142] The terminal adjusts the exposure time of the standard camera and the camera to be calibrated during the shooting process according to a preset exposure time set, so that multiple images are captured at each exposure time.
[0143] For example, for a spliced screen of type A, the standard grayscale is 128 grayscale, and the reference grayscale is grayscale B. The exposure time set is {T1, T2, T3, T4, T5}. The standard camera is set to exposure time T1, the spliced screen displays 128 grayscale, 5 images are taken by the standard camera, and then the exposure time is adjusted to T2, and 5 more images are taken, and so on, to generate the first standard grayscale image set of the standard camera, with a total of 25 images.
[0144] The methods for generating the first reference grayscale image set, the second standard grayscale image set and the second reference grayscale image set are similar and will not be described in detail here.
[0145] 104. Determine the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen;
[0146] In the prior art, only one image is taken, and the central area is determined for this image. The grayscale mean of the central area is directly calculated later, and the grayscale mean is fitted with the exposure time. Since the imaging capabilities of different splicing screens are different, the imaging capability in the central area is better than that in the edge area. The imaging capability here refers to the display effect and quality when displaying different grayscales. When there is external noise or system noise, a single splicing screen image is prone to single-frame noise differences in the edge area and the central area, because the edge pixels have a lower grayscale than the central image, and the transition grayscale difference is relatively large, which interferes with the correction algorithm to a certain extent. The grayscale displayed by the pixel may not be the best, which causes deviations in the determination of the central area and errors in the grayscale mean of the central area, which in turn leads to problems in subsequent fitting.
[0147] In this embodiment, by taking multiple spliced screen images at the same grayscale and the same exposure time, the central areas of these images are determined in sequence. At this time, the central areas of some images are biased, and the bias needs to be reduced through subsequent steps.
[0148] 105. Perform central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set;
[0149] The terminal performs central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set.
[0150] For example: Type A splicing screen, standard grayscale is 128 grayscale, reference grayscale is B grayscale. The exposure time set {T1, T2, T3, T4, T5}, there are 5 images at each exposure time. Select 5 images with exposure time T1, the display screen area of these 5 images is the same, after determining the center area and edge area, use the center area of each of the 5 images to overlap and place, determine a new center area range (blank image), and determine the grayscale value of the corresponding pixel point in the center area of the 5 images through this range. The grayscale values of the overlapping pixels are averaged, and then filled into the new center area range to generate a target image (new center area) with 128 grayscale and exposure time T1, and the target image is used for subsequent fitting.
[0151] It should be noted that after the central area range is determined, the central area range may not be within the central area of some images. For example, when there are only two images, the overlapping positions of the central areas of the two images are selected as the new central area range. In this case, each blank pixel in the central area range has a corresponding pixel in the two central areas. When calculating the grayscale mean, it is necessary to average the grayscale values of the pixels corresponding to the two central areas at the same position and then fill them into the central area range.
[0152] 106. Perform fitting according to the grayscale mean and exposure time of the central area in the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set for a standard camera;
[0153] 107. Perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated;
[0154] The terminal performs fitting according to the grayscale mean value and exposure time of the central area of the first standard grayscale image set to generate a first standard fitting polynomial of the standard camera.
[0155] The terminal conducted multiple experiments on the two sets of variables, exposure time and average grayscale. In this embodiment, a variety of fitting methods were used for calculation and comparison, such as exponential function equations, trigonometric function equations, polynomial equations, etc. Finally, a polynomial fitting algorithm was used to accurately fit the relationship between exposure time and grayscale mean.
[0156] The polynomial fitting equation is of the following form:
[0157]
[0158] Wherein, G is the grayscale mean value of each central area in the first standard grayscale image set, T is the exposure time in the first standard grayscale image set, is the coefficient of the number of terms, and n is the highest number of terms. In order to minimize the error from each point to the fitting curve, the following formula is minimized:
[0159]
[0160] r is the error parameter, and to obtain the coefficient , replace the right side of the above equation with Find the partial derivative and set it to 0.
[0161]
[0162] By solving the matrix equations, we can find the coefficients size.
[0163] The terminal performs fitting according to the grayscale mean value and exposure time of the central area in the first reference grayscale image set to generate a first reference fitting polynomial set for the standard camera.
[0164] Similarly, the same operation process is performed for the reference grayscale as for the standard grayscale. Suppose the values of the coefficients under the reference grayscale are .
[0165] The terminal performs fitting according to the grayscale mean value and exposure time of the central area in the second standard grayscale image set to generate a second standard fitting polynomial for the camera to be calibrated.
[0166]
[0167] in, is the grayscale mean of each central area in the second standard grayscale image set, is the exposure time in the second standard grayscale image set, is the coefficient of the number of items, and n is the highest number of items.
[0168] The terminal performs fitting according to the grayscale mean value and exposure time of the central area in the second reference grayscale image set to generate a second reference fitting polynomial set for the camera to be calibrated.
[0169] Similarly, the same operation process is performed for the reference grayscale as for the standard grayscale. Suppose the values of the coefficients under the reference grayscale are .
[0170] It should be noted that each reference grayscale will generate an exclusive reference fitting polynomial with its own polynomial coefficients.
[0171] In this embodiment, after calculating each polynomial, the standard grayscale of the standard camera is used as a reference system, and the correction coefficient of the reference grayscale of the camera to be corrected is calculated according to the coefficients of different orders. The specific calculation method is described in the embodiment.
[0172] 108. Calculate the correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the second reference fitting polynomial set;
[0173] In this embodiment, after calculating each polynomial, the standard grayscale of the standard camera is used as a reference system, and the correction coefficient of the reference grayscale of the camera to be corrected is calculated according to the coefficients of different orders. The specific calculation method is described in the embodiment.
[0174] 109. Correct the initial exposure time of the camera to be corrected according to the correction coefficient.
[0175] Finally, the terminal corrects the initial exposure time of the camera to be corrected according to the correction coefficient, and corrects the initial exposure time of each camera to be corrected in this way.
[0176] In this embodiment, a multi-industrial camera system is first assembled. The multi-industrial camera system includes multiple industrial cameras of the same model. The multi-industrial camera system is debugged by a splicing screen so that the detection parameters of the system are as similar as possible. One of the industrial cameras in the multi-industrial camera system is set as a standard camera, and the others are determined as cameras to be calibrated. Input a standard grayscale image and N reference grayscale images to the splicing screen. In the actual process, the standard camera and the camera to be calibrated are used to shoot. During the shooting process, the exposure time of the standard camera and the camera to be calibrated is adjusted. At a certain grayscale, the standard camera and the camera to be calibrated will simultaneously shoot at least 2 images at each exposure time. Generate a first standard grayscale image set of the standard camera at the standard grayscale, and a first reference grayscale image set of the standard camera at N reference grayscales. A second standard grayscale image set of the camera to be calibrated at the standard grayscale, and a second reference grayscale image set of the camera to be calibrated at N reference grayscales. The central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set and the second reference grayscale image set is determined according to the type of the spliced screen, and the central area fusion processing is performed on the images with the same grayscale and the same exposure time. Then, the first standard fitting polynomial and the first reference fitting polynomial set of the standard camera are generated according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set. The second standard fitting polynomial and the second reference fitting polynomial set of the camera to be calibrated are generated according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set. The correction coefficient of the camera to be calibrated is calculated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial and the second reference fitting polynomial set. Finally, the initial exposure time of the camera to be calibrated is corrected according to the correction coefficient.
[0177] By setting a consistent initial exposure time for industrial cameras on multiple stations, and then using a standard camera to collect multiple images of standard grayscale and reference grayscale at different exposure times, by determining the central area with strong grayscale sensitivity of each image, filtering out the edge area with weak grayscale sensitivity, and then through the central area fusion processing, the single-frame noise difference generated by the pixels in the edge area and the central area is reduced, and the image can extract more accurate grayscale mean data. The subsequent polynomial fitting effect for the exposure time and grayscale mean of the image is improved. Then the correction coefficient is calculated by the polynomial of the standard camera and the camera to be corrected, and finally the initial exposure time of the camera to be corrected can be corrected by the correction coefficient. This method enables each camera to be corrected to use the standard camera as a reference to adjust the initial exposure time for a certain type of splicing screen. Before each camera to be corrected collects the type of splicing screen, its initial exposure time is as consistent as possible with the type of splicing screen, reducing the total number of exposure time adjustments for each industrial camera, and even without adjusting the initial exposure time, reducing the grayscale adjustment time of the industrial camera for the splicing screen acquisition image, thereby reducing the overall detection time of the splicing screen.
[0178] See also Figure 2 , Figure 3 , Figure 4 and Figure 5 The present application provides another embodiment of a method for adjusting consistency of multiple cameras of a spliced screen, including:
[0179] 201. Assemble a multi-industrial camera system and select a splicing screen;
[0180] 202. Adjust the shooting angle, aperture and external light source of industrial cameras in the multi-industrial camera system to be consistent;
[0181] 203. Place the spliced screen on the workstation corresponding to the industrial camera;
[0182] In this embodiment, the terminal is equipped with a multi-industrial camera system, and then a splicing screen is selected as a standard splicing screen for debugging and correction. The terminal adjusts the shooting angle, aperture and external light source of the industrial cameras in the multi-industrial camera system to be consistent.
[0183] Next, the terminal places the spliced screen on the workstation corresponding to the industrial camera.
[0184] 204. Determine the acquisition range and step length. The acquisition range is the distance range between the industrial camera and the splicing screen, and the step length is the acquisition interval.
[0185] 205. Control the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval, and generate a spliced screen image group;
[0186] Since the thickness of different splicing screens is inconsistent, it is usually necessary to adjust the shooting height of the industrial camera and the splicing screen so that the captured image can be well focused. In traditional processing, the height of each industrial camera is generally adjusted to the same based on experience. Such processing does not take into account the differences between each workstation, which amplifies the differences in the captured splicing screen images.
[0187] In this embodiment, the terminal first determines the acquisition range and step length, wherein the acquisition range is the distance range between the industrial camera and the splicing screen, and the step length is the acquisition interval. The acquisition range is the range obtained by extending in two directions with the height set by the empirical value as the center.
[0188] The terminal controls the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval to generate a spliced screen image group. The corresponding imaging height is bound to each image in the spliced screen image group.
[0189] 206. Perform bilateral filtering on the images in the spliced screen image group to generate a bilateral filtered image;
[0190] 207. Obtain the mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image;
[0191] 208. Obtain a pre-designed brightness formula, contrast formula, and structure formula;
[0192] 209. Calculate the focus value according to the mean, standard deviation, and covariance of the spliced screen image and the bilateral filter image in combination with the brightness formula, the contrast formula, and the structure formula to generate a focus value set;
[0193] 210. Determine the acquisition point corresponding to the maximum focus value as the imaging height of the industrial camera;
[0194] The terminal performs bilateral filtering on the spliced screen images in the spliced screen image group to generate a bilateral filtered image. Next, the terminal calculates the mean of the spliced screen images. and standard deviation , the mean of the bilateral filtered image and standard deviation , and then calculate the covariance of the spliced screen image and the bilateral filtered image Finally, the focus value F is calculated based on the mean, standard deviation, and covariance of the spliced screen image and the bilateral filter image combined with the brightness formula, contrast formula, and structure formula. The calculation formula is as follows:
[0195]
[0196] The brightness formula is:
[0197]
[0198] The comparison formula is:
[0199]
[0200] Among them, the structural formula is:
[0201]
[0202] Where x represents the acquired spliced screen image, and y represents the bilateral filtered image. and Represent the mean and standard deviation of the spliced screen image respectively. and represent the mean and standard deviation of the bilateral filtered image respectively. represents the covariance of the spliced screen image and the bilateral filtered image, , , is a constant, determined according to the preset bit depth.
[0203] Finally, the terminal determines that the acquisition point corresponding to the maximum focus value is the imaging height of the industrial camera.
[0204] 211. From the multi-industrial camera system, an industrial camera is determined to be a standard camera, and the remaining industrial cameras are determined to be cameras to be calibrated;
[0205] 212. Place the spliced screen on the workstation corresponding to the standard camera and light it up;
[0206] 213. Photograph the spliced screen using a standard camera to generate a grayscale image of the spliced screen;
[0207] 214. Calculate the real-time grayscale mean value of the grayscale image of the spliced screen;
[0208] 215. When the real-time grayscale mean value is not within the preset grayscale range, adjust the exposure time of the standard camera to re-shoot the spliced screen until the real-time grayscale mean value reaches the preset grayscale range, and determine the unified initial exposure time;
[0209] In this embodiment, the terminal first determines that the industrial camera in the multi-industrial camera system is a standard camera, and the remaining industrial cameras are all determined as cameras to be calibrated. Then, the terminal places the spliced screen on the workstation corresponding to the standard camera and lights it up. The standard camera is used to shoot the spliced screen, a grayscale image of the spliced screen is generated, and the real-time grayscale mean of the grayscale image of the spliced screen is calculated. When the real-time grayscale mean is not within the preset grayscale range, the exposure time of the standard camera is adjusted to re-shoot the spliced screen until the real-time grayscale mean reaches the preset grayscale range. Finally, the initial exposure time is set for each industrial camera to be calibrated.
[0210] The terminal first adjusts the initial exposure time of the standard camera to make the initial exposure time most compatible with the standard camera, and then adjusts the initial exposure time to other cameras to be calibrated. Since the models and detection parameters of the cameras are basically the same, the initial exposure time will not be less compatible with other industrial cameras. In subsequent adjustments, the correction coefficient can be more accurate using the standard camera as a reference system.
[0211] If the initial exposure time calculation is not performed for the standard camera, the default exposure time of the standard camera may not be suitable for this type of splicing screen, and may only be suitable for most screens. In the subsequent exposure time calibration process, if the default exposure time deviates greatly from that of the standard camera, each camera to be calibrated will have deviations even after the calibration is completed.
[0212] 216. Light up the spliced screen so that the spliced screen reaches the standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during the shooting process according to a preset exposure time set, where N is an integer greater than 0;
[0213] 217. Use a standard camera and a camera to be calibrated to shoot the spliced screen, generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set;
[0214] Step 216 and step 217 in this embodiment are similar to step 102 and step 103 in the above embodiment, and are not described again here.
[0215] 218. Select an image to be extracted from the first standard grayscale image set;
[0216] 219. Determine a plurality of pending thresholds according to the spliced screen, and respectively determine an in-threshold area and an out-threshold area of the image to be extracted under each of the pending thresholds;
[0217] In this embodiment, the terminal selects an image to be extracted from the first standard grayscale image set as a reference example. The terminal first determines a number of pending thresholds based on the spliced screen, and respectively determines the in-threshold area and out-of-threshold area of the image to be extracted under each pending threshold. The pending threshold is determined based on the grayscale display quality of the spliced screen. First, the grayscale range with the best grayscale display quality of the spliced screen is determined, and the upper limit grayscale, lower limit grayscale, grayscale 0 and grayscale 255 of this range are used to generate a threshold range. Multiple pending thresholds are selected from the range of grayscale 0 and the lower limit grayscale, and then multiple pending thresholds are selected from the grayscale upper limit and grayscale 255.
[0218] The terminal determines the intra-threshold area and the extra-threshold area of the image to be extracted under each to-be-determined threshold value.
[0219] 220. Generate an intra-threshold ratio, an intra-threshold grayscale mean, an extra-threshold area ratio and an extra-threshold grayscale mean according to the intra-threshold area and the extra-threshold area corresponding to each undetermined threshold;
[0220] At this time, the terminal generates corresponding intra-threshold areas and extra-threshold areas in the image to be extracted according to each pending threshold, and generates the intra-threshold proportion and intra-threshold grayscale mean according to the data of the pixel points in the intra-threshold area, and generates the extra-threshold area proportion and extra-threshold grayscale mean according to the data of the pixel points in the extra-threshold area.
[0221] 221. Generate a weight value according to the ratio of the in-threshold area, the in-threshold grayscale mean, the ratio of the out-threshold area and the out-of-threshold grayscale mean of each pending threshold;
[0222] The terminal generates weight values according to the ratio of the area within the threshold, the grayscale mean within the threshold, the ratio of the area outside the threshold, and the grayscale mean outside the threshold for each pending threshold. , the ratio of the out-of-threshold area is The grayscale mean within the threshold is , the grayscale mean outside the domain is , then the weight value for:
[0223]
[0224] 222. Determine the target threshold value according to the weight value of each pending threshold value T;
[0225] 223. Determine the central area of the image to be extracted according to the target threshold;
[0226] 224. Calculate a target threshold and extract a central area for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set;
[0227] In this embodiment, the terminal generates a corresponding weight value for each pending threshold, and determines the pending threshold with the largest weight value as the target threshold. The central area and edge area of the image to be extracted are determined according to the target threshold, and the edge area is screened out to generate the central area of the image to be extracted.
[0228] According to the above method, target threshold calculation and central area extraction are performed for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set and the second reference grayscale image set.
[0229] 225. Determine a central area range and a central area pixel value of each image at an exposure time in the first standard grayscale image set;
[0230] In this embodiment, since multiple images are collected at the same gray scale and at the same exposure time, the central areas of these images need to be integrated first to generate a blank image.
[0231] First, the central area range and central area pixel value of each image of an exposure time in the first standard grayscale image set of the terminal, that is, the central area of each image and the grayscale value of each pixel in the central area.
[0232] 226. Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, wherein the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image;
[0233] The terminal determines the inscribed rectangular area or the completely overlapping area according to the central area range of each image.
[0234] Suppose there are 5 images. After the central areas of these 5 images are determined, they are placed on the same spliced screen image. These central areas may overlap partially or completely. The completely overlapping area refers to the position covered by all 5 central areas, and the inscribed rectangular area is within the maximum range covered by the 5 central areas, which is proportionally reduced according to the shape of the spliced screen (usually a rectangle), so that the inscribed rectangular area is located inside the maximum range.
[0235] In the completely overlapping area, the central area of each image needs to be large enough, so that the obtained completely overlapping area is also large enough and has enough pixels. If the overlapping area is small, it is necessary to use an inscribed rectangular area to expand the number of pixels. Only with a sufficient number of pixels can the grayscale mean be more accurate in the subsequent fusion processing and reduce the noise difference of a single frame.
[0236] 227. According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused by using a pixel averaging algorithm to generate a mean fused image. The mean fused image will replace each image of this exposure time.
[0237] 228. Generate an inscribed rectangular area or a completely overlapping area and perform mean fusion processing for images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set;
[0238] 229. Generate an inscribed rectangular area or a completely overlapping area and perform mean fusion processing for images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set;
[0239] In this embodiment, the terminal performs mean fusion processing on the pixels in the inscribed rectangular area or the completely overlapping area according to the pixel value of the central area of each image through a pixel averaging algorithm to generate a mean fusion image. The mean fusion image will replace each image of this exposure time. The formula is as follows:
[0240]
[0241] in, is the image after mean fusion, is the number of images taken, It is the grayscale value of the pixel points in the inscribed rectangular area or the completely overlapping area in the central area of each captured image.
[0242] 230. Perform fitting according to the grayscale mean and exposure time of the central area in the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set for a standard camera;
[0243] 231. Perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated;
[0244] Step 230 and step 231 in this embodiment are similar to step 106 and step 107 in the above embodiment, and are not described again here.
[0245] 232. Compare the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set by M order according to the size of N to generate a first comparison coefficient, where M is an integer greater than 1;
[0246] 233. Compare the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set M-order terms according to the size of N to generate a second comparison coefficient;
[0247] 234. Compare the coefficients of the first standard fitting polynomial and the second standard fitting polynomial of the Mth degree according to the size of N, and generate a third comparison coefficient;
[0248] 235. Generate, based on the standard camera as a reference, correction coefficients of a standard grayscale and N reference grayscales for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient, and the third comparison coefficient;
[0249] In this embodiment, the terminal compares the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set by Mth order according to the size of the reference grayscale to generate a first comparison coefficient, where M is an integer greater than 1, and then compares the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set by Mth order according to the size of N to generate a second comparison coefficient. Then, the terminal compares the coefficients of the first standard fitting polynomial and the second standard fitting polynomial by Mth order according to the size of N to generate a third comparison coefficient.
[0250] For example, assuming that N is 1, that is, there is only one standard grayscale and one reference grayscale, the standard grayscale and the reference grayscale data are analyzed and compared, and the grayscale data are selected respectively. and Compare the coefficients of multiple terms in and find the first comparison coefficient :
[0251]
[0252] Select and Compare the multiple terms in and find the second comparison coefficient :
[0253]
[0254] At the same time, this patent uses the 128 grayscale of each station as the reference grayscale, so it is necessary to compare the multiple coefficients of the 128 grayscale of the standard station and the correction station to calculate their third comparison coefficients. :
[0255]
[0256] Finally, the terminal generates the correction coefficients of the standard grayscale and the reference grayscale for the camera to be calibrated based on the first comparison coefficient, the second comparison coefficient and the third comparison coefficient, taking the standard camera as a reference.
[0257] For the correction coefficients on the standard camera, the correction coefficients of the standard grayscale and the reference grayscale are normalized as follows, that is, the correction coefficient M of the standard camera at the standard grayscale and the correction coefficient N at the reference grayscale are both normalized to 1:
[0258]
[0259] The correction coefficients of the standard grayscale and reference grayscale of the camera to be calibrated need to be calculated using the following formulas based on the coefficients of the standard camera: and They are the correction coefficients of the standard grayscale and reference grayscale of the camera to be calibrated:
[0260]
[0261]
[0262] You can then pass and Correction processing is performed for the exposure time of the camera to be calibrated respectively.
[0263] 236. Correct the initial exposure time of the camera to be corrected according to the correction coefficient.
[0264] Step 236 in this embodiment is similar to step 109 in the above embodiment and will not be described again here.
[0265] In this embodiment, a multi-industrial camera system is first assembled, and a spliced screen is selected. The shooting angle, aperture and external light source of the industrial camera in the multi-industrial camera system are adjusted to be consistent. The spliced screen is placed on the workstation corresponding to the industrial camera. The acquisition range and step length are determined. The acquisition range is the distance range between the industrial camera and the spliced screen, and the step length is the acquisition interval. The industrial camera is controlled to acquire images of the spliced screen within the acquisition range with the step length as the acquisition interval to generate a spliced screen image group. The images in the spliced screen image group are bilaterally filtered to generate a bilateral filtered image. The mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image are obtained. The pre-designed brightness formula, contrast formula and structure formula are obtained. The focus value is calculated according to the mean, standard deviation, and covariance of the spliced screen image and the bilateral filtered image combined with the brightness formula, contrast formula and structure formula to generate a focus value set. Determine that the acquisition point corresponding to the maximum focus value is the imaging height of the industrial camera. Determine an industrial camera as a standard camera from a multi-industrial camera system, and determine the remaining industrial cameras as cameras to be calibrated. Place the spliced screen on the workstation corresponding to the standard camera and light it up. Use the standard camera to shoot the spliced screen to generate a grayscale image of the spliced screen. Calculate the real-time grayscale mean of the grayscale image of the spliced screen. When the real-time grayscale mean is not within the preset grayscale range, adjust the exposure time of the standard camera to shoot the spliced screen again until the real-time grayscale mean reaches the preset grayscale range.
[0266] Input the standard grayscale image and N reference grayscale images to the splicing screen. In the actual process, use the standard camera and the camera to be calibrated to shoot. During the shooting process, adjust the exposure time of the standard camera and the camera to be calibrated. At a certain grayscale, the standard camera and the camera to be calibrated will simultaneously shoot at least 2 images at each exposure time. Generate the first standard grayscale image set of the standard camera at the standard grayscale, and the first reference grayscale image set of the standard camera at N reference grayscales. Generate the second standard grayscale image set of the camera to be calibrated at the standard grayscale, and the second reference grayscale image set of the camera to be calibrated at N reference grayscales.
[0267] Select an image to be extracted from the first standard grayscale image set. Determine several pending thresholds according to the spliced screen, and determine the in-threshold area and out-threshold area of the image to be extracted under each pending threshold. Generate the in-threshold ratio, in-threshold grayscale mean, out-threshold area ratio and out-of-domain grayscale mean according to the in-threshold area and out-threshold area corresponding to each pending threshold. Generate a weight value according to the in-threshold area ratio, in-threshold grayscale mean, out-threshold area ratio and out-of-domain grayscale mean of each pending threshold. Determine the target threshold according to the weight value of each pending threshold T. Determine the central area of the image to be extracted according to the target threshold. Calculate the target threshold and extract the central area for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set and the second reference grayscale image set. Determine the central area range and central area pixel value of each image in an exposure time in the first standard grayscale image set. Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image. According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused through the pixel averaging algorithm to generate a mean fused image, which will replace each image of this exposure time. The inscribed rectangular area or the completely overlapping area is generated and the mean fused image is processed for the images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set. The inscribed rectangular area or the completely overlapping area is generated and the mean fused image is processed for the images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set.
[0268] Then, the first standard fitting polynomial and the first reference fitting polynomial set of the standard camera are generated according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set. The second standard fitting polynomial and the second reference fitting polynomial set of the camera to be calibrated are generated according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set. The coefficients of the first standard fitting polynomial and the first reference fitting polynomial set are compared according to the size of N to generate a first comparison coefficient, where M is an integer greater than 1. The coefficients of the second standard fitting polynomial and the second reference fitting polynomial set are compared according to the size of N to generate a second comparison coefficient. The coefficients of the first standard fitting polynomial and the second standard fitting polynomial are compared according to the size of N to generate a third comparison coefficient. Based on the standard camera as a reference, the correction coefficients of the standard grayscale and N reference grayscales are generated for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient and the third comparison coefficient. Finally, the initial exposure time of the camera to be calibrated is corrected according to the correction coefficient.
[0269] By setting a consistent initial exposure time for industrial cameras on multiple stations, and then using a standard camera to collect multiple images of standard grayscale and reference grayscale at different exposure times, by determining the central area with strong grayscale sensitivity of each image, filtering out the edge area with weak grayscale sensitivity, and then through the central area fusion processing, the single-frame noise difference generated by the pixels in the edge area and the central area is reduced, and the image can extract more accurate grayscale mean data. The subsequent polynomial fitting effect for the exposure time and grayscale mean of the image is improved. Then the correction coefficient is calculated by the polynomial of the standard camera and the camera to be corrected, and finally the initial exposure time of the camera to be corrected can be corrected by the correction coefficient. This method enables each camera to be corrected to use the standard camera as a reference to adjust the initial exposure time for a certain type of splicing screen. Before each camera to be corrected collects the type of splicing screen, its initial exposure time is as consistent as possible with the type of splicing screen, reducing the total number of exposure time adjustments for each industrial camera, and even without adjusting the initial exposure time, reducing the grayscale adjustment time of the industrial camera for the splicing screen acquisition image, thereby reducing the overall detection time of the splicing screen.
[0270] See also Figure 6 The present application provides an embodiment of a device for adjusting consistency of multiple cameras of a spliced screen, comprising:
[0271] An assembly unit 601 is used to assemble and debug a multi-industrial camera system through a splicing screen, so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same, and the multi-industrial camera system includes a standard camera and at least one camera to be calibrated;
[0272] Optionally, the assembly unit 601 includes:
[0273] Assembly module 6011, used to assemble multiple industrial camera systems and select a splicing screen;
[0274] An adjustment module 6012 is used to adjust the shooting angle, aperture and external light source of the industrial cameras in the multi-industrial camera system to be consistent;
[0275] A height adjustment module 6013 is used to adjust the imaging height of the industrial cameras in the multi-industrial camera system according to the splicing screen;
[0276] Optionally, the height adjustment module 6013 includes:
[0277] Place the spliced screen on the workstation corresponding to the industrial camera;
[0278] Determine the acquisition range and step length. The acquisition range is the distance range between the industrial camera and the splicing screen, and the step length is the acquisition interval.
[0279] Control the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval, and generate a spliced screen image group;
[0280] Performing bilateral filtering on the images in the spliced screen image group to generate a bilateral filtered image;
[0281] Obtain the mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image;
[0282] Get pre-designed brightness formulas, contrast formulas, and structure formulas;
[0283] The focus value is calculated according to the mean, standard deviation, covariance of the spliced screen image and the bilateral filter image in combination with the brightness formula, the contrast formula and the structure formula to generate a focus value set;
[0284] The acquisition point corresponding to the maximum focus value is determined as the imaging height of the industrial camera.
[0285] The generating module 6014 is used to generate an initial exposure time for the industrial cameras in the multi-industrial camera system according to the spliced screen.
[0286] Optionally, the generating module 6014 includes:
[0287] An industrial camera is determined as a standard camera from a multi-industrial camera system, and the remaining industrial cameras are determined as cameras to be calibrated;
[0288] Place the spliced screen on the workstation corresponding to the standard camera and light it up;
[0289] Use a standard camera to shoot the spliced screen and generate a grayscale image of the spliced screen;
[0290] Calculate the real-time grayscale mean of the grayscale image of the spliced screen;
[0291] When the real-time grayscale mean value is not within the preset grayscale range, the exposure time of the standard camera is adjusted to re-shoot the spliced screen until the real-time grayscale mean value reaches the preset grayscale range, and the unified initial exposure time is determined.
[0292] The start unit 602 is used to light up the spliced screen so that the spliced screen reaches the standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during the shooting process according to a preset exposure time set, where N is an integer greater than 0;
[0293] The first generating unit 603 is used to use a standard camera and a camera to be calibrated to shoot the spliced screen, and generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set;
[0294] A determination unit 604, configured to determine the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen;
[0295] Optionally, the determining unit 604 includes:
[0296] Select an image to be extracted from the first standard grayscale image set;
[0297] Determine a number of pending thresholds according to the spliced screen, and respectively determine the in-threshold area and out-threshold area of the image to be extracted under each of the pending thresholds;
[0298] According to the in-threshold area and out-threshold area corresponding to each pending threshold, the in-threshold ratio, the in-threshold grayscale mean, the out-threshold area ratio and the out-of-domain grayscale mean are generated;
[0299] Generate a weight value according to the ratio of the in-threshold area, the in-threshold grayscale mean, the ratio of the out-threshold area and the out-of-domain grayscale mean of each pending threshold;
[0300] Determine the target threshold value according to the weight value of each pending threshold value T;
[0301] Determine the central area of the image to be extracted according to the target threshold;
[0302] Target threshold calculation and central area extraction are performed for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set.
[0303] A fusion unit 605 is used to perform central area fusion processing on the images with the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set;
[0304] Optionally, the fusion unit 605 includes:
[0305] Determine the central area range and central area pixel value of each image of an exposure time in the first standard grayscale image set;
[0306] Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image;
[0307] According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused through the pixel averaging algorithm to generate a mean fused image. The mean fused image will replace each image of this exposure time.
[0308] Generate an inscribed rectangular area or a completely overlapping area and perform mean fusion processing for the images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set;
[0309] An inscribed rectangular area or a completely overlapping area is generated and a mean value fusion process is performed for images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set.
[0310] A second generating unit 606 is used to perform fitting according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set of the standard camera;
[0311] The third generating unit 607 is used to perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated;
[0312] A calculation unit 608, configured to calculate a correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the second reference fitting polynomial set;
[0313] Optionally, the computing unit 608 includes:
[0314] According to the size of N, the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set are compared in M order to generate a first comparison coefficient, where M is an integer greater than 1;
[0315] According to the size of N, the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set are compared with each other to generate a second comparison coefficient;
[0316] According to the size of N, the coefficients of the first standard fitting polynomial and the second standard fitting polynomial are compared with each other to generate a third comparison coefficient;
[0317] Taking the standard camera as a reference, correction coefficients of the standard grayscale and N reference grayscales are generated for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient and the third comparison coefficient.
[0318] The correction unit 609 is used to correct the initial exposure time of the camera to be corrected according to the correction coefficient.
[0319] See also Figure 7 The present application provides a device for adjusting the consistency of multiple cameras of a spliced screen, comprising:
[0320] Processor 701 , memory 702 , input / output unit 703 , and bus 704 .
[0321] The processor 701 is connected to the memory 702 , the input and output unit 703 , and the bus 704 .
[0322] The memory 702 stores a program, and the processor 701 calls the program to execute the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 The consistency adjustment method in .
[0323] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 and Figure 5 The consistency adjustment method in .
[0324] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0325] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0326] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0327] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0328] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or 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, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.
Claims
1. A method for adjusting the consistency of multiple cameras of a spliced screen, characterized in that: include: Assemble and debug a multi-industrial camera system through a splicing screen so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same, and the multi-industrial camera system includes a standard camera and at least one camera to be calibrated; Light up the spliced screen so that the spliced screen reaches a standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during shooting according to a preset exposure time set, where N is an integer greater than 0; Use the standard camera and the camera to be calibrated to shoot the spliced screen, generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set; Determine, according to the type of the spliced screen, a central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set; Performing central area fusion processing on images with the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set; Perform fitting according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set of the standard camera; Perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set for the camera to be calibrated; Calculating a correction coefficient of the camera to be calibrated according to the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and polynomial coefficients in the second reference fitting polynomial set; The initial exposure time of the camera to be calibrated is calibrated according to the calibration coefficient.
2. The consistency adjustment method according to claim 1, characterized in that: Determining the central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen includes: Selecting an image to be extracted from the first standard grayscale image set; Determine a plurality of pending thresholds according to the spliced screen, and respectively determine an in-threshold area and an out-threshold area of the image to be extracted under each of the pending thresholds; According to the in-threshold area and out-threshold area corresponding to each pending threshold, the in-threshold area ratio, the in-threshold grayscale mean, the out-threshold area ratio and the out-of-threshold grayscale mean are generated; Generate a weight value according to the in-threshold area ratio, the in-threshold grayscale mean, the out-threshold area ratio and the out-of-domain grayscale mean of each pending threshold; Determine the target threshold value according to the weight value of each pending threshold value T; Determine the central area of the image to be extracted according to the target threshold; Target threshold calculation and central area extraction are performed for each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set.
3. The consistency adjustment method according to claim 1, characterized in that: Performing central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set, comprising: Determine a central area range and a central area pixel value of each image of an exposure time in the first standard grayscale image set; Determine an inscribed rectangular area or a completely overlapping area according to the central area range of each image, wherein the completely overlapping area is within the central area range of each image, and the inscribed rectangular area is within the central area range of at least one image; According to the pixel value of the central area of each image, the pixel points on the inscribed rectangular area or the completely overlapping area are averaged and fused by a pixel averaging algorithm to generate a mean fused image, which will replace each image of this exposure time; Performing inscribed rectangular area or completely overlapping area generation and mean value fusion processing for the images with the same exposure time in the first standard grayscale image set and the second standard grayscale image set; An inscribed rectangular area or a completely overlapping area is generated and a mean value fusion process is performed for the images with the same grayscale and the same exposure time in the first reference grayscale image set and the second reference grayscale image set.
4. The consistency adjustment method according to claim 1, characterized in that: Calculating the correction coefficient of the camera to be calibrated according to the polynomial coefficients in the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the second reference fitting polynomial set includes: According to the size of N, the coefficients of the first standard fitting polynomial and the first reference fitting polynomial set are compared in M order to generate a first comparison coefficient, where M is an integer greater than 1; Compare the coefficients of the second standard fitting polynomial and the second reference fitting polynomial set M times according to the size of N to generate a second comparison coefficient; Compare the coefficients of the first standard fitting polynomial and the second standard fitting polynomial with respect to the Mth order according to the size of N, and generate a third comparison coefficient; Taking the standard camera as a reference, correction coefficients of a standard grayscale and N reference grayscales are generated for the camera to be calibrated according to the first comparison coefficient, the second comparison coefficient, and the third comparison coefficient.
5. The consistency adjustment method according to any one of claims 1 to 4, characterized in that: Assemble and debug multiple industrial camera systems through splicing screens, including: Assemble multiple industrial camera systems and select a splicing screen; Adjusting the shooting angles, apertures and external light sources of the industrial cameras in the multi-industrial camera system to be consistent; Adjusting the imaging height of the industrial cameras in the multi-industrial camera system according to the spliced screen; An initial exposure time is generated for the industrial cameras in the multi-industrial camera system according to the spliced screen.
6. The consistency adjustment method according to claim 5, characterized in that: Adjusting the imaging height of the industrial camera in the multi-industrial camera system according to the spliced screen includes: Placing the spliced screen on the workstation corresponding to the industrial camera; Determine the acquisition range and step length, wherein the acquisition range is the distance range between the industrial camera and the spliced screen, and the step length is the acquisition interval; Control the industrial camera to collect images of the spliced screen within the collection range with the step length as the collection interval, and generate a spliced screen image group; Performing bilateral filtering on the images in the spliced screen image group to generate a bilateral filtered image; Obtaining the mean and standard deviation of the spliced screen image, the mean and standard deviation of the bilateral filtered image, and the covariance of the spliced screen image and the bilateral filtered image; Get pre-designed brightness formulas, contrast formulas, and structure formulas; Calculate the focus value according to the mean, standard deviation, and covariance of the spliced screen image and the bilateral filter image in combination with the brightness formula, the contrast formula, and the structure formula to generate a focus value set; The acquisition point corresponding to the maximum focus value is determined as the imaging height of the industrial camera.
7. The consistency adjustment method according to claim 5, characterized in that: Generating an initial exposure time for an industrial camera in the multi-industrial camera system according to the spliced screen includes: Determine an industrial camera from the multi-industrial camera system as a standard camera, and determine the remaining industrial cameras as cameras to be calibrated; Place the spliced screen on the workstation corresponding to the standard camera and light it up; Taking a photo of the spliced screen with a standard camera to generate a grayscale image of the spliced screen; Calculating the real-time grayscale mean of the spliced screen grayscale image; When the real-time grayscale mean value is not within the preset grayscale range, the exposure time of the standard camera is adjusted to re-shoot the spliced screen until the real-time grayscale mean value reaches the preset grayscale range, and the unified initial exposure time is determined.
8. A device for adjusting the consistency of multiple cameras of a spliced screen, characterized in that: include: An assembly unit, used for assembling and debugging a multi-industrial camera system through a splicing screen, so that the operating environment and initial exposure time of each industrial camera of the same model in the multi-industrial camera system are the same, and the multi-industrial camera system includes a standard camera and at least one camera to be calibrated; A starting unit, used to light up the spliced screen so that the spliced screen reaches a standard grayscale and N reference grayscales respectively, and adjust the exposure time of the standard camera and the camera to be calibrated during shooting according to a preset exposure time set, where N is an integer greater than 0; A first generating unit is used to use the standard camera and the camera to be calibrated to shoot the spliced screen, and generate a first standard grayscale image set and a first reference grayscale image set of the standard camera, and a second standard grayscale image set and a second reference grayscale image set of the camera to be calibrated, wherein at least two images are collected at the same exposure time for the same display grayscale in each image set; A determining unit, configured to determine a central area of each image in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set according to the type of the spliced screen; A fusion unit, configured to perform central area fusion processing on images having the same grayscale and the same exposure time in the first standard grayscale image set, the first reference grayscale image set, the second standard grayscale image set, and the second reference grayscale image set; A second generating unit is used to perform fitting according to the grayscale mean and exposure time of the central area of the first standard grayscale image set and the first reference grayscale image set to generate a first standard fitting polynomial and a first reference fitting polynomial set for the standard camera; A third generating unit is used to perform fitting according to the grayscale mean and exposure time of the central area of the second standard grayscale image set and the second reference grayscale image set to generate a second standard fitting polynomial and a second reference fitting polynomial set of the camera to be calibrated; a calculation unit, configured to calculate a correction coefficient of the camera to be calibrated according to the first standard fitting polynomial, the first reference fitting polynomial set, the second standard fitting polynomial, and the polynomial coefficients in the second reference fitting polynomial set; A correction unit is used to correct the initial exposure time of the camera to be calibrated according to the correction coefficient.
9. A device for adjusting the consistency of multiple cameras of a spliced screen, characterized in that: include: Processor, memory, input-output unit, and bus; The processor is connected to the memory, the input and output unit, and the bus; The memory stores a program, and the processor calls the program to execute the consistency adjustment method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the consistency adjustment method according to any one of claims 1 to 7.