Method for detecting color uniformity and related apparatus

By automating region division and colorimetric analysis, the problem of low efficiency and accuracy in camera imaging color uniformity detection has been solved, achieving efficient and accurate color uniformity detection and reducing manpower consumption and product defect rate.

CN117173081BActive Publication Date: 2026-05-12HUIZHOU TCL MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIZHOU TCL MOBILE COMM CO LTD
Filing Date
2022-07-06
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, color uniformity detection in camera imaging relies on subjective visual evaluation by humans, which leads to low efficiency, low accuracy, and is prone to individual visual differences, making it difficult to accurately assess color uniformity issues in mobile phone photos.

Method used

By acquiring a target image and dividing it into regions, calculating the color index and chromaticity value of the region image, and combining the region color difference index and chromaticity deviation information, the color uniformity of the camera is automatically detected, providing a color uniformity detection method and device.

Benefits of technology

It improves the efficiency and accuracy of camera imaging color uniformity detection, reduces manpower consumption, lowers product defect rate, and improves the work efficiency of production line and image debugging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173081B_ABST
    Figure CN117173081B_ABST
Patent Text Reader

Abstract

The application discloses a color uniformity detection method and related equipment; a target image can be regionally divided to obtain at least one region image; a color index corresponding to the region image is calculated based on pixel values of pixel points in at least one color channel in the region image; difference analysis is performed on the color index corresponding to each region image to obtain a region color difference index of the target image; chroma values corresponding to each color block in the target image are obtained, and chroma deviation information of the target image is obtained based on the chroma values of each color block; and color uniformity of the target image is detected according to the region color difference index and the chroma deviation information to obtain a color uniformity detection result of the target image. The application can combine the region color difference index and the chroma deviation information to detect the color uniformity of the target image, and is beneficial to improving the detection efficiency and accuracy of the color uniformity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method for detecting color uniformity and related equipment. Background Technology

[0002] Color uniformity in camera imaging is an important indicator for evaluating the image quality of a mobile phone camera. Color non-uniformity, also known as color shading, often manifests as a reddish center in photos and dark corners when taking pictures with a mobile phone camera. This is due to the limitations of space in mobile phones, which necessitates some trade-offs in the design of the optical system.

[0003] In current related technologies, the color uniformity of camera images is mainly evaluated and measured by subjective visual assessment. Specifically, images obtained by the camera from a whiteboard or gray card are taken and observed by the human eye to see if there are color differences. This method is very taxing on eyesight and can easily lead to eye fatigue. It is both time-consuming and laborious. Moreover, due to individual differences in visual perception and cognitive level, the judgment of color uniformity often varies, resulting in low efficiency and accuracy in detecting image color uniformity. Summary of the Invention

[0004] This application provides a method and related equipment for detecting color uniformity. The related equipment may include a color uniformity detection device, electronic equipment, computer-readable storage medium, and computer program product, which can improve the detection efficiency and accuracy of color uniformity.

[0005] This application provides a method for detecting color uniformity, including:

[0006] The target image to be detected is acquired, and the target image is divided into regions to obtain at least one region image corresponding to the target image;

[0007] Based on the pixel value of a pixel in at least one color channel in the regional image, calculate the color index corresponding to the regional image.

[0008] By performing a difference analysis on the color indices corresponding to the images of each region, the regional color difference indices of the target image are obtained.

[0009] Obtain the chromaticity value corresponding to each color block in the target image, and obtain the chromaticity deviation information of the target image based on the chromaticity value of each color block;

[0010] Based on the regional color difference index and the chromaticity deviation information, the color uniformity of the target image is detected to obtain the color uniformity detection result of the target image.

[0011] Accordingly, embodiments of this application provide a color uniformity detection device, including:

[0012] A segmentation unit is used to acquire a target image to be detected and to segment the target image into regions to obtain at least one region image corresponding to the target image.

[0013] The calculation unit is used to calculate the color index corresponding to the region image based on the pixel value of the pixel point in at least one color channel in the region image;

[0014] The difference analysis unit is used to perform difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image.

[0015] A chromaticity unit is used to obtain the chromaticity values ​​corresponding to each color block in the target image, and to obtain the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block;

[0016] The detection unit is used to detect the color uniformity of the target image based on the regional color difference index and the chromaticity deviation information, and obtain the color uniformity detection result of the target image.

[0017] Optionally, in some embodiments of this application, the calculation unit may include a pixel mean calculation subunit and an index calculation subunit, as follows:

[0018] The pixel mean value calculation subunit is used to perform mean value calculation on the pixel values ​​of each pixel in the region image on the color channel for each color channel, so as to obtain the pixel mean value of the region image on the color channel.

[0019] The index calculation subunit is used to calculate the color index corresponding to the region image based on the pixel mean of the region image in each color channel.

[0020] Optionally, in some embodiments of this application, the at least one region image corresponding to the target image includes a central region image and at least one edge region image;

[0021] The difference analysis unit may include a contrast calculation subunit and a determination subunit, as follows:

[0022] The contrast calculation subunit is used to perform a difference comparison calculation on the color index of the edge region image and the color index of the center region image for each edge region image, so as to obtain the color contrast between the edge region image and the center region image.

