CN108347600B - Industrial camera correction method and system - Google Patents

Industrial camera correction method and system Download PDF

Info

Publication number
CN108347600B
CN108347600B CN201810180926.1A CN201810180926A CN108347600B CN 108347600 B CN108347600 B CN 108347600B CN 201810180926 A CN201810180926 A CN 201810180926A CN 108347600 B CN108347600 B CN 108347600B
Authority
CN
China
Prior art keywords
industrial camera
rgb
color
calibrated
values
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810180926.1A
Other languages
Chinese (zh)
Other versions
CN108347600A (en
Inventor
侯丽敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Fu Zhan Intelligent Technology Co Ltd
Original Assignee
Shanghai Fu Zhan Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Fu Zhan Intelligent Technology Co Ltd filed Critical Shanghai Fu Zhan Intelligent Technology Co Ltd
Priority to CN201810180926.1A priority Critical patent/CN108347600B/en
Publication of CN108347600A publication Critical patent/CN108347600A/en
Application granted granted Critical
Publication of CN108347600B publication Critical patent/CN108347600B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/02Diagnosis, testing or measuring for television systems or their details for colour television signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Processing Of Color Television Signals (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

The invention provides an industrial camera correction method and system, which are characterized in that a uniform field is set to correct a scene, images shot in the uniform brightness scene are extracted, four-corner shadows are extracted from the images, and the four-corner shadows are eliminated according to a middle region, so that brightness measurement errors caused by the lens are eliminated; the calibration of the chromaticity and the brightness is carried out separately, the chromaticity meter and the industrial camera to be calibrated use the same standard color plate to carry out chromaticity and RGB data acquisition, the chromaticity is fitted by utilizing a polynomial fitting mode without extreme value taking operation, all color plate data can be used, the result is more accurate, the brightness calibration is optimized through a target, and the brightness error is reduced by adopting the least square method for calculation.

Description

Industrial camera correction method and system
Technical Field
The invention relates to the technical field of industrial cameras, in particular to an industrial camera correction method and system.
Background
Light Emitting Diodes (LEDs) are now widely used, such as in the display industry and the lighting industry. For the display industry, to realize high-quality display effect, the brightness and chromaticity of each display pixel of the LED display screen need to be corrected; for the lighting industry, the quality of the lamp can be greatly influenced by the problem of dead spots on the lamp, the traditional human eye observation cannot meet the industrialized requirement, the quantitative analysis of the dead spots of the lamp is very important, and in order to meet the quantitative requirement, the detection of the brightness and the chromaticity of each LED is an inevitable way for realizing the quantization.
At present, a color CCD camera (Bayer Mosaic RGB camera) is generally calibrated by respectively measuring a standard white board and a standard color board for photography with a color CCD camera and a colorimeter to be calibrated in a darkroom, inputting a digital image acquired by the camera into digital image processing software to read color values (Ir, Ig, Ib) of the image, converting stimulus values (X, Y, Z) actually measured by the colorimeter into tristimulus values (R, G, B) corresponding to a target pixel to be studied, and finally comparing and analyzing the obtained tristimulus values (R, G, B) with color valued (Ir, Ig, Ib) of the image to complete colorimetry calibration of the camera.
The CCD camera thus calibrated still has the following defects: 1. the four corners of the camera inevitably have shadows during shooting, which is determined by the characteristics of the lens; 2. when the camera chromaticity is corrected, the data does not conform to the standard provided by the CIE, so that the data does not conform to the visual curve of human eyes; 3. the luminance correction process does not fully utilize the sets of data, resulting in unreliable results.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an industrial camera correction method and system, which can eliminate shadow at four corners and improve the accuracy of chromaticity and brightness.
In order to solve the above problems, the present invention provides a method for calibrating an industrial camera, comprising the following steps:
s1: the method comprises the steps that an integrating sphere is used, an industrial camera to be calibrated shoots a white field picture, RGB three-channel values of all pixel points of a middle area and four corner areas are extracted according to brightness difference, the RGB three-channel values of all the pixel points of the middle area are averaged, and a uniform field calibration coefficient matrix is calculated by using the average value and the RGB three-channel values of all the pixel points of the four corner areas, so that uniform field calibration of the RGB three channels of the industrial camera to be calibrated is achieved;
s2: shooting the standard color plate by using the same standard color plate, a standard colorimeter and an industrial camera to be calibrated, wherein the standard colorimeter acquires color tristimulus values of all color blocks on the standard color plate, the industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate, polynomial fitting is carried out according to the color tristimulus values of all the color blocks to obtain fitting data, and a chromaticity calibration coefficient matrix is obtained according to the fitting data and the RGB values of all the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
s3: the method comprises the steps of utilizing an integrating sphere and illuminating the inside of the integrating sphere through an RGBW four-channel lamp, controlling W channel change of the RGBW four-channel lamp, collecting RGB values of each brightness order at each stage of an industrial camera to be calibrated, obtaining a plurality of color tristimulus values by a standard colorimeter in each stage of shooting, minimizing the maximum distance between each color tristimulus value and the RGB value of each brightness order to be a target function, and solving a brightness calibration coefficient matrix by utilizing a least square method to realize brightness correction of RGB three channels of the industrial camera to be calibrated.
According to one embodiment of the invention, the integrating sphere is hollow and white, and is provided with a lamp irradiation port for arranging a lamp and a shooting port for arranging a standard colorimeter or an industrial camera to be calibrated;
in the step S1, a lamp is connected to the lamp illumination port to illuminate the hollow interior of the integrating sphere; the shooting port is connected with an industrial camera to be calibrated, the shooting direction of the industrial camera to be calibrated faces to the sphere center position of the integrating sphere, and a white field picture is shot;
in the step S3, an RGBW four-channel lamp is connected to the lamp irradiation port to illuminate the hollow interior of the integrating sphere, and the W channel variation of the RGBW four-channel lamp is controlled; and the shooting port is simultaneously connected to the industrial camera to be calibrated and the standard colorimeter.
According to an embodiment of the present invention, in step S3, the W channels of the lamps of the RGBW four channels are controlled to sequentially increase by 16 from 0 to 255 for changing, so that the industrial camera to be calibrated acquires 17 pictures at each change point, and total 17 sets of RGB values with different brightness levels, the standard colorimeter acquires 17 corresponding sets of color stimulus values at each change point, and the luminance calibration coefficient matrix of the RGB values is calculated by a least square method with the maximum distance between the 17 corresponding sets of color stimulus values and the 17 sets of RGB values with different brightness levels being minimized as an optimization target.
According to an embodiment of the present invention, in step S3,
the standard colorimeter directly obtains 17 groups of color coordinates (X, Y) and brightness values l, and the color stimulation values X0, Y0 and Z0 are calculated as follows: y0 ═ L, X0 ═ L/Y ×, Z0 ═ L/Y (1-X-Y);
obtaining CIEXYZ _ IN ═ X0, Y0, Z0 ]', which is a 3 × 17 order matrix;
the industrial camera collects 17 groups of RGB values with different brightness levels to obtain RGB ═ R, G, B' ″, which is a matrix with 3 × 17 levels;
and establishing an objective function F ═ (CIEXYZ _ IN-cons _ a × RGB) ^2, and solving the minimum value of the objective function according to a least square method, wherein the cons _ a at the moment is a brightness calibration coefficient matrix of the solved RGB value.
According to an embodiment of the present invention, in step S2, the standard colorimeter, the industrial camera to be calibrated, and the central color block of the standard color plate are arranged in the same straight line, and are operated in a dark room, and the standard color plate is illuminated by a lamp.
According to one embodiment of the present invention, the standard color palette has 24 color patches, and in the step S2,
the standard colorimeter collects color tristimulus values of 24 color blocks one by one, and carries out polynomial fitting according to color tristimulus values Xi, Yi and Zi of the ith color block to obtain fitting data V, wherein V is (V1, V2, …, Vi, … and Vn), Vi is (Xi, Yi and Zi, (XiYi) 0.5, (XiZi) 0.5, (YiZi) 0.5 and 1), and n is the number of color blocks on the standard color plate;
the industrial camera to be calibrated integrally shoots the standard color plate to obtain a picture, and RGB values of all color blocks on the standard color plate are acquired, wherein the RGB values of the ith color block are R0i, G0i and B0 i;
obtaining a chromaticity calibration coefficient matrix A according to the fitting data V and the RGB values of the color blocks:
X=ATv, wherein ATFor the transpose of the matrix of the chrominance calibration coefficients being evaluated,
Figure BDA0001588378640000041
the solution equation of A is A ═ VT)-1(V*XT)。
In accordance with one embodiment of the present invention,
the step S2 of acquiring the RGB values of the color blocks on the standard color plate by the industrial camera to be calibrated and the step S3 of acquiring the RGB values of the brightness levels at each stage by the industrial camera to be calibrated are performed on the basis that the industrial camera to be calibrated has completed the uniform field correction of the RGB three channels according to the uniform field correction coefficient matrix in the step S1;
after the steps S2 and S3 are executed, the method further includes step S4: and multiplying the chromaticity calibration coefficient matrix and the brightness calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera to be calibrated.
According to an embodiment of the present invention, the steps S1, S2, and S3 are independently performed;
after the steps S1, S2 and S3 are executed, the method further includes step S4: and multiplying the uniform field calibration coefficient matrix, the chrominance calibration coefficient matrix and the luminance calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera to be calibrated.
The present invention also provides an industrial camera calibration system, comprising: the system comprises a standard color plate, a colorimeter, a lamp, an integrating sphere and a controller;
the industrial camera to be calibrated and the colorimeter can be simultaneously connected into a shooting port of the integrating sphere, and the lamp can be connected into a lamp irradiation port of the integrating sphere;
in a first correction scene, the industrial camera to be calibrated is connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp irradiation port of the integrating sphere for illumination, and the industrial camera to be calibrated shoots a white field picture; the controller extracts RGB three-channel values of each pixel point in the middle area and the four corner areas according to the brightness difference, averages the RGB three-channel values of each pixel point in the middle area, and calculates a uniform field calibration coefficient matrix by using the average value and the RGB three-channel values of each pixel point in the four corner areas so as to realize uniform field calibration of the RGB three-channel of the industrial camera to be calibrated;
in a second calibration scene, a lamp in a darkroom illuminates the standard color plate, and a standard colorimeter and an industrial camera to be calibrated shoot the same standard color plate; the method comprises the steps that a standard colorimeter acquires color tristimulus values of all color blocks on a standard color plate, and an industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate; the controller carries out polynomial fitting according to the color tristimulus values of the color blocks to obtain fitting data, and obtains a chromaticity calibration coefficient matrix according to the fitting data and the RGB values of the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
under a third calibration scene, the industrial camera to be calibrated and the standard colorimeter are simultaneously connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp illumination port of the integrating sphere for illumination, and the lamp is selected as an RGBW four-channel lamp and illuminates the inside of the integrating sphere; the controller controls W channel changes of the lamps of the RGBW four channels, the industrial camera to be calibrated collects RGB values of all brightness orders at each stage, and the standard colorimeter shoots at each stage to obtain a plurality of color tristimulus values; the controller minimizes the maximum distance between each color tristimulus value and the RGB value of each brightness order to obtain a brightness calibration coefficient matrix by using a least square method so as to realize brightness correction of RGB three channels of the industrial camera to be calibrated.
After the technical scheme is adopted, compared with the prior art, the invention has the following beneficial effects:
in the embodiment of the invention, a uniform field correction scene is set, images shot in the uniform brightness scene are extracted, four-corner shadows are extracted from the images, and the four-corner shadows are eliminated according to a middle region, so that brightness measurement errors caused by the lens are eliminated; the calibration of the chromaticity and the brightness is carried out separately, the chromaticity meter and the industrial camera to be calibrated use the same standard color plate to carry out chromaticity and RGB data acquisition, the chromaticity is fitted by utilizing a polynomial fitting mode without extreme value taking operation, all color plate data can be used, the result is more accurate, the brightness calibration is optimized through a target, and the brightness error is reduced by adopting the least square method for calculation.
Drawings
FIG. 1 is a schematic flow chart of an industrial camera calibration method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a calibration scenario according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating another calibration scenario according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather construed as limited to the embodiments set forth herein.
Referring to fig. 1, in one embodiment, an industrial camera calibration method may include the steps of:
s1: the method comprises the steps that an integrating sphere is used, an industrial camera to be calibrated shoots a white field picture, RGB three-channel values of all pixel points of a middle area and four corner areas are extracted according to brightness difference, the RGB three-channel values of all the pixel points of the middle area are averaged, and a uniform field calibration coefficient matrix is calculated by using the average value and the RGB three-channel values of all the pixel points of the four corner areas, so that uniform field calibration of the RGB three channels of the industrial camera to be calibrated is achieved;
s2: shooting the standard color plate by using the same standard color plate, a standard colorimeter and an industrial camera to be calibrated, wherein the standard colorimeter acquires color tristimulus values of all color blocks on the standard color plate, the industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate, polynomial fitting is carried out according to the color tristimulus values of all the color blocks to obtain fitting data, and a chromaticity calibration coefficient matrix is obtained according to the fitting data and the RGB values of all the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
s3: the method comprises the steps of utilizing an integrating sphere and illuminating the inside of the integrating sphere through an RGBW four-channel lamp, controlling W channel change of the RGBW four-channel lamp, collecting RGB values of each brightness order at each stage of an industrial camera to be calibrated, obtaining a plurality of color tristimulus values by a standard colorimeter in each stage of shooting, minimizing the maximum distance between each color tristimulus value and the RGB value of each brightness order to be a target function, and solving a brightness calibration coefficient matrix by utilizing a least square method to realize brightness correction of RGB three channels of the industrial camera to be calibrated.
An industrial camera calibration method according to an embodiment of the present invention will be described in more detail below with reference to the accompanying drawings.
In step S1, the scene device of fig. 3 may be referred to. The integrating sphere 5 is a hollow sphere, and a white paint having no wavelength selectivity and (uniform) diffuse reflectivity is coated on the inner surface of the sphere, and the illuminance in any direction in the sphere is equal. Since the integrating sphere 5 is a darkroom and needs to be illuminated by a lamp, the lamp 4 can be, for example, a D65 light source to generate white light, so that the industrial camera to be calibrated can take a white field picture from the integrating sphere, and since the illuminance is uniform, the shadows in the four corner regions of the white field picture taken by the industrial camera to be calibrated 1 can avoid the influence of the scene. The industrial camera is, for example, a CCD.
Because of the influence of the camera characteristic, a certain shadow exists in the four corner regions in the white field picture, the white field picture can be obviously divided into a middle region and four corner regions due to the brightness difference, the middle region can have an interval from the four corner regions to avoid the interference of data, so that RGB three-channel values of all pixels in the middle region and the four corner regions can be extracted according to the brightness difference, the RGB three-channel values of all pixels in the middle region are averaged to obtain R _ AVER _ CENTE, G _ AVER _ CENTE and B _ AVER _ CENTE, the average R _ AVER _ CENTE, G _ AVER _ CENTE and B _ AVER _ CENTE are used for calculating an average field calibration coefficient matrix, the RGB three-channel values of all pixels can be respectively divided by the R _ AVER _ CENTE, G _ AVER _ CENTE and B _ AVER _ CENTE to obtain calibration coefficients of all pixels, and the whole pixel points can form a uniform field calibration coefficient matrix so as to realize the uniform field calibration of the RGB three channels of the industrial camera to be calibrated. When the uniform field is corrected, the uniform field calibration coefficient matrix can be multiplied by the actual RGB value to complete the correction.
Next, step S2 is performed, and in step S2, the scene device of fig. 2 may be referred to. The standard color plate 3 is also called a color test target plate, and color blocks with different colors are arranged on the standard color plate, and the specific number can be selected. In step S2, the scene device of fig. 2 is in a darkroom, and the standard color palette is illuminated by the light fixture, so that the illumination is uniform on the color palette.
The standard colorimeter 2 and the industrial camera 1 to be calibrated shoot the same standard color plate. The standard colorimeter 2 acquires the color tristimulus values of each color block on the standard color plate 3, and the color tristimulus values can be obtained by conversion according to data directly measured by the standard colorimeter 2. The to-be-calibrated industrial camera 1 acquires RGB values of each color patch on the standard color plate 3, and since a plurality of pixel points are usually provided on a color patch, the RGB values of each color patch can be determined according to a statistical value of the RGB values of the pixel points corresponding to the color patch, for example, a mean value.
And performing polynomial fitting according to the color tristimulus values of the color blocks acquired by the standard colorimeter 3 to obtain fitting data, and obtaining a chromaticity calibration coefficient matrix according to the fitting data and the RGB values of the color blocks acquired by the industrial camera 1 to be calibrated so as to realize chromaticity correction of RGB three channels of the industrial camera 1 to be calibrated. In the chroma correction, the chroma calibration coefficient matrix can be multiplied by the real RGB value of the color block to finish the chroma correction.
Step S3 is then performed, and of course, steps S2 and S3 are interchangeable. In step S3, reference may be made to the scene device of fig. 3, except that in step S3, the standard colorimeter 2 and the industrial camera 1 to be calibrated need to be measured simultaneously, and there is a certain requirement for the luminaire 4, which needs to be an RGBW four-channel luminaire, and the value of the W channel is controllable between 0 and 255. Of course, the devices may be in the same set.
The method comprises the steps that lamps 4 of RGBW four channels illuminate the inside of an integrating sphere, the W channel change of the lamps 4 of the RGBW four channels is controlled, an industrial camera 1 to be calibrated collects RGB values of all brightness orders at each stage, a standard colorimeter 2 obtains a plurality of color tristimulus values by shooting at each stage, the maximum distance between each color tristimulus value and the RGB value of each brightness order is minimized to serve as a target function, and a brightness calibration coefficient matrix is obtained by a least square method, so that the brightness correction of the RGB three channels of the industrial camera 1 to be calibrated is achieved.
In the embodiment of the invention, a uniform field correction scene is set, images shot in the uniform brightness scene are extracted, four-corner shadows are extracted from the images, and the four-corner shadows are eliminated according to a middle region, so that brightness measurement errors caused by the lens are eliminated; the calibration of the chromaticity and the brightness is carried out separately, the standard colorimeter 2 and the industrial camera 1 to be calibrated use the same standard color plate to carry out chromaticity and RGB data acquisition, the polynomial fitting mode is used for fitting the chromaticity without extreme value taking operation, all color plate data can be used, the result is more accurate, the brightness calibration is optimized through a target, and the least square method is adopted for calculation, so that the brightness error is reduced.
In one embodiment, the integrating sphere 5 is hollow and white, and the integrating sphere 5 has a lamp illumination opening for installing a lamp 4 and a shooting opening for installing a standard colorimeter 2 or an industrial camera 1 to be calibrated;
in the step S1, a lamp 4 is connected to the lamp irradiation port to illuminate the hollow interior of the integrating sphere 5; the industrial camera 1 to be calibrated is connected to the shooting port, the shooting direction of the industrial camera 1 to be calibrated faces to the sphere center position of the integrating sphere 5, and a white field picture is shot; of course, several pictures can be taken and then selected;
in the step S3, an RGBW four-channel lamp 4 is connected to the lamp irradiation port to illuminate the hollow interior of the integrating sphere, and the W channel variation of the RGBW four-channel lamp 4 is controlled; the shooting port is simultaneously connected to the industrial camera 1 to be calibrated and the standard colorimeter 2, and the industrial camera 1 to be calibrated and the standard colorimeter 2 simultaneously acquire data in the W channel change process of the lamp 4.
Preferably, in step S3, the W channels of the RGBW four-channel luminaire 4 are controlled to change by sequentially increasing 16 from 0 to 255, that is, when the W channels change to 0, 15, 31, 9.. …, and 255, the industrial camera 1 to be calibrated and the standard colorimeter 2 both perform acquisition, so that the industrial camera 1 to be calibrated acquires 17 pictures at each change point, 17 sets of RGB values with different brightness levels are obtained, the standard colorimeter 2 acquires 17 corresponding sets of color stimulus values at each change point, the maximum distance (i.e., the maximum difference) between the 17 corresponding sets of color stimulus values and the 17 sets of RGB values with different brightness levels is minimized as an optimization target, and a brightness calibration coefficient matrix of the RGB values is calculated by a least square method.
More specifically, in step S3,
the standard colorimeter 2 directly obtains 17 groups of color coordinates (X, Y) and brightness values 1, and color stimulation values X0, Y0 and Z0 are obtained by calculation: y0 ═ L, X0 ═ L/Y ×, Z0 ═ L/Y (1-X-Y);
obtaining CIEXYZ _ IN ═ X0, Y0, Z0 ]', which is a 3 × 17 order matrix;
acquiring 17 groups of RGB values with different brightness levels by the industrial camera 1 to be calibrated to obtain RGB ═ R, G, B ]', which is a matrix of 3 × 17 levels;
and establishing an objective function F ═ (CIEXYZ _ IN-cons _ a × RGB) ^2, and solving the minimum value of the objective function according to a least square method, wherein the cons _ a at the moment is a brightness calibration coefficient matrix of the solved RGB value.
After calculating cons _ a, the calibrated RGB values can be obtained by matrix multiplication: CIEXYZ-OUT is cons-a RGB.
In one embodiment, in the step S2, the standard colorimeter 2, the industrial camera 1 to be calibrated and the central color block of the standard color plate 3 are arranged in the same straight line and operated in a dark room, and the standard color plate 3 is illuminated by a lamp 4.
Preferably, the standard color plate 3 has 24 color blocks, and in step S2,
the standard colorimeter 2 collects color tristimulus values of 24 color patches one by one, and performs polynomial fitting according to the color tristimulus values Xi, Yi and Zi of the ith color patch to obtain fitting data V, wherein V is (V1, V2, …, Vi, … and Vn), Vi is (Xi, Yi, Zi, (XiYi) 0.5, (XiZi) 0.5, (YiZi) 0.5 and 1), and n is the number of color patches on the standard color patch;
the industrial camera 1 to be calibrated integrally shoots the standard color plate to obtain a picture, and RGB values of all color blocks on the standard color plate are acquired, wherein the RGB values of the ith color block are R0i, G0i and B0 i;
obtaining a chromaticity calibration coefficient matrix A according to the fitting data V and the RGB values of the color blocks:
X=ATv, wherein ATFor the transpose of the matrix of the chrominance calibration coefficients being evaluated,
Figure BDA0001588378640000101
the solution equation of A is A ═ VT)-1(V*XT)。
In one embodiment, the step S2 of acquiring the RGB values of the color blocks on the standard color plate 3 by the industrial camera 1 to be calibrated and the step S3 of acquiring the RGB values of the brightness levels by the industrial camera 1 to be calibrated at each stage are performed on the basis that the industrial camera 1 to be calibrated has completed the uniform field correction of the RGB three channels according to the uniform field calibration coefficient matrix in the step S1;
after the steps S2 and S3 are executed, the method further includes step S4: and multiplying the chromaticity calibration coefficient matrix and the brightness calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera 1 to be calibrated. The industrial camera 1 to be calibrated is firstly subjected to uniform field correction, and then the data required by the chromaticity calibration coefficient matrix and the brightness calibration coefficient matrix are acquired, so that the chromaticity calibration and the brightness calibration can be prevented from being influenced by shadow at four corners.
In another embodiment, the steps S1, S2, and S3 are performed independently;
after the steps S1, S2 and S3 are executed, the method further includes step S4: and multiplying the uniform field calibration coefficient matrix, the chrominance calibration coefficient matrix and the luminance calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera to be calibrated.
The present invention also provides an industrial camera calibration system, comprising: the system comprises a standard color plate, a colorimeter, a lamp, an integrating sphere and a controller;
the industrial camera to be calibrated and the colorimeter can be simultaneously connected into a shooting port of the integrating sphere, and the lamp can be connected into a lamp irradiation port of the integrating sphere;
in a first correction scene, the industrial camera to be calibrated is connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp irradiation port of the integrating sphere for illumination, and the industrial camera to be calibrated shoots a white field picture; the controller extracts RGB three-channel values of each pixel point in the middle area and the four corner areas according to the brightness difference, averages the RGB three-channel values of each pixel point in the middle area, and calculates a uniform field calibration coefficient matrix by using the average value and the RGB three-channel values of each pixel point in the four corner areas so as to realize uniform field calibration of the RGB three-channel of the industrial camera to be calibrated;
in a second calibration scene, a lamp in a darkroom illuminates the standard color plate, and a standard colorimeter and an industrial camera to be calibrated shoot the same standard color plate; the method comprises the steps that a standard colorimeter acquires color tristimulus values of all color blocks on a standard color plate, and an industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate; the controller carries out polynomial fitting according to the color tristimulus values of the color blocks to obtain fitting data, and obtains a chromaticity calibration coefficient matrix according to the fitting data and the RGB values of the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
under a third calibration scene, the industrial camera to be calibrated and the standard colorimeter are simultaneously connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp illumination port of the integrating sphere for illumination, and the lamp is selected as an RGBW four-channel lamp and illuminates the inside of the integrating sphere; the controller controls W channel changes of the lamps of the RGBW four channels, the industrial camera to be calibrated collects RGB values of all brightness orders at each stage, and the standard colorimeter shoots at each stage to obtain a plurality of color tristimulus values; the controller minimizes the maximum distance between each color tristimulus value and the RGB value of each brightness order to obtain a brightness calibration coefficient matrix by using a least square method so as to realize brightness correction of RGB three channels of the industrial camera to be calibrated.
For the industrial camera calibration system according to the embodiment of the present invention, reference may be made to the description of the industrial camera calibration method in the foregoing embodiments, and details are not repeated here.
Although the present invention has been described with reference to the preferred embodiments, it is not intended to limit the scope of the claims, and those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention.

