Color reproduction test method, system and storage medium
The color card image is directly captured through the camera, and color space conversion and Euclidean distance calculation are performed, which solves the problems of high cost and poor stability of color restoration test of CMS system, realizes low-cost and stable color restoration test, and accurately evaluates color. degree of restoration.
Patent Information
- Application Number
- CN202410282690.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-03-12
AI Technical Summary
The existing CMS system color restoration test solution has the problems of high test cost and poor stability. It cannot effectively locate the impact of image quality and screen effect, which increases the debugging cost between manufacturers.
Capture the color card image through the test camera, perform RGB value conversion processing, convert to XYZ and Luv color spaces, calculate the Euclidean distance between the color block and white, output the color restoration degree, simplify the test process, and reduce hardware requirements. Improve stability.
It achieves low-cost and stable color reproduction testing, reduces dependence on monitor stability, accurately evaluates the degree of color reproduction, reduces testing costs, and improves testing stability.
Smart Images

Figure CN118175282B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a color reproduction test method, a color reproduction test system and a storage medium. Background Art
[0002] The vehicle-mounted CMS system is an electronic rearview mirror system that replaces the traditional rearview mirror, that is, it replaces the traditional glass mirror rearview mirror with electronic means. The ISO international standard calls it a camera monitoring system, namely: Camera Monitor System, which is also commonly called an electronic side mirror, electronic rearview mirror or virtual rearview mirror (CMS). It is a system composed of a camera and a monitor (the display screen of CMS). It needs to see the rear and side views of the vehicle clearly within the specified field of view. It is a new type of indirect field of view device.
[0003] In order to ensure the safety of the CMS system, the imaging effect needs to meet the corresponding requirements. Under the existing standards, there are clear indication requirements for the color reproduction of the charts reproduced by various CMS systems on the monitor. In order to ensure the safety of application, the color reproduction effect of the CMS system needs to be tested before leaving the factory or during the application process. In the existing detection method, the CMS equipment shoots the ISO 16505-Color color reproduction test card under uniform lighting environment, and then uses an imaging colorimeter to shoot the monitor screen after the image is stable to determine the degree of color reproduction.
[0004] In the existing test scheme, all test items must pass at one time before they can be included in the mandatory inspection announcement. If any item fails in the middle, it is necessary to optimize and then retest all items. The cost of one test is very high. In the process of product development, it is often necessary to conduct a basic test on the product; and for the monitor-side test, the test environment to be built has high equipment costs; the test instrument requires an imaging colorimeter and professional analysis software. In the existing scheme, the debugging of the image and the debugging of the screen will affect the final test results. It is impossible to locate whether the problem lies in the image quality or the screen effect, which increases the debugging cost between the camera manufacturer and the screen manufacturer. It can be seen that the existing test scheme has significant problems of high testing cost and poor stability. To address this problem, it is necessary to create a new color reproduction test method. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a color reproduction test method and system to at least solve the problems of high test cost and poor stability in the existing CMS system color reproduction test solution.
[0006] In order to achieve the above-mentioned purpose, the first aspect of the present invention provides a color restoration test method, the method comprising: based on a test camera, capturing image information of a test color card as a target image; determining the RGB value of the target image, and performing a conversion process on the RGB value to obtain a target image in an XYZ color space; performing a secondary conversion process on the target image in the XYZ color space to obtain a target image in a Luv color space; based on the target image in the Luv color space, calculating the Euclidean distance between each target color block and a white color block, and outputting the color restoration degree of this test based on the calculation result.
[0007] Optionally, the method of capturing the image information of the test color card based on the test camera as the target image includes: recovering the image signal of the photosensitive device of the test camera based on the ISP; identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information; performing quality verification and / or image correction on the initial image information based on the updated model to obtain the verified image information as the target image.
[0008] Optionally, the identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information, includes: extracting a test work order, and identifying camera parameter information and display parameter information of the CMS system to be tested based on the test work order; when the camera parameters match the parameters of the current test camera, rendering the image signal based on the resolution corresponding to the display parameter information to obtain a rendered image; calling a corresponding virtual interface based on the image transmission interface parameters of the CMS system to be tested, and exporting the rendered image based on the virtual interface as the initial image information.
[0009] Optionally, the quality verification and / or image correction of the initial image information is performed based on the updated model to obtain the verified image information as the target image, including: judging the exposure level of the initial image information based on the updated model, if the initial image is overexposed, terminating the test and re-capturing the image; judging the chromaticity quality of the initial image that has completed the exposure level test, if it does not meet the preset chromaticity quality, terminating the test and re-capturing the image; and using the initial image that has completed the chromaticity quality test as the target image.
[0010] Optionally, determining the RGB values of the target image and performing a conversion process on the RGB values to obtain the target image in the XYZ color space includes: performing normalization processing on the RGB values of the target image to obtain normalized values in each color channel; performing linearization processing on the normalized values in each color channel to obtain conversion values in each color channel; performing matrix operations on the conversion values in each color channel to obtain the target image in the XYZ color space.
[0011] Optionally, the processing rule for performing linearization processing on the normalized values under each color channel is:
[0012]
[0013] Among them, VarN is the conversion value under N color channels; varN is the normalized value under N color channels; X is the preset conversion constant.
[0014] Optionally, performing a secondary conversion process on the target image in the XYZ color space to obtain a target image in the Luv color space includes: determining the chromaticity coordinates of each color block corresponding to the Luv color space in turn based on the chromaticity XY coordinates and brightness values of each color block of the target image in the XYZ color space; and outputting image information containing the chromaticity coordinates of each color block as the target image in the Luv color space.
[0015] Optionally, based on the target image in the Luv color space, the Euclidean distance between each target color block and the white color block is calculated, and the color restoration degree of this test is output based on the calculation result, including: based on the target image in the Luv color space, determining the Luv color coordinates of each target color block and the color coordinates of the white color block; calculating the chromaticity angle of each target color block based on the Luv color coordinates of each target color block and the color coordinates of the white color block; calculating the Euclidean distance between the chromaticity angle of each target color block and the white color block; based on the calculation result, comparing with a preset evaluation table, outputting the color restoration degree of this test.
[0016] A second aspect of the present invention provides a color restoration test system, the system comprising: an acquisition unit, used to capture image information of a test color card based on a test camera as a target image; a processing unit, used to determine the RGB value of the target image, and perform a conversion process on the RGB value to obtain a target image in an XYZ color space; a conversion unit, used to perform a secondary conversion process on the target image in the XYZ color space to obtain a target image in a Luv color space; an output unit, used to calculate the Euclidean distance between each target color block and a white color block based on the target image in the Luv color space, and output the color restoration degree of this test based on the calculation result.
[0017] On the other hand, the present invention provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned color reproduction test method.
[0018] Through the above technical solution, the solution of the present invention directly captures the image and processes the captured image without the need for secondary image acquisition through the monitor, thereby avoiding dependence on the stability of the monitor, reducing hardware requirements, and thus reducing testing costs. On the other hand, because the intermediate steps are reduced, the corresponding test stability is also improved. By performing color space conversion on the captured image, the data of the target image in the Luv color space can be obtained, thereby obtaining the Euclidean distance between each color block and the white color block, and comparing the preset distance of the color card itself, the degree of color restoration can be accurately obtained.
[0019] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0021] Figure 1 is a flowchart of the steps of a color reproduction test method provided by one embodiment of the present invention;
[0022] Figure 2 is a flow chart of a color reproduction test method provided by an embodiment of the present invention;
[0023] Figure 3 It is a system structure diagram of a color reproduction test system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0025] Figure 1 1 is a flow chart of a color reproduction test method provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a color reproduction test method, the method comprising:
[0026] Step S10: Capture image information of the test color card based on the test camera as the target image.
[0027] Specifically, in the existing solution, it is necessary to display the image on the monitor and then shoot the monitor screen to determine the degree of color reproduction. The corresponding test accuracy not only depends on the color reproduction effect of the display, but also needs to verify the shooting effect of the camera for the second shot. In addition to the hardware performance of the camera itself meeting the requirements, the corresponding shooting environment must also be guaranteed to be absolutely in line with the design. Any accidental error may be identified as an error in the degree of color reproduction, resulting in inaccurate test results.
[0028] In the embodiment of the present invention, the scheme of the present invention does not need a monitor and a secondary shooting camera, directly captures the color card information collected by the camera of the system to be tested, performs corresponding image processing on the captured image, and converts the collected original image to the color space to be tested, thereby realizing the detection of the degree of color restoration. This method does not need to consider the color rendering authority of the monitor, and only needs to ensure the environmental requirements of the primary image acquisition. There is no need to guarantee the camera and acquisition environment for the secondary image acquisition.
[0029] Specifically, the method of capturing the image information of the test color card based on the test camera as the target image includes: recovering the image signal of the photosensitive device of the test camera based on the ISP; identifying the basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information; performing quality verification and / or image correction on the initial image information based on the updated model to obtain the verified image information as the target image.
[0030] In an embodiment of the present invention, the scheme of the present invention is based on the image signal of the photosensitive device of the ISP recovery test camera, and the corresponding target image rendering is performed based on the image signal to obtain a virtual image. The virtual image does not need to be transmitted to the real end for processing, but is directly transmitted to the back end as a digital signal for image processing. In the existing color restoration degree monitoring schemes, it is necessary to calculate the Euclidean distance between each colored color block and the white color block, and evaluate the restoration degree of each color block by the Euclidean distance. Based on this, the scheme of the present invention also needs to identify each color block separately, and calculate the Euclidean distance between each color block and the white color block, but all these steps are performed based on the collected data signal.
[0031] Preferably, the identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information, includes: extracting a test work order, and identifying the camera parameter information and display parameter information of the CMS system to be tested based on the test work order; when the camera parameters match the parameters of the current test camera, rendering the image signal based on the resolution corresponding to the display parameter information to obtain a rendered image; calling the corresponding virtual interface based on the image transmission interface parameters of the CMS system to be tested, and exporting the rendered image based on the virtual interface as the initial image information.
[0032] In the embodiment of the present invention, under the background of the prior art, there are a variety of image transmission schemes, and different image transmission interfaces have different effects on the quality of image transmission. Different car companies may use different image transmission interfaces when building CMS systems, so even with the same hardware parameters, the corresponding image color restoration effects may be different. In the existing scheme, of course, the interface type of the monitor can be adjusted based on the actual test object to ensure that the test effect must match the interface type of the target system, so as to ensure that the test results are in line with reality. However, in the scheme of the present invention, it is thought that there is no corresponding display device, and it is impossible to match the actual situation by changing the interface type of the display. In order to ensure that the test results of the scheme of the present invention are in line with reality, the scheme of the present invention is provided with a corresponding interface simulation layer in the image rendering, and the interface type of the test system is identified, and the corresponding virtual interface is selected for image rendering, so that the obtained data signal is the data information after transmission through the simulation interface, so as to realize the simulation of the transmitted data and ensure the accuracy of the subsequent color restoration degree detection.
[0033] Preferably, the quality verification and / or image correction of the initial image information based on the updated model is performed to obtain the verified image information as the target image, including: judging the exposure level of the initial image information based on the updated model, if the initial image is overexposed, terminating the test and re-capturing the image; judging the chromaticity quality of the initial image that has completed the exposure level test, if it does not meet the preset chromaticity quality, terminating the test and re-capturing the image; and using the initial image that has completed the chromaticity quality test as the target image.
[0034] In an embodiment of the present invention, even if the shooting environment is limited, it is still impossible to avoid abnormal shooting problems caused by equipment failure or sudden environmental changes during image acquisition. In an automatic test scenario, if the image signal of such abnormal shooting is directly processed, an erroneous test result that deviates from the actual situation will inevitably be obtained. In order to avoid this situation, the scheme of the present invention proposes a corresponding image quality review scheme. The first is to judge the exposure of the image. Because the exposure degree will greatly affect the color restoration effect of the image, it is necessary to identify the exposure degree of the image through an exposure model. If there is an overexposed image, it is necessary to delete the image and re-capture the image until an image that meets the quality requirements is obtained. Furthermore, it is also necessary to verify the chromaticity value of the color block to avoid the problem of excessive chromaticity deviation caused by other situations.
[0035] In a possible implementation, when the scheme of the present invention performs chromaticity inspection, the original image is flipped and offset to ensure that the target image is in the center of the virtual scene. By identifying the coordinates and sizes of the three target color blocks on the color card (the relative positions between the three target color blocks are fixed), the image is angularly deflected to ensure that the coordinates of the three target color blocks coincide with the coordinates of the corresponding color blocks in the preset coordinate system. Then, a plurality of color blocks are randomly selected for RGB value recognition, and the recognition results are compared with the standard RGB values of the corresponding color blocks to calculate the difference between the two. If the absolute value of the difference between the two is greater than the preset difference threshold, it means that the chromaticity deviation of the image is too large and the image needs to be recaptured. Otherwise, it is determined that the image meets the test requirements and the next test can be performed.
[0036] Step S20: Determine the RGB values of the target image, and perform a conversion process on the RGB values to obtain the target image in the XYZ color space.
[0037] Specifically, the RGB values of the target image are normalized to obtain normalized values in each color channel; the normalized values in each color channel are linearized to obtain conversion values in each color channel; matrix operations are performed on the conversion values in each color channel to obtain the target image in the XYZ color space.
[0038] In the embodiment of the present invention, because the value range of the RGB color space is [0, 255], but the value range of the XYZ color space is [0, 1], to convert the image from the RGB color space to the XYZ color space, it is necessary to normalize each channel so that the corresponding RGB value is converted to a value between 0 and 1. The corresponding conversion rule is:
[0039] varR=(sR / 255)
[0040] varG=(sG / 255)
[0041] varB=(sB / 255)
[0042] Among them, varR, varG, and varB are the normalized R channel value, the normalized G channel value, and the normalized B channel value, respectively;
[0043] sR, sR, and sR are the original R channel value, the original G channel value, and the original B channel value, respectively.
[0044] Furthermore, after normalization, the normalized var_R / G / B values need to be linearized. The execution rules are as follows:
[0045]
[0046] Among them, VarN is the conversion value under N color channels; varN is the normalized value under N color channels; X is the preset conversion constant.
[0047] Furthermore, after obtaining the linear RGB value, matrix operations are performed on the value, so that the image can be converted into the XYZ color space and the corresponding coordinate value in the XYZ color space can be obtained. The calculation rule is:
[0048]
[0049] In a possible implementation, the corresponding calculation steps are:
[0050] X=var_R*0.4124+var_G*0.3576+var_B*0.1805
[0051] Y=var_R*0.2126+var_G*0.7152+var_B*0.0722
[0052] Z=var_R*0.0193+var_G*0.1192+var_B*0.9505.
[0053] Step S30: performing secondary conversion processing on the target image in the XYZ color space to obtain the target image in the Luv color space.
[0054] Specifically, Figure 2 After obtaining the target image in the XYZ color space, it can be directly converted to the target image in the Luv color space based on the XYZ color space. The conversion rule is:
[0055]
[0056]
[0057] Among them, u' and v' are the coordinate values of the color block in the Luv color space.
[0058] Step S40: Based on the target image in the Luv color space, the Euclidean distance between each target color block and the white color block is calculated, and the color restoration degree of this test is output based on the calculation result.
[0059] Specifically, based on the target image in the Luv color space, the Luv color coordinates of each target color block and the color coordinates of the white color block are determined; based on the Luv color coordinates of each target color block and the color coordinates of the white color block, the chromaticity angle of each target color block is calculated respectively; the Euclidean distance between the chromaticity angle of each target color block and the white color block is calculated; based on the calculation results, the color restoration degree of this test is outputted in comparison with a preset evaluation table.
[0060] In a possible implementation, the color coordinates (u′, v′) of the red, green, blue, yellow, and white blocks on the monitor are measured based on an imaging colorimeter, where the color coordinates of the red, green, blue, and yellow blocks are (u′ it , v′ it ), the color coordinates of the white block are (u′ r , v′ r ).
[0061] Compute the chromaticity angles of red, green, blue, yellow, and white blocks:
[0062] when(u′ it -u′ r )≥0 and (v′ it -v′ r )≥0, chromaticity angle
[0063] when(u′ it -u′ r )<0 and (v′ it -v′ r )≥0, chromaticity angle
[0064] when(u′ it -u′ r )<0 and (v′ it -v′ r )<0, chromaticity angle
[0065] when(u′ it -u′ r )≥0 and (v′ it -v′ r )<0, chromaticity angle Calculate the Euclidean distance between the red, green, blue, yellow blocks and the white block:
[0066]
[0067] Compliance determination:
[0068] a) The red coordinate value range should not exceed [0°, 44.8°] or [332.2°, 360°];
[0069] b) The green coordinate value range should not exceed [96.6°, 179.9°]
[0070] c) The blue coordinate value range should not exceed [209.9°, 302.2°];
[0071] d) The yellow coordinate value range should not exceed [44.8°, 96.6°]
[0072] e) The distance between each color block (red, green, blue, yellow) and white should be no less than 0.02.
[0073] In the embodiment of the present invention, the solution of the present invention is to solve the current situation that the instruments required for the existing CMS color restoration test are expensive and the test cost is high, thereby providing a low-cost test method for the national standard color restoration items of the CMS rearview mirror, and its accuracy can be almost the same as the value measured by using a professional imaging colorimeter. It can be used for image tuning and investigation of cameras in the CMS system, saving a lot of test costs, and improving the quality of the CMS system and driving safety. Generally, we define whether the color restoration is accurate by checking how much the color blocks in the image differ from the set standard values in the color space within a certain color space. The color space includes: RGB color space, XYZ color space, and Luv color space; the color models used are different, and their essence is to use different dimensions to define the color in a certain two-dimensional / three-dimensional space. The solution of the present invention converts the RGB color space of the captured image to the Luv color space, so as to identify the Luv color space coordinates of each color block and the Euclidean distance between the white color block.
[0074] In the embodiment of the present invention, the testing method of the present invention does not need to be displayed on the display screen, nor does it need to use an imaging colorimeter to measure the data on the monitor; the testing method can directly simulate the analysis results of the imaging colorimeter measuring the monitor and professional software through the pictures taken by the camera, thus saving a lot of testing costs.
[0075] In one possible implementation, the same vehicle may have diverse usage requirements in different application scenarios. For example, vehicles in some special application scenarios may have different corresponding test requirements. In order to cope with such differences, the solution of the present invention can simulate application scenarios based on actual scenarios by adjusting ISP parameters. For a vehicle with possible usage scenarios and user-defined test requirements, the ISP parameters can be adjusted one by one for automatic testing to obtain test results under each ISP parameter. Furthermore, the ISP parameters can be adaptively adjusted based on the demand scenario to obtain the ISP parameters with the highest degree of color restoration in the corresponding demand scenario, and then work backwards to meet the design requirements.
[0076] Figure 3 FIG. 1 is a system structure diagram of a color reproduction test system provided by an embodiment of the present invention. Figure 3 As shown, an embodiment of the present invention provides a color reproduction test system, the system comprising:
[0077] The acquisition unit is used to capture the image information of the test color card based on the test camera as the target image.
[0078] Specifically, in the existing solution, it is necessary to display the image on the monitor and then shoot the monitor screen to determine the degree of color restoration. The corresponding test accuracy in real time not only depends on the color restoration effect of the monitor, but also needs to verify the shooting effect of the camera for the second shooting. In addition to the hardware performance of the camera itself meeting the requirements, the corresponding shooting environment must also be guaranteed to be absolutely in line with the design. Any accidental error may be identified as an error in the degree of color restoration, resulting in inaccurate test results.
[0079] In the embodiment of the present invention, the scheme of the present invention does not need a monitor and a secondary shooting camera, directly captures the color card information collected by the camera of the system to be tested, performs corresponding image processing on the captured image, and converts the collected original image to the color space to be tested, thereby realizing the detection of the degree of color restoration. This method does not need to consider the color rendering authority of the monitor, and only needs to ensure the environmental requirements of the primary image acquisition. There is no need to guarantee the camera and acquisition environment for the secondary image acquisition.
[0080] Specifically, the method of capturing the image information of the test color card based on the test camera as the target image includes: recovering the image signal of the photosensitive device of the test camera based on the ISP; identifying the basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information; performing quality verification and / or image correction on the initial image information based on the updated model to obtain the verified image information as the target image.
[0081] In an embodiment of the present invention, the scheme of the present invention is based on the image signal of the photosensitive device of the ISP recovery test camera, and the corresponding target image rendering is performed based on the image signal to obtain a virtual image. The virtual image does not need to be transmitted to the real end for processing, but is directly transmitted to the back end as a digital signal for image processing. In the existing color restoration degree monitoring schemes, it is necessary to calculate the Euclidean distance between each colored color block and the white color block, and evaluate the restoration degree of each color block by the Euclidean distance. Based on this, the scheme of the present invention also needs to identify each color block separately, and calculate the Euclidean distance between each color block and the white color block, but all these steps are performed based on the collected data signal.
[0082] Preferably, the identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information, includes: extracting a test work order, and identifying the camera parameter information and display parameter information of the CMS system to be tested based on the test work order; when the camera parameters match the parameters of the current test camera, rendering the image signal based on the resolution corresponding to the display parameter information to obtain a rendered image; calling the corresponding virtual interface based on the image transmission interface parameters of the CMS system to be tested, and exporting the rendered image based on the virtual interface as the initial image information.
[0083] In the embodiment of the present invention, under the background of the prior art, there are a variety of image transmission schemes, and different image transmission interfaces have different effects on the quality of image transmission. Different car companies may use different image transmission interfaces when building CMS systems, so even with the same hardware parameters, the corresponding image color restoration effects may be different. In the existing scheme, of course, the interface type of the monitor can be adjusted based on the actual test object to ensure that the test effect must match the interface type of the target system, so as to ensure that the test results are in line with reality. However, in the scheme of the present invention, it is thought that there is no corresponding display device, and it is impossible to match the actual situation by changing the interface type of the display. In order to ensure that the test results of the scheme of the present invention are in line with reality, the scheme of the present invention is provided with a corresponding interface simulation layer in the image rendering, and the interface type of the test system is identified, and the corresponding virtual interface is selected for image rendering, so that the obtained data signal is the data information after transmission through the simulation interface, so as to realize the simulation of the transmitted data and ensure the accuracy of the subsequent color restoration degree detection.
[0084] Preferably, the quality verification and / or image correction of the initial image information based on the updated model is performed to obtain the verified image information as the target image, including: judging the exposure level of the initial image information based on the updated model, if the initial image is overexposed, terminating the test and re-capturing the image; judging the chromaticity quality of the initial image that has completed the exposure level test, if it does not meet the preset chromaticity quality, terminating the test and re-capturing the image; and using the initial image that has completed the chromaticity quality test as the target image.
[0085] In an embodiment of the present invention, even if the shooting environment is limited, it is still impossible to avoid abnormal shooting problems caused by equipment failure or sudden environmental changes during image acquisition. In an automatic test scenario, if the image signal of such abnormal shooting is directly processed, an erroneous test result that deviates from the actual situation will inevitably be obtained. In order to avoid this situation, the scheme of the present invention proposes a corresponding image quality review scheme. The first is to judge the exposure of the image. Because the exposure degree will greatly affect the color restoration effect of the image, it is necessary to identify the exposure degree of the image through an exposure model. If there is an overexposed image, it is necessary to delete the image and re-capture the image until an image that meets the quality requirements is obtained. Furthermore, it is also necessary to verify the chromaticity value of the color block to avoid the problem of excessive chromaticity deviation caused by other situations.
[0086] In a possible implementation, when the scheme of the present invention performs chromaticity inspection, the original image is flipped and offset to ensure that the target image is in the center of the virtual scene. By identifying the coordinates and sizes of the three target color blocks on the color card (the relative positions between the three target color blocks are fixed), the image is angularly deflected to ensure that the coordinates of the three target color blocks coincide with the coordinates of the corresponding color blocks in the preset coordinate system. Then, a plurality of color blocks are randomly selected for RGB value recognition, and the recognition results are compared with the standard RGB values of the corresponding color blocks to calculate the difference between the two. If the absolute value of the difference between the two is greater than the preset difference threshold, it means that the chromaticity deviation of the image is too large and the image needs to be recaptured. Otherwise, it is determined that the image meets the test requirements and the next test can be performed.
[0087] The processing unit is used to determine the RGB value of the target image and perform a conversion process on the RGB value to obtain the target image in the XYZ color space.
[0088] Specifically, the RGB values of the target image are normalized to obtain normalized values in each color channel; the normalized values in each color channel are linearized to obtain conversion values in each color channel; matrix operations are performed on the conversion values in each color channel to obtain the target image in the XYZ color space.
[0089] In the embodiment of the present invention, because the value range of the RGB color space is [0, 255], but the value range of the XYZ color space is [0, 1], to convert the image from the RGB color space to the XYZ color space, it is necessary to normalize each channel so that the corresponding RGB value is converted to a value between 0 and 1. The corresponding conversion rule is:
[0090] varR=(sR / 255)
[0091] varG=(sG / 255)
[0092] varB=(sB / 255)
[0093] Among them, varR, varG, and varB are the normalized R channel value, the normalized G channel value, and the normalized B channel value, respectively;
[0094] sR, sR, and sR are the original R channel value, the original G channel value, and the original B channel value, respectively.
[0095] Furthermore, after normalization, the normalized var_R / G / B values need to be linearized. The execution rules are as follows:
[0096]
[0097] Among them, VarN is the conversion value under N color channels; varN is the normalized value under N color channels; X is the preset conversion constant.
[0098] Furthermore, after obtaining the linear RGB value, matrix operations are performed on the value, so that the image can be converted into the XYZ color space and the corresponding coordinate value in the XYZ color space can be obtained. The calculation rule is:
[0099]
[0100] In a possible implementation, the corresponding calculation steps are:
[0101] X=var_R*0.4124+var_G*0.3576+var_B*0.1805
[0102] Y=var_R*0.2126+var_G*0.7152+var_B*0.0722
[0103] Z=var_R*0.0193+var_G*0.1192+var_B*0.9505.
[0104] The conversion unit is used to perform secondary conversion processing on the target image in the XYZ color space to obtain the target image in the Luv color space.
[0105] Specifically, after obtaining the target image in the XYZ color space, it can be directly converted to the target image in the Luv color space based on the XYZ color space. The conversion rule is:
[0106]
[0107]
[0108] Among them, u' and v' are the coordinate values of the color block in the Luv color space.
[0109] The output unit is used to calculate the Euclidean distance between each target color block and the white color block based on the target image in the Luv color space, and output the color restoration degree of this test based on the calculation result.
[0110] Specifically, based on the target image in the Luv color space, the Luv color coordinates of each target color block and the color coordinates of the white color block are determined; based on the Luv color coordinates of each target color block and the color coordinates of the white color block, the chromaticity angle of each target color block is calculated respectively; the Euclidean distance between the chromaticity angle of each target color block and the white color block is calculated; based on the calculation results, the color restoration degree of this test is outputted in comparison with a preset evaluation table.
[0111] In a possible implementation, the color coordinates (u′, v′) of the red, green, blue, yellow, and white blocks on the monitor are measured based on an imaging colorimeter, where the color coordinates of the red, green, blue, and yellow blocks are (u′ it , v′ it ), the color coordinates of the white block are (u′ r , v′ r ).
[0112] Compute the chromaticity angles of red, green, blue, yellow, and white blocks:
[0113] when(u′ it -u′ r )≥0 and (v′ it -v′ r )≥0, chromaticity angle
[0114] when(u′ it -u′ r )<0 and (v′ it -v′ r )≥0, chromaticity angle
[0115] when(u′it -u′ r )<0 and (v′ it -v′ r )<0, chromaticity angle
[0116] when(u′ it -u′ r )≥0 and (v′ it -v′ r )<0, chromaticity angle
[0117] Calculate the Euclidean distance between the red, green, blue, yellow blocks and the white block:
[0118]
[0119] Compliance determination:
[0120] a) The red coordinate value range should not exceed [0°, 44.8°] or [332.2°, 360°];
[0121] b) The green coordinate value range should not exceed [96.6°, 179.9°]
[0122] c) The blue coordinate value range should not exceed [209.9°, 302.2°];
[0123] d) The yellow coordinate value range should not exceed [44.8°, 96.6°]
[0124] e) The distance between each color block (red, green, blue, yellow) and white should be no less than 0.02.
[0125] The embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned color reproduction test system.
[0126] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions for making a single-chip microcomputer, a chip or a processor (processor) perform all or part of the steps of the method described in each embodiment of the present invention. 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 codes.
[0127] The optional embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept of the embodiments of the present invention, the technical scheme of the embodiments of the present invention can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.
[0128] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in the embodiments of the present invention.
Claims
1. A color reproduction test method, characterized in that: The method comprises: The image information of the test color card is captured by the test camera as the target image, including: Image signals of the camera's photosensitive device are recovered based on ISP testing; Identify basic parameter information of the CMS system to be tested, and render the image signal based on the basic parameter information to obtain initial image information; Based on the updated model, the initial image information is subjected to quality verification and / or image correction to obtain the verified image information as the target image; wherein, The identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information, includes: Extracting a test work order, and identifying camera parameter information and display parameter information of the CMS system to be tested based on the test work order; When the camera parameters match the parameters of the current test camera, rendering the image signal based on the resolution corresponding to the display screen parameter information to obtain a rendered image; Calling a corresponding virtual interface based on the image transmission interface parameters of the CMS system to be tested, and exporting the rendered image based on the virtual interface as initial image information; Determine the RGB value of the target image, and perform a conversion process on the RGB value to obtain the target image in the XYZ color space; Perform secondary conversion processing on the target image in the XYZ color space to obtain the target image in the Luv color space; Based on the target image in the Luv color space, the Euclidean distance between each target color block and the white color block is calculated, and the color restoration degree of this test is output based on the calculation result.
2. The method according to claim 1, characterized in that The performing quality verification and / or image correction on the initial image information based on the updated model to obtain the verified image information as the target image includes: The exposure degree of the initial image information is judged based on the updated model. If the initial image is overexposed, the test is terminated and the image is collected again. The chromaticity quality of the initial image that has completed the exposure level test is judged. If it does not meet the preset chromaticity quality, the test is terminated and the image is recaptured; The initial image that has completed the color quality inspection is used as the target image.
3. The method according to claim 1, characterized in that The step of determining the RGB value of the target image and performing a conversion process on the RGB value to obtain the target image in an XYZ color space includes: Performing normalization processing on the RGB values of the target image to obtain normalized values under each color channel; Perform linearization processing on the normalized values under each color channel to obtain the conversion value under each color channel; Perform matrix operations on the conversion values under each color channel to obtain the target image in the XYZ color space.
4. The method according to claim 3, characterized in that The processing rule for performing linearization processing on the normalized values under each color channel is: Among them, VarN is the conversion value under N color channels; varN is the normalized value under N color channels; X is the default conversion constant.
5. The method according to claim 1, characterized in that The performing secondary conversion processing on the target image in the XYZ color space to obtain the target image in the Luv color space includes: Based on the chromaticity XY coordinates and brightness values of each color block of the target image in the XYZ color space, the chromaticity coordinates of each color block corresponding to the Luv color space are determined in turn; The image information including the chromaticity coordinates of each color block is output as the target image in the Luv color space.
6. The method according to claim 1, characterized in that The target image in the Luv color space is used to calculate the Euclidean distance between each target color block and the white color block, and the color restoration degree of this test is output based on the calculation result, including: Based on the target image in the Luv color space, determine the Luv color coordinates of each target color block and the color coordinates of the white color block; Calculate the chromaticity angle of each target color block based on the Luv color coordinates of each target color block and the color coordinates of the white color block; Calculate the Euclidean distance between the chromaticity angle of each target color block and the white color block; Based on the calculation results, the color reproduction degree of this test is output in comparison with the preset evaluation table.
7. A color reproduction test system, characterized in that: The system comprises: The acquisition unit is used to capture the image information of the test color card based on the test camera as the target image, including: Image signals of the camera's photosensitive device are recovered based on ISP testing; Identify basic parameter information of the CMS system to be tested, and render the image signal based on the basic parameter information to obtain initial image information; Based on the updated model, the initial image information is subjected to quality verification and / or image correction to obtain the verified image information as the target image; wherein, The identifying basic parameter information of the CMS system to be tested, and rendering the image signal based on the basic parameter information to obtain initial image information, includes: Extracting a test work order, and identifying camera parameter information and display parameter information of the CMS system to be tested based on the test work order; When the camera parameters match the parameters of the current test camera, rendering the image signal based on the resolution corresponding to the display screen parameter information to obtain a rendered image; Calling a corresponding virtual interface based on the image transmission interface parameters of the CMS system to be tested, and exporting the rendered image based on the virtual interface as initial image information; A processing unit, used to determine the RGB value of the target image, and perform a conversion process on the RGB value to obtain the target image in an XYZ color space; A conversion unit, configured to perform a secondary conversion process on the target image in the XYZ color space to obtain a target image in the Luv color space; The output unit is used to calculate the Euclidean distance between each target color block and the white color block based on the target image in the Luv color space, and output the color restoration degree of this test based on the calculation result.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the color reproduction test method described in any one of claims 1 to 6.