[0023] A sub-unit is defined to determine the regional color difference index of the target image based on the color contrast between each edge region image and the central region image.

[0024] Optionally, in some embodiments of this application, the chromaticity unit may include a statistical analysis subunit and a deviation analysis subunit, as follows:

[0025] The statistical analysis subunit is used to perform statistical analysis on the chromaticity values ​​of each chromaticity block to obtain chromaticity reference values;

[0026] The deviation analysis subunit is used to perform chromatic deviation analysis on each chromaticity block according to the chromaticity reference value to obtain the chromaticity deviation information of the target image.

[0027] Optionally, in some embodiments of this application, the chromaticity value includes a first chromaticity value and a second chromaticity value; the chromaticity reference value includes a first chromaticity reference value corresponding to the first chromaticity value and a second chromaticity reference value corresponding to the second chromaticity value;

[0028] Specifically, the deviation analysis subunit can be used to calculate the chromaticity deviation of the first chromaticity value of each chromaticity block according to the first chromaticity reference value to obtain the first chromaticity deviation value; calculate the chromaticity deviation of the second chromaticity value of each chromaticity block according to the second chromaticity reference value to obtain the second chromaticity deviation value; and determine the chromaticity deviation information of the target image based on the first chromaticity deviation value and the second chromaticity deviation value.

[0029] Optionally, in some embodiments of this application, the detection unit may be specifically used to determine that the target image passes the color uniformity detection when the regional color difference index is within a preset color difference range and the chromaticity deviation information is less than a preset value.

[0030] An electronic device provided in this application includes a processor and a memory. The memory stores multiple instructions, and the processor loads the instructions to execute the steps in the color uniformity detection method provided in this application.

[0031] This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps in the color uniformity detection method provided in this application.

[0032] Furthermore, this application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the color uniformity detection method provided in this application.

[0033] This application provides a color uniformity detection method and related equipment. The method involves acquiring a target image to be detected, dividing the target image into regions to obtain at least one corresponding region image; calculating a color index corresponding to the region image based on the pixel values ​​of pixels in at least one color channel; performing difference analysis on the color indices of each region image to obtain a region color difference index for the target image; acquiring the chromaticity values ​​of each color block in the target image, and obtaining chromaticity deviation information of the target image based on the chromaticity values ​​of each color block; and detecting the color uniformity of the target image based on the region color difference index and the chromaticity deviation information to obtain a color uniformity detection result for the target image. This application combines the region color difference index and chromaticity deviation information to perform color uniformity detection on the target image, which is beneficial to improving the detection efficiency and accuracy of color uniformity. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1a This is a schematic diagram of a scenario for the color uniformity detection method provided in the embodiments of this application;

[0036] Figure 1b This is a flowchart of the color uniformity detection method provided in the embodiments of this application;

[0037] Figure 1c This is an explanatory diagram of the color uniformity detection method provided in the embodiments of this application;

[0038] Figure 1d This is another illustrative diagram of the color uniformity detection method provided in the embodiments of this application;

[0039] Figure 2 This is another flowchart of the color uniformity detection method provided in the embodiments of this application;

[0040] Figure 3 This is a schematic diagram of the structure of the color uniformity detection device provided in the embodiments of this application;

[0041] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0043] This application provides a method and related equipment for detecting color uniformity. The related equipment may include a color uniformity detection device, an electronic device, a computer-readable storage medium, and a computer program product. Specifically, the color uniformity detection device may be integrated into an electronic device, which may be a terminal or a server, etc.

[0044] It is understood that the color uniformity detection method of this embodiment can be executed on a terminal, on a server, or jointly by a terminal and a server. The above examples should not be construed as limiting this application.

[0045] like Figure 1a As shown, the color uniformity detection method is performed jointly by a terminal and a server as an example. The color uniformity detection system provided in this application includes a terminal 10 and a server 11, etc.; the terminal 10 and the server 11 are connected via a network, such as a wired or wireless network, etc., wherein the color uniformity detection device can be integrated into the server.

[0046] Server 11 can be used to: receive a target image to be detected sent by terminal 10, and divide the target image into regions to obtain at least one region image corresponding to the target image; calculate the color index corresponding to the region image based on the pixel values ​​of pixels in at least one color channel in the region image; perform difference analysis on the color index corresponding to each region image to obtain the region color difference index of the target image; obtain the chromaticity value corresponding to each color block in the target image, and obtain the chromaticity deviation information of the target image based on the chromaticity value of each color block; and detect the color uniformity of the target image according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image. Server 11 can be a single server, a server cluster composed of multiple servers, or a cloud server. In the color uniformity detection method or apparatus disclosed in this application, multiple servers can form a blockchain, and the server is a node on the blockchain.

[0047] Terminal 10 can be used to: capture a target image using a camera and send the target image to be detected to server 11. Terminal 10 may include a mobile phone, smart TV, tablet computer, laptop computer, or personal computer (PC), etc. A client may also be installed on terminal 10, which may be an application client or a browser client, etc.

[0048] The step of color uniformity detection performed by the server 11 can also be performed by the terminal 10.

[0049] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0050] This embodiment will be described from the perspective of a color uniformity detection device, which can be integrated into an electronic device, such as a server or a terminal.