Claims (7)

1. An industrial camera calibration method is characterized by comprising the following steps:
s1: the method comprises the steps that an integrating sphere is used, an industrial camera to be calibrated shoots a white field picture, RGB three-channel values of all pixel points of a middle area and four corner areas are extracted according to brightness difference, the RGB three-channel values of all the pixel points of the middle area are averaged, and a uniform field calibration coefficient matrix is calculated by using the average value and the RGB three-channel values of all the pixel points of the four corner areas, so that uniform field calibration of the RGB three channels of the industrial camera to be calibrated is achieved;
s2: shooting the standard color plate by using the same standard color plate, a standard colorimeter and an industrial camera to be calibrated, wherein the standard colorimeter acquires color tristimulus values of all color blocks on the standard color plate, the industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate, polynomial fitting is carried out according to the color tristimulus values of all the color blocks to obtain fitting data, and a chromaticity calibration coefficient matrix is obtained according to the fitting data and the RGB values of all the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
s3: the method comprises the steps that an integrating sphere is utilized, an RGBW four-channel lamp illuminates the inside of the integrating sphere, the W channel change of the RGBW four-channel lamp is controlled, an industrial camera to be calibrated acquires RGB values of all brightness levels at each stage, a standard colorimeter shoots at each stage to obtain a plurality of color tristimulus values, the maximum distance between each color tristimulus value and the RGB value of each brightness level is minimized to serve as a target function, and a brightness calibration coefficient matrix is solved by a least square method to realize brightness correction of RGB three channels of the industrial camera to be calibrated;
in step S3, the W channels of the lamps with the RGBW four channels are controlled to sequentially increase by 16 from 0 to 255 to change, so that the industrial camera to be calibrated acquires 17 pictures at each change point, 17 groups of RGB values with different brightness levels are obtained in total, the standard colorimeter acquires 17 corresponding groups of color stimulus values at each change point, and a brightness calibration coefficient matrix of the RGB values is calculated by a least square method with the maximum distance between the corresponding 17 groups of color stimulus values and the 17 groups of RGB values with different brightness levels being minimized as an optimization target; and the standard colorimeter measures and obtains 17 groups of color coordinates (X, Y) and luminance values L directly, the color stimulus values X0, Y0 and Z0 used for calculation are respectively: y0 ═ L, X0 ═ L/Y ×, Z0 ═ L/Y (1-X-Y);
obtaining CIEXYZ _ IN ═ X0, Y0, Z0 ]', which is a 3 × 17 order matrix;
the industrial camera collects 17 groups of RGB values with different brightness levels to obtain RGB ═ R, G, B' ″, which is a matrix with 3 × 17 levels;
and establishing an objective function F ═ (CIEXYZ _ IN-cons _ a × RGB) ^2, and solving the minimum value of the objective function according to a least square method, wherein the cons _ a at the moment is a brightness calibration coefficient matrix of the solved RGB value.
2. The industrial camera calibration method according to claim 1, wherein the integrating sphere is hollow and white, and the integrating sphere has a lamp illumination opening for installing a lamp and a shooting opening for installing a standard colorimeter or an industrial camera to be calibrated;
in the step S1, a lamp is connected to the lamp illumination port to illuminate the hollow interior of the integrating sphere; the shooting port is connected with an industrial camera to be calibrated, the shooting direction of the industrial camera to be calibrated faces to the sphere center position of the integrating sphere, and a white field picture is shot;
in the step S3, an RGBW four-channel lamp is connected to the lamp irradiation port to illuminate the hollow interior of the integrating sphere, and the W channel variation of the RGBW four-channel lamp is controlled; and the shooting port is simultaneously connected to the industrial camera to be calibrated and the standard colorimeter.
3. The method for calibrating an industrial camera according to claim 1, wherein in step S2, the standard colorimeter, the industrial camera to be calibrated and the central color block of the standard color plate are arranged in the same line and operated in a darkroom, and the standard color plate is illuminated by a lamp.
4. The industrial camera calibration method of claim 1, wherein the standard color patch has 24 color patches, and in the step S2,
the standard colorimeter collects color tristimulus values of 24 color blocks one by one, and carries out polynomial fitting according to color tristimulus values Xi, Yi and Zi of the ith color block to obtain fitting data V, wherein V is (V1, V2, …, Vi, … and Vn), Vi is (Xi, Yi and Zi, (XiYi) 0.5, (XiZi) 0.5, (YiZi) 0.5 and 1), and n is the number of color blocks on the standard color plate;
the industrial camera to be calibrated integrally shoots the standard color plate to obtain a picture, and RGB values of all color blocks on the standard color plate are acquired, wherein the RGB values of the ith color block are R0i, G0i and B0 i;
obtaining a chromaticity calibration coefficient matrix A according to the fitting data V and the RGB values of the color blocks:
X=ATv, wherein ATThe transpose of the matrix of the chrominance calibration coefficients to be solved,
the solution equation of A is A ═ VT)-1(V*XT)。
5. The industrial camera calibration method of any one of claims 1 to 4,
the step S2 of acquiring the RGB values of the color blocks on the standard color plate by the industrial camera to be calibrated and the step S3 of acquiring the RGB values of the brightness levels at each stage by the industrial camera to be calibrated are performed on the basis that the industrial camera to be calibrated has completed the uniform field correction of the RGB three channels according to the uniform field correction coefficient matrix in the step S1;
after the steps S2 and S3 are executed, the method further includes step S4: and multiplying the chromaticity calibration coefficient matrix and the brightness calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera to be calibrated.
6. The industrial camera calibration method of any one of claims 1 to 4, wherein the steps S1, S2, and S3 are independently performed;
after the steps S1, S2 and S3 are executed, the method further includes step S4: and multiplying the uniform field calibration coefficient matrix, the chrominance calibration coefficient matrix and the luminance calibration coefficient matrix to be used as the RGB calibration parameters of the industrial camera to be calibrated.
7. An industrial camera calibration system, comprising: the system comprises a standard color plate, a colorimeter, a lamp, an integrating sphere and a controller;
the industrial camera to be calibrated and the colorimeter can be simultaneously connected into a shooting port of the integrating sphere, and the lamp can be connected into a lamp irradiation port of the integrating sphere;
in a first correction scene, the industrial camera to be calibrated is connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp irradiation port of the integrating sphere for illumination, and the industrial camera to be calibrated shoots a white field picture; the controller extracts RGB three-channel values of each pixel point in the middle area and the four corner areas according to the brightness difference, averages the RGB three-channel values of each pixel point in the middle area, and calculates a uniform field calibration coefficient matrix by using the average value and the RGB three-channel values of each pixel point in the four corner areas so as to realize uniform field calibration of the RGB three-channel of the industrial camera to be calibrated;
in a second calibration scene, a lamp in a darkroom illuminates the standard color plate, and a standard colorimeter and an industrial camera to be calibrated shoot the same standard color plate; the method comprises the steps that a standard colorimeter acquires color tristimulus values of all color blocks on a standard color plate, and an industrial camera to be calibrated acquires RGB values of all color blocks on the standard color plate; the controller carries out polynomial fitting according to the color tristimulus values of the color blocks to obtain fitting data, and obtains a chromaticity calibration coefficient matrix according to the fitting data and the RGB values of the color blocks so as to realize chromaticity correction of RGB three channels of the industrial camera to be calibrated;
under a third calibration scene, the industrial camera to be calibrated and the standard colorimeter are simultaneously connected into a shooting port of the integrating sphere for shooting, the lamp is connected into a lamp illumination port of the integrating sphere for illumination, and the lamp is selected as an RGBW four-channel lamp and illuminates the inside of the integrating sphere; the controller controls W channel changes of the lamps of the RGBW four channels, the industrial camera to be calibrated collects RGB values of all brightness orders at each stage, and the standard colorimeter shoots at each stage to obtain a plurality of color tristimulus values; the controller minimizes the maximum distance between each color tristimulus value and the RGB value of each brightness order to obtain a brightness calibration coefficient matrix by using a least square method so as to realize brightness correction of RGB three channels of the industrial camera to be calibrated;
wherein, the standard colorimeter measures and directly obtains 17 groups of color coordinates (X, Y) and brightness values L, and the color stimulation values X0, Y0 and Z0 obtained by calculation are respectively: y0 ═ L, X0 ═ L/Y ×, Z0 ═ L/Y (1-X-Y); obtaining CIEXYZ _ IN ═ X0, Y0, Z0 ]', which is a 3 × 17 order matrix; the industrial camera collects 17 groups of RGB values with different brightness levels to obtain RGB ═ R, G, B' ″, which is a matrix with 3 × 17 levels; and establishing an objective function F ═ (CIEXYZ _ IN-cons _ a × RGB) ^2, and solving the minimum value of the objective function according to a least square method, wherein the cons _ a at the moment is a brightness calibration coefficient matrix of the solved RGB value.
CN201810180926.1A 2018-03-05 2018-03-05 Industrial camera correction method and system Active CN108347600B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810180926.1A CN108347600B (en) 2018-03-05 2018-03-05 Industrial camera correction method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810180926.1A CN108347600B (en) 2018-03-05 2018-03-05 Industrial camera correction method and system

