A method for obtaining high-precision chromaticity and spectral images
By collecting and processing images in a multispectral color filter array camera, using demosaicing and spectral adaptation algorithms to convert images under unknown light sources to reference light sources, a characteristic model is established to solve the problem of low accuracy of multispectral images under unknown light sources. problem, improving the acquisition accuracy of chromaticity and spectral images.
Patent Information
- Application Number
- CN202011191187.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Under unknown light sources, the multispectral color filter array camera has low accuracy in acquiring chromaticity and spectral images, which limits its application under different light sources.
By instantaneously collecting multispectral images under an unknown light source, using a multispectral demosaicing algorithm to restore the full channel response value, and converting the image to a reference light source through a spectral adaptation algorithm, establishing a chromaticity and spectral characterization model, and calculating chromaticity and spectrum image.
It improves the acquisition accuracy of scene chromaticity and spectral images under unknown light sources, and promotes the effective application of multispectral imaging technology in unknown light environments.
Smart Images

Figure CN112484856B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of chromaticity and spectral information, and in particular to a method for obtaining high-precision chromaticity and spectral images. Background Art
[0002] Due to the existence of metamerism, the chromaticity information of objects obtained by traditional color cameras is difficult to reliably represent the original information of objects, while spectral reflectance is a physical quantity that is independent of the device and the captured light source, and can represent the original information of objects. Therefore, accurately obtaining the spectral reflectance of an object can achieve high-precision color measurement and can faithfully reproduce the color appearance of the object under any light source. Multispectral cameras can improve the accuracy of obtaining object chromaticity information and spectral reflectance because they add more channels for imaging. For multispectral cameras, the chromaticity and spectral images of the scene can be obtained respectively based on chromaticity and spectral characterization models. Due to the existence of the filter wheel, the traditional multispectral camera has a complex and bloated device structure, and the switching of filters of different bands is achieved by rotating the filter wheel, resulting in a slow multispectral image acquisition speed. Multispectral cameras based on multispectral filter arrays have compact structures because the filters are tightly attached to the sensor surface, which increases the portability of multispectral cameras, and can obtain images of all bands through a single exposure, greatly improving the acquisition efficiency of multispectral images.
[0003] Multispectral cameras have been effectively used in controllable light environments, but the chromaticity and spectral characterization models are related to the light source, that is, the chromaticity and spectral characterization models of the same device under different light sources are different, which restricts the acquisition accuracy of chromaticity and spectral images of multispectral cameras under unknown light sources. Summary of the invention
[0004] The present invention mainly solves the problem of low acquisition accuracy of chromaticity and spectral images of a multispectral camera based on a multispectral filter array under unknown light source, and provides a method for acquiring high-precision chromaticity and spectral images based on a multispectral filter array.
[0005] The technical solution adopted by the present invention to solve the technical problem is a method for obtaining high-precision chromaticity and spectral images, comprising the following steps:
[0006] S1: Instantaneous acquisition of multispectral images of scenes under unknown light sources based on multispectral filter arrays I x ∈R H×W×1 , H and W are the height and width of the image respectively;
[0007] S2: Use the multispectral demosaicing algorithm to restore the full channel response value;
[0008] S3: Use spectral adaptation algorithm to transform the multispectral image I under unknown light source xSwitch to the reference light source;
[0009] S4: establishing chromaticity characterization and spectral characterization models based on multi-spectral filter arrays under reference light sources;
[0010] S5: Calculate the chromaticity and spectral images under the reference light source.
[0011] It can instantly collect multispectral images of scenes under unknown light sources, improving the accuracy of acquiring object color and spectrum.
[0012] As a preferred embodiment of the above scheme, in step S2, the sensor response values of the other n-1 channels of each pixel point select the response value of the corresponding channel of the pixel point closest to it, and each pixel point forms an n×1-dimensional response value vector, and the entire filter array forms an n×n-dimensional response value matrix. The multispectral image I x The dimension is H×W×n, that is, I x ∈R H×W×n , n is the number of filters in the multispectral filter array.
[0013] As a preferred embodiment of the above scheme, step S3 comprises the following steps:
[0014] S31: Calculate the illuminant filter mapping and conversion vector under unknown light source and reference light source
[0015]
[0016] Among them, F x ∈R 1×n and F c ∈R 1×n Respectively represent the illuminant filter mapping under the unknown light source and the reference light source, T is the transposition symbol, . / represents the division of the corresponding elements of the vector, r∈R 1×n represents the transformation vector, L x ∈R m×1 and L c ∈R m×1 are the spectral power distributions of the unknown light source and the reference light source respectively, m is the number of samples of the spectral power distribution on the wavelength, S∈R m×n is the spectral sensitivity of the multispectral filter array;
[0017] S32: multispectral image I x Convert to multispectral matrix I x1 ;
[0018] S33: multispectral matrix I x1 Switching from an unknown light source to a reference light source
[0019]
[0020] Among them, r d ∈R n×n Represents the diagonal matrix of the conversion vector r, diag() means converting the vector into a diagonal matrix, I c ∈R p×n is the multi-spectral matrix under the reference light source after conversion.
[0021] As a preferred embodiment of the above scheme, in step S4, the chromaticity characterization and spectral characterization models are:
[0022]
[0023] Where Q∈R k×n is the multi-channel response value of the training sample, each row represents a sample, each column represents the response value of a channel, and the superscript + represents the pseudo-inverse of the matrix. u ∈R n×q is the chromaticity conversion matrix, M v ∈R n×m is the spectral transformation matrix, U∈R k×q is the chromaticity value of the training sample obtained under the reference light source, k is the number of training samples, q is the dimension of the chromaticity value, V∈R k×m To obtain the spectral reflectance of the training sample under the reference light source, m is the number of samples of the spectral reflectance at the wavelength, which is the same as the number of samples of the spectral power distribution at the wavelength.
[0024] As a preferred embodiment of the above scheme, step S5 comprises the following steps:
[0025] S51: Using the chromaticity characterization model M u and spectral characterization model M v And converted to the multi-spectral matrix I under the reference light source c Get chromaticity and spectral image matrices
[0026]
[0027] Among them, I u ∈R p×q is the chromaticity image matrix of the scene, each row represents a pixel, and each column represents a dimension of the chromaticity value. v ∈R p×m is the spectral image matrix of the scene, each row represents a pixel, and each column represents the spectral reflectance at the corresponding sampling wavelength;
[0028] S52: I u and I v The dimensions are transformed into H×W×q and H×W×m, that is, I u ∈RH×W×q , I v ∈R H×W×m , and obtain the final chromaticity image and spectral image of the scene.
[0029] As a preferred embodiment of the above scheme, in step S32, the multispectral image I x The dimension is converted from H×W×n to q×n, q=H×W, and the multispectral matrix I is obtained x1 ∈R q×n .
[0030] The advantages of the present invention are that the acquisition accuracy of scene chromaticity and spectral images under unknown light sources can be improved, and the effective application of multi-spectral imaging technology in unknown light environments can be promoted. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A schematic flow chart of a method for obtaining high-precision chromaticity and spectral images in an embodiment.
[0032] Figure 2 Schematic diagram of the effect of the de-mosaicing algorithm in the embodiment.
[0033] Figure 3 The figure is a flow chart of converting a multispectral image under an unknown light source to a multispectral image under a reference light source in an embodiment. DETAILED DESCRIPTION
[0034] The technical solution of the present invention is further described below through embodiments and in conjunction with the accompanying drawings.
[0035] Example:
[0036] This embodiment provides a method for obtaining high-precision chromaticity and spectral images, such as Figure 1 As shown, the following steps are included:
[0037] S1: This embodiment takes a multispectral color filter array containing 8 channels as an example. The spectral sensitivity of the 8 channels of the multispectral color filter array is Gaussian, the peak half-width is about 20nm, and the peak response wavelengths are 420nm, 460nm, 500nm, 540nm, 580nm, 620nm, 660nm, and 700nm. The 96 color blocks in the X-Rite ColorChecker Digital SG color card are used as training samples, and the black, white, and gray blocks that are repeated around the color card are discarded. Based on the multispectral color filter array, a multispectral image of a scene under an unknown light source is instantaneously collected. x ∈R 512×512×1 , 512 and 512 are the height and width of the image respectively. The number of filters in the multispectral filter array is 8, so a multispectral image with 8 channels is formed. The multispectral image I xThe dimension is 512 × 512 × 1. At this time, each pixel contains only one channel of sensor response value, and the entire filter array forms an 8 × 1 dimensional response value vector.
[0038] S2: Use the multispectral demosaicing algorithm to restore the full channel response value; taking the nearest neighbor interpolation algorithm as an example, the sensor response value of the other 7 channels of each pixel point selects the response value of the corresponding channel of the nearest adjacent pixel point, such as Figure 2 As shown, at this time, each pixel forms an 8×1 dimensional response value vector, and the entire filter array forms an 8×8 dimensional response value matrix. The multispectral image I x The dimension is 512×512×8, that is, I x ∈R 512×512×8 .
[0039] S3: Use spectral adaptation algorithm to transform the multispectral image I under unknown light source x Switch to the reference light source; the specific steps are as follows Figure 3 As shown, the following steps are included:
[0040] S31: Calculate the illuminant filter mapping and conversion vector under unknown light source and reference light source
[0041]
[0042] Among them, F x ∈R 1×8 and F c ∈R 1×8 Respectively represent the illuminant filter mapping under the unknown light source and the reference light source, T is the transposition symbol, . / represents the division of the corresponding elements of the vector, r∈R 1×8 represents the transformation vector, L x ∈R 31×1 and L c ∈R 31×1 are the spectral power distributions of the unknown light source and the reference light source respectively, 31 is the number of samples of the spectral power distribution on the wavelength, S∈R 31×8 is the spectral sensitivity of the multispectral filter array;
[0043] S32: multispectral image I x Convert to multispectral matrix I x1 Specifically, the multispectral image I x The dimension is converted from 512×512×8 to 262144×8, 262144=512×512, and the multispectral matrix I is obtained. x1 ∈R 262144×8 At this time, the multispectral image matrix I x Each row represents a pixel, and each column represents the response value of a channel;
[0044] S33: multispectral matrix I x1 Switching from an unknown light source to a reference light source
[0045]
[0046] Among them, r d ∈R 8×8 Represents the diagonal matrix of the conversion vector r, diag() means converting the vector into a diagonal matrix, I c ∈R 262144×8 is the multi-spectral matrix under the reference light source after conversion.
[0047] S4: Establish chromaticity characterization and spectral characterization models based on multispectral filter array under reference light source respectively; Based on multispectral filter array, obtain the chromaticity value U∈R of training sample under reference light source 96×3 , the chromaticity value is CIEXYZ tristimulus value, 96 is the number of training samples, and 3 is the dimension of the chromaticity value. The spectral reflectance V∈R of the training sample is obtained under the reference light source 96×31 , where 31 is the number of samples of spectral reflectance at wavelength, and the same is the number of samples of spectral power distribution at wavelength. Taking the pseudo-inverse method as an example, the chromaticity characterization and spectral characterization models are established using the pseudo-inverse method.
[0048]
[0049] Where Q∈R 96×8 is the multi-channel response value of the training sample, each row represents a sample, each column represents the response value of a channel, and the superscript + represents the pseudo-inverse of the matrix. u ∈R 8×3 is the chromaticity conversion matrix, M v ∈R 8×31 is the spectral transformation matrix.
[0050] S5: Calculate the chromaticity and spectral images under the reference light source. Specifically, it includes the following steps:
[0051] Using the chromaticity characterization model M u and spectral characterization model M v And converted to the multi-spectral matrix I under the reference light source c Get chromaticity and spectral image matrices
[0052]
[0053] Among them, I u ∈R 262144×3 is the chromaticity image matrix of the scene, each row represents a pixel, and each column represents a dimension of the chromaticity value. v ∈R 262144×31is the spectral image matrix of the scene, each row represents a pixel, and each column represents the spectral reflectance at the corresponding sampling wavelength;
[0054] S52: I u and I v The dimensions are transformed into 512×512×3 and 512×512×31, that is, I u ∈R 512×512×3 , I v ∈R 512×512×31 , and obtain the final chromaticity image and spectral image of the scene.
[0055] After spectral adaptation, the obtained image is closer to the original image. After calculation, for the obtained chromaticity image, the average color difference (the average color difference of all pixels) without spectral adaptation is 16.71ΔE 00 (CIEDE2000 color difference unit), and the average color difference after spectral adaptation transformation is 2.41ΔE 00 For the obtained spectral image, the average spectral difference (the average of all pixel spectral differences) before spectral adaptation transformation is 0.1178RMSE (Root Mean Square Error), while the average spectral difference after spectral adaptation transformation is 0.0411RMSE. It can be seen that after spectral adaptation transformation, the errors of the obtained chromaticity image and spectral image are significantly reduced, thereby improving the acquisition accuracy of chromaticity and spectral images.
[0056] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A method for obtaining high-precision chromaticity and spectral images, characterized by: The following steps are involved: S1: Instantaneous acquisition of multispectral images of scenes under unknown light sources based on multispectral filter arrays I x ∈R H×W×1 , H and W are the height and width of the image respectively; S2: Use the multispectral demosaicing algorithm to restore the full channel response value; S3: Use spectral adaptation algorithm to transform the multispectral image I under unknown light source x Switch to reference light source; S4: Establishing chromaticity characterization and spectral characterization models based on a multi-spectral color filter array under a reference light source, respectively, wherein the chromaticity characterization and spectral characterization models are: Where Q∈R k×n is the multi-channel response value of the training sample, each row represents a sample, each column represents the response value of a channel, and the superscript + represents the pseudo-inverse of the matrix. u ∈R n×q is the chromaticity conversion matrix, M v ∈r n×m is the spectral transformation matrix, U∈r k×q is the chromaticity value of the training sample obtained under the reference light source, k is the number of training samples, q is the dimension of the chromaticity value, V∈R k ×m is the spectral reflectance of the training sample obtained under the reference light source, m is the number of samples of the spectral reflectance at the wavelength, and the same is the number of samples of the spectral power distribution at the wavelength; S5: Calculate the chromaticity and spectral images under the reference light source.
2. The method for obtaining high-precision chromaticity and spectral images according to claim 1, characterized in that: In step S2, the sensor response values of the other n-1 channels of each pixel point select the response value of the corresponding channel of the pixel point closest to it, and each pixel point forms an n×1-dimensional response value vector, and the entire filter array forms an n×n-dimensional response value matrix. The multispectral image I x The dimension is H×W×n, that is, I x ∈R H×W×n , n is the number of filters in the multispectral filter array.
3. The method for obtaining high-precision chromaticity and spectral images according to claim 1, characterized in that: The step S3 comprises the following steps: S31: Calculate the illuminant filter mapping and conversion vector under unknown light source and reference light source Among them, F x ∈R 1×n and F c ∈R 1×n Respectively represent the illuminant filter mapping under the unknown light source and the reference light source, T is the transposition symbol, . / represents the division of the corresponding elements of the vector, r∈R 1×n represents the transformation vector, L x ∈R m×1 and L c ∈R m×1 are the spectral power distributions of the unknown light source and the reference light source respectively, m is the number of samples of the spectral power distribution on the wavelength, S∈R m×n is the spectral sensitivity of the multispectral filter array; S32: multispectral image I x Convert to multispectral matrix I x1 ; S33: multispectral matrix I x1 Switching from an unknown light source to a reference light source Among them, r d ∈R n×n Represents the diagonal matrix of the conversion vector r, diag() means converting the vector into a diagonal matrix, I c ∈R p ×n is the multi-spectral matrix under the reference light source after conversion.
4. The method for obtaining high-precision chromaticity and spectral images according to claim 1, characterized in that: The step S5 comprises the following steps: S51: Using the chromaticity characterization model M u and spectral characterization model M v And converted to the multi-spectral matrix I under the reference light source c Get chromaticity and spectral image matrices Among them, I u ∈R p×q is the chromaticity image matrix of the scene, each row represents a pixel, and each column represents a dimension of the chromaticity value. v ∈R p×m is the spectral image matrix of the scene, each row represents a pixel, and each column represents the spectral reflectance at the corresponding sampling wavelength; S52: I u and I v The dimensions are transformed into H×W×q and H×W×m, that is, I u ∈R H×W×q , I v ∈R H×W×m , and obtain the final chromaticity image and spectral image of the scene.
5. The method for obtaining high-precision chromaticity and spectral images according to claim 3, characterized in that: In step S32, the multispectral image I x The dimension is converted from H×W×n to q×n, q=H×W, and the multispectral matrix I is obtained x1 ∈R q×n .