[0051] like Figure 1b As shown, the specific process of this color uniformity detection method can be as follows:

[0052] 101. Obtain the target image to be detected, and divide the target image into regions to obtain at least one region image corresponding to the target image.

[0053] The target image is the image whose color uniformity is to be detected. Specifically, the target image can be an image obtained by taking a picture of a white board or gray card through an image acquisition device (such as a camera).

[0054] Specifically, the target image's region images can include a central region image and edge region images. The central region image can be the area corresponding to the center of the target image, while the edge region images can be the areas corresponding to the four corners (top left, top right, bottom left, and bottom right) of the target image. The image sizes of the central and edge region images can be set according to the actual situation, such as 32*32 or 100*100. Specifically, the length and width of the central and edge region images are generally selected as 1 / 20 of the length and width of the target image.

[0055] 102. Calculate the color index corresponding to the region image based on the pixel value of the pixel in at least one color channel.

[0056] Optionally, in this embodiment, the step "calculating the color index corresponding to the region image based on the pixel values ​​of the pixels in at least one color channel of the region image" may include:

[0057] For each color channel, the average pixel value of each pixel in the region image on the color channel is calculated to obtain the average pixel value of the region image on the color channel.

[0058] The color index corresponding to the region image is calculated based on the average pixel value of the region image in each color channel.

[0059] Color channels are channels that store color information in an image. Specifically, color channels can include red (R channel), blue (B channel), and green (G channel).

[0060] In this embodiment, for each region image, the average pixel value in the red channel of the region image can be recorded as the average R value of the region image. The average R value can be obtained by averaging the pixel values ​​of each pixel in the region image in the red channel. The average pixel value in the blue channel of the region image can be recorded as the average B value of the region image. The average B value can be obtained by averaging the pixel values ​​of each pixel in the region image in the blue channel. The average pixel value in the green channel of the region image can be recorded as the average G value of the region image. The average G value can be obtained by averaging the pixel values ​​of each pixel in the region image in the green channel.

[0061] The color index of the region image can be defined according to the actual situation, and this embodiment does not impose any restrictions on it. Specifically, the color index of the region image can be obtained by performing difference calculation or division operation on the pixel mean values ​​of each color channel. For example, the color index may include average R value / average G value (denoted as R / G) and average B value / average G value (denoted as B / G).

[0062] 103. Perform a difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image.

[0063] Optionally, in this embodiment, the at least one region image corresponding to the target image includes a central region image and at least one edge region image;

[0064] The step "to perform difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image" may include:

[0065] For each edge region image, the color index of the edge region image and the color index of the center region image are compared and calculated to obtain the color contrast between the edge region image and the center region image.

[0066] Based on the color contrast between each edge region image and the central region image, the regional color difference index of the target image is determined.

[0067] In some embodiments, the color contrast between the edge region image and the center region image can be obtained by dividing the color index of the edge region image by the color index of the center region image.

[0068] Specifically, if the color index includes average R value / average G value and average B value / average G value, and the edge region image is the region corresponding to the four corners (top left, top right, bottom left, and bottom right) of the target image; then the average R value / average G value of the four regions corresponding to the four corners of the target image can be divided by the average R value / average G value of the central region to obtain the first color contrast of the four regions, and the average B value / average G value of the four regions corresponding to the four corners of the target image can be divided by the average B value / average G value of the central region to obtain the second color contrast of the four regions, and the first color contrast and the second color contrast of the four regions are determined as the color contrast between the edge region image and the central region image.

[0069] Among them, the regional color difference index of the target image can be used to characterize the color uniformity of the target image.

[0070] Specifically, the color contrast between each edge region image and the central region image can be determined as the regional color difference index of the target image. Alternatively, the maximum and minimum color contrast values ​​between each edge region image and the central region image can be taken as the regional color difference index of the target image. This embodiment does not impose any restrictions on this.

[0071] 104. Obtain the chromaticity values ​​corresponding to each color block in the target image, and obtain the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block.

[0072] In specific scenarios, judging the color uniformity of a target image solely based on regional color difference indicators can lead to inaccurate judgments. For example, in some embodiments, the color contrast between the edge region image and the center region image of an image is calculated. Specifically, the color contrast can include the R / G contrast obtained by dividing the R / G of the edge region image by the R / G of the center region image, and the B / G contrast obtained by dividing the B / G of the edge region image by the B / G of the center region image. The maximum R / G contrast of this image is 1.06, and the maximum B / G contrast is 1.03; the minimum R / G contrast is 0.94, and the minimum B / G contrast is 0.97. These four values ​​are within the preset standard range (0.9 to 1.1). However, the actual effect of this image is that the upper right corner is bluish-green, and the lower left corner is magenta. Therefore, judging color uniformity solely based on regional color difference indicators is not accurate enough. The color uniformity detection method provided in this application can also combine chromaticity deviation information for color uniformity detection, further improving the accuracy of color uniformity detection.

[0073] This can be achieved by dividing the target image into at least one color block. The division can be uniform, and this embodiment does not impose any limitations on this. For example, the target image can be divided into 15*20 small blocks, each of which can be considered a color block, resulting in a total of 300 color blocks.