Publications (2)

Publication Number Publication Date
CN108347600A CN108347600A (en) 2018-07-31
CN108347600B true CN108347600B (en) 2020-01-07

Family

ID=62957959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810180926.1A Active CN108347600B (en) 2018-03-05 2018-03-05 Industrial camera correction method and system

Country Status (1)

Country Link
CN (1) CN108347600B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111656759A (en) * 2018-11-13 2020-09-11 华为技术有限公司 Image color correction method and device and storage medium
CN110276129B (en) * 2019-06-21 2022-11-29 贵州大学 Method, system and device for controlling equivalence ratio of fuel supplied to combustion furnace based on combustion control system
CN110942748A (en) * 2019-10-22 2020-03-31 武汉精立电子技术有限公司 Panel voltage drop compensation method and device based on area array camera
EP3837968A1 (en) * 2019-12-19 2021-06-23 Leaf Learn s.r.o. Indoor plant cultivation system
CN115174881B (en) * 2022-07-15 2024-02-13 深圳市火乐科技发展有限公司 Color gamut mapping method, device, projection equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996614A (en) * 2009-08-25 2011-03-30 康佳集团股份有限公司 Full-screen color correction method for LED display and implementation system thereof
CN103226819A (en) * 2013-03-29 2013-07-31 武汉大学 Segmental counting-based relative radiation correction method
CN103954362A (en) * 2014-04-25 2014-07-30 杭州电子科技大学 Digital colourimetry method based on imaging device
CN104902153A (en) * 2015-05-25 2015-09-09 北京空间机电研究所 Color correction method for multi-spectrum cameras
CN105187819A (en) * 2015-07-29 2015-12-23 合肥埃科光电科技有限公司 Color response testing and correcting device and method for industrial color cameras
KR20170059272A (en) * 2015-11-20 2017-05-30 한양대학교 산학협력단 Camera calibration system and method
CN106791328A (en) * 2017-01-09 2017-05-31 中国科学院长春光学精密机械与物理研究所 A kind of aviation CCD imaging systems and aircraft
GB2547689A (en) * 2016-02-26 2017-08-30 Nokia Technologies Oy A multi-camera device and a calibration method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996614A (en) * 2009-08-25 2011-03-30 康佳集团股份有限公司 Full-screen color correction method for LED display and implementation system thereof
CN103226819A (en) * 2013-03-29 2013-07-31 武汉大学 Segmental counting-based relative radiation correction method
CN103954362A (en) * 2014-04-25 2014-07-30 杭州电子科技大学 Digital colourimetry method based on imaging device
CN104902153A (en) * 2015-05-25 2015-09-09 北京空间机电研究所 Color correction method for multi-spectrum cameras
CN105187819A (en) * 2015-07-29 2015-12-23 合肥埃科光电科技有限公司 Color response testing and correcting device and method for industrial color cameras
KR20170059272A (en) * 2015-11-20 2017-05-30 한양대학교 산학협력단 Camera calibration system and method
GB2547689A (en) * 2016-02-26 2017-08-30 Nokia Technologies Oy A multi-camera device and a calibration method
CN106791328A (en) * 2017-01-09 2017-05-31 中国科学院长春光学精密机械与物理研究所 A kind of aviation CCD imaging systems and aircraft