[0074] Specifically, the chromaticity values ​​of a color patch can include the a and b values ​​from the Lab values ​​of a colorimeter. The a value represents the red-green value, with positive values ​​indicating a reddish tint and negative values ​​indicating a greenish tint; the b value represents the yellow-blue value, with positive values ​​indicating a yellowish tint and negative values ​​indicating a bluish tint. The a value can be considered the first chromaticity value, and the b value can be considered the second chromaticity value.

[0075] Optionally, in this embodiment, the step "obtaining the chromaticity deviation information of the target image based on the chromaticity values ​​of each color patch" may include:

[0076] Statistical analysis was performed on the chromaticity values ​​of each chromaticity block to obtain chromaticity reference values;

[0077] Based on the chromaticity reference value, chromaticity deviation analysis is performed on each chromaticity block to obtain the chromaticity deviation information of the target image.

[0078] Specifically, the statistical analysis of the chromaticity values ​​of chromaticity blocks can involve averaging the chromaticity values ​​of each chromaticity block in the target image and using the resulting average chromaticity value as the chromaticity reference value.

[0079] Specifically, chromatic deviation analysis of chromaticity blocks can be performed by calculating the standard deviation of the chromaticity values ​​of each chromaticity block based on the chromaticity reference value, and then determining the chromaticity deviation information of the target image based on the calculated standard deviation.

[0080] Optionally, in this embodiment, the chromaticity value includes a first chromaticity value and a second chromaticity value; the chromaticity reference value includes a first chromaticity reference value corresponding to the first chromaticity value and a second chromaticity reference value corresponding to the second chromaticity value;

[0081] The step "based on the chromaticity reference value, perform chromaticity deviation analysis on each chromaticity block to obtain the chromaticity deviation information of the target image" may include:

[0082] Based on the first chromaticity reference value, the chromaticity deviation of the first chromaticity value of each chromaticity block is calculated to obtain the first chromaticity deviation value;

[0083] Based on the second chromaticity reference value, the chromaticity deviation of the second chromaticity value of each chromaticity block is calculated to obtain the second chromaticity deviation value;

[0084] Based on the first chromaticity deviation value and the second chromaticity deviation value, the chromaticity deviation information of the target image is determined.

[0085] Specifically, the first chromaticity reference value can be the average value of each color patch 'a' in the target image, the second chromaticity reference value can be the average value of each color patch 'b' in the target image, and the chromaticity deviation calculation can be the standard deviation calculation, etc. This embodiment does not limit this.

[0086] The first chromaticity deviation value and the second chromaticity deviation value can be fused to obtain the chromaticity deviation information of the target image. There are various fusion methods, and this embodiment does not limit them. For example, the fusion method can be a weighted operation.

[0087] In one specific embodiment, the color deviation information is the ab standard deviation, which is calculated as shown in equation (1):

[0088] ab standard deviation = √((standard deviation of 'a' value for all color patches)^2 + (standard deviation of 'b' value for all color patches)^2)(1)

[0089] The standard deviation of all color patch a values ​​is the first chromaticity deviation value in the above embodiment, and the standard deviation of all color patch b values ​​is the second chromaticity deviation value in the above embodiment.

[0090] In one embodiment, if the calculated color contrast between the edge region image and the center region image of the target image satisfies the R / G contrast and B / G contrast values ​​being both within the range of 0.9 to 1.1, the a and b values ​​of 300 color patches in the target image can be taken, and the ab standard deviation of the target image can be calculated. If the ab standard deviation is less than 1, the color uniformity of the target image is good; if the ab standard deviation is greater than 1, the target image fails the color uniformity detection. Figure 1c As shown, the left side displays the way color blocks are divided, and the right side shows the images to be tested for color uniformity. The ab standard deviations of these images are 1.84, 1.36, 0.83, and 0.42, respectively. The larger the ab standard deviation value, the worse the color uniformity of the image.

[0091] 105. Based on the regional color difference index and the chromaticity deviation information, the color uniformity of the target image is detected to obtain the color uniformity detection result of the target image.

[0092] First, it can be determined whether the regional color difference index is within a preset color difference range. If so, it can be determined whether the chromaticity deviation information is less than a preset value. When the chromaticity deviation information is less than the preset value, the target image is determined to have passed the color uniformity detection.

[0093] Optionally, in this embodiment, the step "detecting the color uniformity of the target image based on the region color difference index and the chromaticity deviation information, and obtaining the color uniformity detection result of the target image" may include:

[0094] When the regional color difference index is within a preset color difference range and the chromaticity deviation information is less than a preset value, the target image is determined to have passed the color uniformity detection.

[0095] The preset color difference range and preset value can be set according to actual conditions, and this embodiment does not impose any restrictions on them. Optionally, the preset color difference range can be set to 0.9 to 1.1, and the preset value can be set to 1.

[0096] In some embodiments, if the regional color difference index is within a preset color difference range and the chromaticity deviation information is not less than a preset value, then the color of the target image can be determined to be uneven.

[0097] Specifically, the R / G contrast and B / G contrast data of the target image to be detected can be analyzed. The closer the R / G contrast and B / G contrast are to 1, the better. Specifically, the maximum and minimum values ​​of the R / G contrast and B / G contrast of an image with good color uniformity should be within the range of 0.9 to 1.1. If the maximum and minimum values ​​of the R / G contrast and B / G contrast of the target image are not within the range of 0.9 to 1.1, the color uniformity of the target image can be directly considered poor. If the maximum and minimum values ​​of the R / G contrast and B / G contrast of the target image are within the range of 0.9 to 1.1, the target image can be divided into 15x20 regions (each region is a color block) using Python. The a value and b value of each color block are taken, and the ab standard deviation is calculated. If the ab standard deviation is less than 1, the color uniformity of the target image can be considered good. If the ab standard deviation is greater than 1, the color uniformity of the target image can be considered poor, and the color uniformity test is not passed.

[0098] In one specific embodiment, such as Figure 1d As shown, in the image on the left, the top row has poor color uniformity, while the bottom row has good color uniformity. The right side shows the experimental data for image color uniformity detection. The first column of the table is the number of the image to be tested. It can be seen that the closer the R / G and B / G ratios (i.e., the R / G contrast and B / G contrast mentioned in the above embodiment) are to 1, and the ab standard deviation is less than 1, the better the color uniformity of the image.

[0099] The color uniformity detection method provided in this application can use objective index data to control products with uneven color at the production line, thereby controlling color uniformity at the production line end, reducing product defect rate, providing a basic guarantee for improving product performance, reducing the waste of manpower in subjective testing, and improving the work efficiency of production line and image debugging.

[0100] As can be seen from the above, this embodiment can acquire a target image to be detected, and divide the target image into regions to obtain at least one region image corresponding to the target image; calculate the color index corresponding to the region image based on the pixel values ​​of the pixels in the region image on at least one color channel; perform difference analysis on the color indices corresponding to each region image to obtain the region color difference index of the target image; acquire the chromaticity values ​​corresponding to each color block in the target image, and acquire the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block; and detect the color uniformity of the target image according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image. This application can combine the region color difference index and the chromaticity deviation information to perform color uniformity detection on the target image, which is beneficial to improving the detection efficiency and accuracy of color uniformity.

[0101] Based on the method described in the preceding embodiments, the following will provide a more detailed explanation by taking the specific integration of the color uniformity detection device into a server as an example.

[0102] This application provides a method for detecting color uniformity, such as... Figure 2 As shown, the specific process of this color uniformity detection method can be as follows:

[0103] 201. The server acquires the target image to be detected and divides the target image into regions to obtain at least one region image corresponding to the target image.

[0104] The target image is the image whose color uniformity is to be detected. Specifically, the target image can be an image obtained by taking a picture of a white board or gray card through an image acquisition device (such as a camera).

[0105] Specifically, the region image of the target image can include the central region image and the edge region image of the target image. The central region image can be the region corresponding to the center of the target image, and the edge region image can be the region corresponding to the four corners (top left, top right, bottom left, and bottom right) of the target image.

[0106] 202. The server calculates the color index corresponding to the region image based on the pixel value of the pixel point in at least one color channel.

[0107] Optionally, in this embodiment, the step "calculating the color index corresponding to the region image based on the pixel values ​​of the pixels in at least one color channel of the region image" may include:

[0108] For each color channel, the average pixel value of each pixel in the region image on the color channel is calculated to obtain the average pixel value of the region image on the color channel.

[0109] The color index corresponding to the region image is calculated based on the average pixel value of the region image in each color channel.

[0110] Color channels are channels that store color information in an image. Specifically, color channels can include red (R channel), blue (B channel), and green (G channel).

[0111] The color index of the region image can be defined according to the actual situation, and this embodiment does not impose any restrictions on it. Specifically, the color index of the region image can be obtained by performing difference calculation or division operation on the pixel mean values ​​of each color channel. For example, the color index may include average R value / average G value (denoted as R / G) and average B value / average G value (denoted as B / G).

[0112] 203. The server performs a difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image.

[0113] Optionally, in this embodiment, the at least one region image corresponding to the target image includes a central region image and at least one edge region image;

[0114] The step "to perform difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image" may include:

[0115] For each edge region image, the color index of the edge region image and the color index of the center region image are compared and calculated to obtain the color contrast between the edge region image and the center region image.

[0116] Based on the color contrast between each edge region image and the central region image, the regional color difference index of the target image is determined.

[0117] In some embodiments, the color contrast between the edge region image and the center region image can be obtained by dividing the color index of the edge region image by the color index of the center region image.

[0118] Among them, the regional color difference index of the target image can be used to characterize the color uniformity of the target image.

[0119] Specifically, the color contrast between each edge region image and the central region image can be determined as the regional color difference index of the target image. Alternatively, the maximum and minimum color contrast values ​​between each edge region image and the central region image can be taken as the regional color difference index of the target image. This embodiment does not impose any restrictions on this.

[0120] 204. The server obtains the chromaticity values ​​corresponding to each color block in the target image, and obtains the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block.

[0121] This can be achieved by dividing the target image into at least one color block. The division can be uniform, and this embodiment does not impose any limitations on this. For example, the target image can be divided into 15*20 small blocks, each of which can be considered a color block, resulting in a total of 300 color blocks.