Also Published As

Publication number Publication date
CN108347600A (en) 2018-07-31

Similar Documents

Publication Publication Date Title
CN108347600B (en) Industrial camera correction method and system
CN107197225B (en) Color digital camera white balance correcting based on chromatic adaptation model
KR101909772B1 (en) Fast calibration of displays using spectral-based colorimetrically calibrated multicolor camera
US8462227B2 (en) Digital camera module white balance calibration method and apparatus using only single illumination source data
CN106373523B (en) Spliced bright and dark line compensation method
US8768055B2 (en) Image sensor apparatus and method for scene illuminant estimation
CN106023886B (en) A kind of point-by-point bright chroma bearing calibration of LED and system
CN105551431B (en) LED display module uniformity correcting method
TWI769509B (en) Method of using a camera system to characterize ambient illumination, computer readable storage medium, and camera system
WO2010031252A1 (en) Method for correcting lightness of electrical display screen
JP2009527961A (en) Color-balanced camera with flashlight unit
CN109506781B (en) Chrominance measuring method and device
CN113194303B (en) Image white balance method, device, electronic equipment and computer readable storage medium
CN110322830B (en) LED screen brightness correction method and device
Zapryanov et al. Automatic White Balance Algorithms forDigital StillCameras–a Comparative Study
CN112185301B (en) Display device correction method and device and processor
CN114019746A (en) LED calibration method and system
CN105812661B (en) A kind of digital camera uniformity correcting method based on light box and gray card
Zhao et al. Spectral illumination correction: Achieving relative color constancy under the spectral domain
JP2016525723A (en) Movie projection measurement
KR20070112949A (en) Device for tunning multi image sensor and method thereof
CN110300291B (en) Apparatus and method for determining color value, digital camera, application, and computer device
CN115190282B (en) Method for avoiding white balance distortion of camera module under high color temperature
CN111798442B (en) Whiteness measuring method and parameter calibration method in whiteness measurement
Zhao et al. Pixel-wise Illumination Correction Algorithms for Relative Color Constancy Under the Spectral Domain

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Industrial camera calibration methods and systems

Effective date of registration: 20231221

Granted publication date: 20200107

Pledgee: Industrial Bank Co.,Ltd. Shanghai West sub branch

Pledgor: SHANGHAI FUZHAN INTELLIGENT TECHNOLOGY Co.,Ltd.

Registration number: Y2023310000905