[0122] Specifically, the chromaticity values ​​of a color patch can include the a and b values ​​from the Lab values ​​of a colorimeter. The a value represents the red-green value, with positive values ​​indicating a reddish tint and negative values ​​indicating a greenish tint; the b value represents the yellow-blue value, with positive values ​​indicating a yellowish tint and negative values ​​indicating a bluish tint. The a value can be considered the first chromaticity value, and the b value can be considered the second chromaticity value.

[0123] Optionally, in this embodiment, the step "obtaining the chromaticity deviation information of the target image based on the chromaticity values ​​of each color patch" may include:

[0124] Statistical analysis was performed on the chromaticity values ​​of each chromaticity block to obtain chromaticity reference values;

[0125] Based on the chromaticity reference value, chromaticity deviation analysis is performed on each chromaticity block to obtain the chromaticity deviation information of the target image.

[0126] Specifically, the statistical analysis of the chromaticity values ​​of chromaticity blocks can involve averaging the chromaticity values ​​of each chromaticity block in the target image and using the resulting average chromaticity value as the chromaticity reference value.

[0127] Specifically, chromatic deviation analysis of chromaticity blocks can be performed by calculating the standard deviation of the chromaticity values ​​of each chromaticity block based on the chromaticity reference value, and then determining the chromaticity deviation information of the target image based on the calculated standard deviation.

[0128] Optionally, in this embodiment, the chromaticity value includes a first chromaticity value and a second chromaticity value; the chromaticity reference value includes a first chromaticity reference value corresponding to the first chromaticity value and a second chromaticity reference value corresponding to the second chromaticity value;

[0129] The step "based on the chromaticity reference value, perform chromaticity deviation analysis on each chromaticity block to obtain the chromaticity deviation information of the target image" may include:

[0130] Based on the first chromaticity reference value, the chromaticity deviation of the first chromaticity value of each chromaticity block is calculated to obtain the first chromaticity deviation value;

[0131] Based on the second chromaticity reference value, the chromaticity deviation of the second chromaticity value of each chromaticity block is calculated to obtain the second chromaticity deviation value;

[0132] Based on the first chromaticity deviation value and the second chromaticity deviation value, the chromaticity deviation information of the target image is determined.

[0133] Specifically, the first chromaticity reference value can be the average value of each color patch 'a' in the target image, the second chromaticity reference value can be the average value of each color patch 'b' in the target image, and the chromaticity deviation calculation can be the standard deviation calculation, etc. This embodiment does not limit this.

[0134] The first chromaticity deviation value and the second chromaticity deviation value can be fused to obtain the chromaticity deviation information of the target image. There are various fusion methods, and this embodiment does not limit them. For example, the fusion method can be a weighted operation.

[0135] 205. The server detects the color uniformity of the target image based on the regional color difference index and the chromaticity deviation information, and obtains the color uniformity detection result of the target image.

[0136] First, it can be determined whether the regional color difference index is within a preset color difference range. If so, it can be determined whether the chromaticity deviation information is less than a preset value. When the chromaticity deviation information is less than the preset value, the target image is determined to have passed the color uniformity detection.

[0137] Optionally, in this embodiment, the step "detecting the color uniformity of the target image based on the region color difference index and the chromaticity deviation information, and obtaining the color uniformity detection result of the target image" may include:

[0138] When the regional color difference index is within a preset color difference range and the chromaticity deviation information is less than a preset value, the target image is determined to have passed the color uniformity detection.

[0139] The preset color difference range and preset value can be set according to actual conditions, and this embodiment does not impose any restrictions on them. Optionally, the preset color difference range can be set to 0.9 to 1.1, and the preset value can be set to 1.

[0140] In some embodiments, if the regional color difference index is within a preset color difference range and the chromaticity deviation information is not less than a preset value, then the color of the target image can be determined to be uneven.

[0141] As can be seen from the above, this embodiment can acquire the target image to be detected through a server, and divide the target image into regions to obtain at least one region image corresponding to the target image; calculate the color index corresponding to the region image based on the pixel values ​​of the pixels in the region image on at least one color channel; perform difference analysis on the color index corresponding to each region image to obtain the region color difference index of the target image; obtain the chromaticity value corresponding to each color block in the target image, and obtain the chromaticity deviation information of the target image based on the chromaticity value of each color block; and detect the color uniformity of the target image according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image. This application can combine the region color difference index and the chromaticity deviation information to detect the color uniformity of the target image, which is beneficial to improving the detection efficiency and accuracy of color uniformity.

[0142] To better implement the above methods, embodiments of this application also provide a color uniformity detection device, such as... Figure 3 As shown, the color uniformity detection device may include a division unit 301, a calculation unit 302, a difference analysis unit 303, a colorimetry unit 304, and a detection unit 305, as follows:

[0143] (1) Divide the unit into 301;

[0144] A segmentation unit is used to acquire a target image to be detected and to segment the target image into regions to obtain at least one region image corresponding to the target image.

[0145] (2) Calculation unit 302;

[0146] The calculation unit is used to calculate the color index corresponding to the region image based on the pixel value of the pixel point in at least one color channel of the region image.

[0147] Optionally, in some embodiments of this application, the calculation unit may include a pixel mean calculation subunit and an index calculation subunit, as follows:

[0148] The pixel mean value calculation subunit is used to perform mean value calculation on the pixel values ​​of each pixel in the region image on the color channel for each color channel, so as to obtain the pixel mean value of the region image on the color channel.

[0149] The index calculation subunit is used to calculate the color index corresponding to the region image based on the pixel mean of the region image in each color channel.

[0150] (3) Difference analysis unit 303;

[0151] The difference analysis unit is used to perform difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image.

[0152] Optionally, in some embodiments of this application, the at least one region image corresponding to the target image includes a central region image and at least one edge region image;

[0153] The difference analysis unit may include a contrast calculation subunit and a determination subunit, as follows:

[0154] The contrast calculation subunit is used to perform a difference comparison calculation on the color index of the edge region image and the color index of the center region image for each edge region image, so as to obtain the color contrast between the edge region image and the center region image.

[0155] A sub-unit is defined to determine the regional color difference index of the target image based on the color contrast between each edge region image and the central region image.

[0156] (4) Chromaticity unit 304;

[0157] A chromaticity unit is used to obtain the chromaticity values ​​corresponding to each color block in the target image, and to obtain the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block.

[0158] Optionally, in some embodiments of this application, the chromaticity unit may include a statistical analysis subunit and a deviation analysis subunit, as follows:

[0159] The statistical analysis subunit is used to perform statistical analysis on the chromaticity values ​​of each chromaticity block to obtain chromaticity reference values;

[0160] The deviation analysis subunit is used to perform chromatic deviation analysis on each chromaticity block according to the chromaticity reference value to obtain the chromaticity deviation information of the target image.

[0161] Optionally, in some embodiments of this application, the chromaticity value includes a first chromaticity value and a second chromaticity value; the chromaticity reference value includes a first chromaticity reference value corresponding to the first chromaticity value and a second chromaticity reference value corresponding to the second chromaticity value;

[0162] Specifically, the deviation analysis subunit can be used to calculate the chromaticity deviation of the first chromaticity value of each chromaticity block according to the first chromaticity reference value to obtain the first chromaticity deviation value; calculate the chromaticity deviation of the second chromaticity value of each chromaticity block according to the second chromaticity reference value to obtain the second chromaticity deviation value; and determine the chromaticity deviation information of the target image based on the first chromaticity deviation value and the second chromaticity deviation value.

[0163] (5) Detection unit 305;

[0164] The detection unit is used to detect the color uniformity of the target image based on the regional color difference index and the chromaticity deviation information, and obtain the color uniformity detection result of the target image.

[0165] Optionally, in some embodiments of this application, the detection unit may be specifically used to determine that the target image passes the color uniformity detection when the regional color difference index is within a preset color difference range and the chromaticity deviation information is less than a preset value.

[0166] As can be seen from the above, in this embodiment, the segmentation unit 301 acquires the target image to be detected and divides the target image into regions to obtain at least one region image corresponding to the target image; the calculation unit 302 calculates the color index corresponding to the region image based on the pixel values ​​of the pixels in the region image on at least one color channel; the difference analysis unit 303 performs difference analysis on the color index corresponding to each region image to obtain the region color difference index of the target image; the chromaticity unit 304 acquires the chromaticity value corresponding to each color block in the target image and obtains the chromaticity deviation information of the target image based on the chromaticity value of each color block; and the detection unit 305 detects the color uniformity of the target image based on the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image. This application can combine the region color difference index and the chromaticity deviation information to perform color uniformity detection on the target image, which is beneficial to improving the detection efficiency and accuracy of color uniformity.

[0167] This application also provides an electronic device, such as... Figure 4 The diagram shows a structural schematic of an electronic device involved in an embodiment of this application. This electronic device can be a terminal or a server, specifically:

[0168] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0169] The processor 401 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 402, and calls data stored in the memory 402, to perform various functions and process data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0170] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0171] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0172] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0173] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:

[0174] A target image to be detected is acquired, and the target image is divided into regions to obtain at least one region image corresponding to the target image; based on the pixel values ​​of the pixels in the region image in at least one color channel, the color index corresponding to the region image is calculated; the color index corresponding to each region image is analyzed for difference to obtain the region color difference index of the target image; the chromaticity value corresponding to each color block in the target image is acquired, and the chromaticity deviation information of the target image is obtained based on the chromaticity value of each color block; the color uniformity of the target image is detected according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image.

[0175] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0176] As can be seen from the above, this embodiment can acquire a target image to be detected, and divide the target image into regions to obtain at least one region image corresponding to the target image; calculate the color index corresponding to the region image based on the pixel values ​​of the pixels in the region image on at least one color channel; perform difference analysis on the color indices corresponding to each region image to obtain the region color difference index of the target image; acquire the chromaticity values ​​corresponding to each color block in the target image, and acquire the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block; and detect the color uniformity of the target image according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image. This application can combine the region color difference index and the chromaticity deviation information to perform color uniformity detection on the target image, which is beneficial to improving the detection efficiency and accuracy of color uniformity.

[0177] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0178] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the color uniformity detection methods provided in embodiments of this application. For example, the instructions can execute the following steps:

[0179] A target image to be detected is acquired, and the target image is divided into regions to obtain at least one region image corresponding to the target image; based on the pixel values ​​of the pixels in the region image in at least one color channel, the color index corresponding to the region image is calculated; the color index corresponding to each region image is analyzed for difference to obtain the region color difference index of the target image; the chromaticity value corresponding to each color block in the target image is acquired, and the chromaticity deviation information of the target image is obtained based on the chromaticity value of each color block; the color uniformity of the target image is detected according to the region color difference index and the chromaticity deviation information to obtain the color uniformity detection result of the target image.

[0180] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0181] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0182] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the color uniformity detection methods provided in the embodiments of this application, the beneficial effects that any of the color uniformity detection methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0183] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations of the above-described color uniformity detection.

[0184] The above provides a detailed description of a color uniformity detection method and related equipment provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for detecting color uniformity, characterized in that, include: The target image to be detected is acquired, and the target image is divided into regions to obtain at least one region image corresponding to the target image; Based on the pixel value of a pixel in at least one color channel in the regional image, calculate the color index corresponding to the regional image. A difference analysis is performed on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image, wherein the regional color difference index is used to characterize the color uniformity of the target image. Obtain the chromaticity value corresponding to each color block in the target image, and obtain the chromaticity deviation information of the target image based on the chromaticity value of each color block; Based on the regional color difference index and the chromaticity deviation information, the color uniformity of the target image is detected to obtain the color uniformity detection result of the target image; Wherein, the at least one region image corresponding to the target image includes a central region image and at least one edge region image; The step of performing difference analysis on the color indices corresponding to each region of the image to obtain the regional color difference index of the target image includes: For each edge region image, the color index of the edge region image and the color index of the center region image are compared and calculated to obtain the color contrast between the edge region image and the center region image. Based on the color contrast between each edge region image and the central region image, the regional color difference index of the target image is determined.

2. The method according to claim 1, characterized in that, The step of calculating the color index corresponding to the region image based on the pixel values ​​of pixels in at least one color channel in the region image includes: For each color channel, the average pixel value of each pixel in the region image on the color channel is calculated to obtain the average pixel value of the region image on the color channel. The color index corresponding to the region image is calculated based on the average pixel value of the region image in each color channel.

3. The method according to claim 1, characterized in that, The step of obtaining the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block includes: Statistical analysis was performed on the chromaticity values ​​of each chromaticity block to obtain chromaticity reference values; Based on the chromaticity reference value, chromaticity deviation analysis is performed on each chromaticity block to obtain the chromaticity deviation information of the target image.

4. The method according to claim 3, characterized in that, The chromaticity value includes a first chromaticity value and a second chromaticity value; the chromaticity reference value includes a first chromaticity reference value corresponding to the first chromaticity value and a second chromaticity reference value corresponding to the second chromaticity value; The step of performing chromaticity deviation analysis on each chromaticity block based on the chromaticity reference value to obtain the chromaticity deviation information of the target image includes: Based on the first chromaticity reference value, the chromaticity deviation of the first chromaticity value of each chromaticity block is calculated to obtain the first chromaticity deviation value; Based on the second chromaticity reference value, the chromaticity deviation of the second chromaticity value of each chromaticity block is calculated to obtain the second chromaticity deviation value; Based on the first chromaticity deviation value and the second chromaticity deviation value, the chromaticity deviation information of the target image is determined.

5. The method according to claim 1, characterized in that, The step of detecting the color uniformity of the target image based on the regional color difference index and the chromaticity deviation information, and obtaining the color uniformity detection result of the target image, includes: When the regional color difference index is within a preset color difference range and the chromaticity deviation information is less than a preset value, the target image is determined to have passed the color uniformity detection.

6. A color uniformity detection device, characterized in that, include: A segmentation unit is used to acquire a target image to be detected and to segment the target image into regions to obtain at least one region image corresponding to the target image. The calculation unit is used to calculate the color index corresponding to the region image based on the pixel value of the pixel point in at least one color channel in the region image; The difference analysis unit is used to perform difference analysis on the color index corresponding to each region image to obtain the regional color difference index of the target image, wherein the regional color difference index is used to characterize the color uniformity of the target image. A chromaticity unit is used to obtain the chromaticity values ​​corresponding to each color block in the target image, and to obtain the chromaticity deviation information of the target image based on the chromaticity values ​​of each color block; The detection unit is used to detect the color uniformity of the target image based on the regional color difference index and the chromaticity deviation information, and obtain the color uniformity detection result of the target image. Wherein, the at least one region image corresponding to the target image includes a central region image and at least one edge region image; The difference analysis unit includes a contrast calculation subunit and a determination subunit: The contrast calculation subunit is used to perform a difference comparison calculation on the color index of the edge region image and the color index of the center region image for each edge region image, so as to obtain the color contrast between the edge region image and the center region image. A sub-unit is defined to determine the regional color difference index of the target image based on the color contrast between each edge region image and the central region image.

7. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program within the memory to perform the operations in the color uniformity detection method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the color uniformity detection method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the color uniformity detection method according to any one of claims 1 to 5.