Dispersion artifact determination method and device, electronic equipment and storage medium

By collecting and converting image pixels in high-contrast edge areas and calculating color difference values, the accuracy problem of identifying dispersion artifacts in the existing technology is solved, and the image quality and user experience are improved.

CN118608804APending Publication Date: 2024-09-06BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310215484.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing technologies are difficult to accurately identify and analyze dispersion artifacts in images in outdoor environments, especially in high-contrast edge areas, resulting in reduced image quality and impact on user experience.

Method used

By acquiring an image with high contrast edges, select a reference point to collect multiple pixels in the image, convert it to Lab color space, calculate the color difference value, determine whether the color difference value exceeds the threshold to determine the presence of dispersion artifacts, and determine the presence of dispersion artifacts based on the acquisition spacing and the number of pixels determines the artifact width.

Benefits of technology

It achieves accurate identification of dispersion artifacts in images in the Lab color space, adapts to indoor and outdoor scenes without testing charts, and improves image quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608804A
    Figure CN118608804A
Patent Text Reader

Abstract

The invention relates to a dispersion artifact determination method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-detected image with a high-contrast edge, taking any pixel point on the high-contrast edge as a reference point, collecting a plurality of pixel points from the two sides of the reference point in the to-be-detected image, determining a plurality of Lab values in one-to-one correspondence with the plurality of pixel points in the Lab color space, according to the plurality of Lab values, determining a first color difference value and a second color difference value between the plurality of pixel points and the first pixel point and between the plurality of pixel points and the second pixel point, and for any pixel point, determining the first color difference value and the second color difference value between the plurality of pixel points and the second pixel point under the condition that the first color difference value and the second color difference value are both greater than a set threshold value. And determining that dispersion artifacts exist in the to-be-detected image. Therefore, the high-contrast edge in the image is identified by the Lab color space which is more in line with human vision, and the chromatic dispersion artifacts in the image can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to a method, device, electronic device and storage medium for determining dispersion artifacts. Background Art

[0002] Dispersion artifacts are common artifacts in the field of imaging, usually including chromatic aberration caused by the failure of light waves of different colors to converge at the same point after passing through the lens, called longitudinal chromatic aberration, or chromatic aberration caused by the concentration of colors at different positions from the center of the image due to lens aberration, called lateral chromatic aberration. Dispersion artifacts usually appear as color fringing caused at different positions in the image, mostly in purple and yellow-green. Dispersion artifacts appear in the image, resulting in a decrease in image quality and affecting the user experience. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, electronic device and storage medium for determining dispersion artifacts.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for determining a dispersion artifact is provided, comprising:

[0005] Acquire an image to be detected with a high-contrast edge, wherein the high-contrast edge is an area in the image to be detected where the light-dark contrast is greater than a set contrast threshold;

[0006] Taking any pixel point on the high-contrast edge as a reference point, collecting multiple pixel points from both sides of the reference point in the image to be detected, wherein the multiple pixel points and the reference point are located on the same straight line, and the pixel points on both sides of the reference point and the farthest from the reference point among the multiple pixel points are the first pixel point and the second pixel point;

[0007] Determine a plurality of Lab values ​​corresponding to the plurality of pixel points in a Lab color space according to the plurality of RGB values ​​corresponding to the plurality of pixel points in a one-to-one manner;

[0008] Determine, according to the multiple Lab values, a first color difference value and a second color difference value between the multiple pixels and the first pixel and the second pixel;

[0009] For any pixel point, when the first color difference value and the second color difference value are both greater than the set threshold, it is determined that there is a dispersion artifact in the image to be detected.

[0010] Optionally, taking any pixel point on the high-contrast edge as a reference point and collecting a plurality of pixel points in opposite directions in the image to be detected includes:

[0011] Determining a target direction of the high contrast edge at the reference point;

[0012] Generating a pixel acquisition line in the direction perpendicular to the direction of the target in the image to be detected;

[0013] The plurality of pixel points are generated along the opposite direction of the pixel acquisition line according to a preset acquisition interval with the reference point as the center.

[0014] Optionally, the method further comprises:

[0015] Acquire the number of dispersion artifact pixel points, where the dispersion artifact pixel points are pixel points whose first color difference value is greater than the set threshold and whose second color difference value is greater than the set threshold among the multiple pixel points;

[0016] The dispersion artifact width of the high-contrast edge is determined according to the preset acquisition interval and the number of pixels.

[0017] Optionally, obtaining the number of pixels of dispersion artifact pixels includes:

[0018] According to the multiple Lab values, marking the multiple pixel points in a Lab color coordinate system;

[0019] Obtaining a reference Lab value corresponding to a non-dispersion artifact region in the image to be detected;

[0020] Determine a coverage area of ​​the reference Lab value in the Lab color coordinate system;

[0021] The pixel quantity of the dispersion artifact pixel points is calculated and determined, wherein the pixel points outside the coverage area in the Lab color coordinate system are the dispersion artifact pixel points.

[0022] Optionally, the method further comprises:

[0023] Determine a point among the multiple pixel points where the first color difference value and / or the second color difference value is the largest as a target pixel point;

[0024] The target color of the dispersion artifact in the Lab color space is determined according to the target Lab value corresponding to the target pixel.

[0025] Optionally, determining a plurality of Lab values ​​that correspond one-to-one to the plurality of pixel points in a Lab color space according to the plurality of RGB values ​​that correspond one-to-one to the plurality of pixel points includes:

[0026] Performing linearization processing on the multiple RGB values ​​to generate multiple linear RGB values;

[0027] Convert the plurality of linear RGB values ​​from the RGB color space to the XYZ color space to generate a plurality of XYZ values;

[0028] The multiple XYZ values ​​are converted from the XYZ color space to the Lab color space to generate the multiple Lab values.

[0029] Optionally, determining, according to the multiple Lab values, a first color difference value and a second color difference value between each pixel and the first pixel and the second pixel includes:

[0030] Determine, according to the multiple Lab values, a first brightness difference, a first chroma difference, and a first hue difference between each pixel and the first pixel, and a second brightness difference, a second chroma difference, and a second hue difference between each pixel and the second pixel;

[0031] The first color difference value is generated according to a preset weight parameter and the first brightness difference, the first chroma difference, and the first hue difference, and the second color difference value is generated according to the preset weight parameter and the second brightness difference, the second chroma difference, and the second hue difference.

[0032] According to a second aspect of an embodiment of the present disclosure, a device for determining a dispersion artifact is provided, including:

[0033] An acquisition module is configured to acquire an image to be detected having a high-contrast edge, wherein the high-contrast edge is an area in the image to be detected where the light-dark contrast is greater than a set contrast threshold;

[0034] A collection module is configured to collect a plurality of pixel points along a symmetrical direction in the image to be detected, taking any pixel point on the high-contrast edge as a reference point, wherein the pixel point farthest from the reference point among the plurality of pixel points is a first pixel point and a second pixel point;

[0035] A first determining module is configured to determine a plurality of Lab values ​​corresponding to the plurality of pixel points in a Lab color space according to the plurality of RGB values ​​corresponding to the plurality of pixel points in a one-to-one manner;

[0036] A second determination module is configured to determine, according to the plurality of Lab values, a first color difference value and a second color difference value between the plurality of pixels and the first pixel and the second pixel;

[0037] The determination module is configured to determine, for any pixel point, that a dispersion artifact exists in the image to be detected when both the first color difference value and the second color difference value are greater than the set threshold.

[0038] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0039] processor;

[0040] a memory for storing processor-executable instructions;

[0041] Wherein, the processor is configured to implement the steps of the method for determining the dispersion artifact described in any one of the first aspects of the present disclosure when executing the executable instructions.

[0042] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method for determining the dispersion artifact provided in the first aspect of the present disclosure are implemented.

[0043] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0044] Through the above method, an image to be detected with a high-contrast edge is obtained, and any pixel point on the high-contrast edge is used as a reference point, and multiple pixel points are collected from both sides of the reference point in the image to be detected, wherein the multiple pixel points and the reference point are located on the same straight line, and the pixel point farthest from the reference point among the multiple pixel points is the first pixel point and the second pixel point, and the multiple Lab values ​​corresponding to the multiple pixel points in the Lab color space are determined according to the multiple RGB values ​​corresponding to the multiple pixel points, and the first color difference value and the second color difference value between the multiple pixel points and the first pixel point and the second pixel point are determined according to the multiple Lab values. For any pixel point, when the first color difference value and the second color difference value are both greater than a set threshold value, it is determined that there is a dispersion artifact in the image to be detected. Thus, the high-contrast edge in the image is identified in a Lab color space that is more in line with human vision, and the dispersion artifact in the image can be accurately identified.

[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0047] Figure 1 The invention is a flow chart of a method for determining a dispersion artifact according to an exemplary embodiment.

[0048] Figure 2 The figure is a schematic diagram of a pixel acquisition method according to an exemplary embodiment.

[0049] Figure 3 The invention is a flow chart of a method for determining a dispersion artifact width according to an exemplary embodiment.

[0050] Figure 4 is an exemplary diagram showing a method for determining the number of pixels according to an exemplary embodiment.

[0051] Figure 5 The present invention is a block diagram of a device for determining a dispersion artifact according to an exemplary embodiment.

[0052] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0055] In the related art, the method for determining dispersion artifacts is usually to analyze the RGB channels in the dispersion artifact area, split and calculate the three RGB channels in the dispersion area, obtain the ESF (Edge Spread Function) curves of the three RGB channels, and obtain the data conclusion of the degree of dispersion by comparing and calculating the differences in the ESF curves of the three channels. However, this method is highly dependent on the test environment and requires shooting specific test charts in the laboratory for analysis. It is impossible to effectively analyze and calculate the results of shooting in the outdoor environment. Split and calculate the three RGB channels in the dispersion area to obtain the ESF curves of the three RGB channels, and obtain the data conclusion of the degree of dispersion by comparing and calculating the differences in the ESF curves of the three channels. However, the calculation results of the dispersion artifact fringes obtained by using the ESF curve have the following deficiencies: (1) The statistics of the dispersion artifact fringes width are inaccurate; (2) The color judgment of the dispersion artifact fringes is inaccurate, and the color of the fringes cannot be accurately judged; (3) The conventional method is highly dependent on the test environment and requires shooting specific test charts in the laboratory. The dispersion artifact fringes are compared and analyzed with the test charts, and it is impossible to effectively analyze and calculate the results shot in the outdoor environment.

[0056] In view of this, the present disclosure proposes a method for determining dispersion artifacts. Figure 1 is a flow chart of a method for determining a dispersion artifact according to an exemplary embodiment. Figure 1 As shown, the method is used in a terminal device and includes the following steps.

[0057] In step S101, an image to be detected with a high-contrast edge is obtained. The high-contrast edge is a region in the image to be detected where the light-dark contrast is greater than a set contrast threshold.

[0058] It is worth mentioning that dispersion artifacts are a common artifact in the field of imaging, usually including chromatic aberration caused by the failure of light waves of different colors to converge at the same point after passing through the lens, which is called longitudinal chromatic aberration, or chromatic aberration caused by the concentration of colors at different positions from the center of the image due to lens aberration, which is called lateral chromatic aberration. Based on the composition principle of dispersion artifacts, dispersion artifacts may occur in the high-contrast edge area of ​​the image after the image is generated, where the high-contrast edge is the area in the image where the light-dark contrast is greater than the set contrast threshold, and is manifested in the image as the intersection edge between the brighter area and the darker area. Therefore, the generation of dispersion artifacts in the image is related to the bright contrast in the shooting environment and the user's shooting angle. When dispersion artifacts are generated in the image, dispersion will occur at the corresponding high-contrast edge, causing the image to present other colors of fringes in the area, such as purple fringes, red fringes, or yellow-green fringes at the high-contrast edge, resulting in reduced image quality and affecting the user's experience. Generally, the brightness contrast and shooting angle of the shooting environment are determined by the user based on shooting requirements. Therefore, it is necessary to determine the dispersion artifacts in the image through a relevant detection algorithm, and then repair or compensate for the pixels of the dispersion artifacts to eliminate the dispersion artifacts in the image and improve the user's shooting experience.

[0059] It should be noted that there may be dispersion artifacts in the high contrast edge area of ​​the image, or there may not be dispersion artifacts, and the obviousness of the dispersion artifacts is also related to the shooting angle of the user and the dispersion degree of the high contrast edge area. Therefore, it is necessary to determine whether the dispersion artifacts that can be visually perceived by the user are generated in the high contrast edge area of ​​the image by detection. For example, the present embodiment is applied to a terminal device, and the terminal device can be used for image analysis and image processing. For example, the terminal device can be a mobile phone, a tablet computer, an ipad, a camera, etc., and multiple images to be detected are input to the terminal device, wherein the multiple images to be detected can be sent to the terminal device by wireless communication. The terminal device can also have an image shooting function, and shoot multiple images to be detected by a shooting device. The terminal device can determine the contrast of each pixel at different positions in the image according to the RGB value of each image to be detected, compare the contrast of each pixel with the contrast of the adjacent pixel in the image, and determine the contrast difference between the pixel and the connected pixel, so as to determine the target pixel whose contrast difference in the image to be detected is greater than the set contrast threshold, and the area formed by the adjacent target pixel in the image is the high contrast edge in the image to be detected.

[0060] In step S102, any pixel point on the high-contrast edge is taken as a reference point, and multiple pixel points are collected from both sides of the reference point in the image to be detected, wherein the multiple pixel points and the reference point are located on the same straight line, and the pixel points on both sides of the reference point among the multiple pixel points that are farthest from the reference point are the first pixel point and the second pixel point.

[0061] It is worth mentioning that, according to the generation principle of high contrast edge in the image to be detected, the high contrast edge can be determined as the dividing line of the light and dark areas in the image, and the length of the dividing line is related to the boundary length of the light and dark areas. In the image to be detected, the dividing line can be a line segment extending to the edge of the image, or a line segment of any length in the image to be detected. Wherein, the width of the line segment can be the width of one or more pixels. In this embodiment, after the high contrast edge area in the image to be detected is determined by the above steps, any pixel point on the high contrast edge is selected as a reference point, and multiple pixels are collected in the opposite direction of the same straight line in the image to be detected, wherein the opposite direction is any direction centered on the reference point, and the collected multiple pixels include pixels located in the bright area, pixels located in the darker area, and pixels located on the high contrast edge area. Wherein, when collecting multiple pixels, the pixel point farthest from the reference point in the first direction is the first pixel point, and the pixel point farthest from the reference point in the second direction is the second pixel point. The first direction and the second direction are opposite directions on the same straight line passing through the reference point, and the direction of the straight line in the image is not limited in this embodiment. For example, in order to make the multiple pixel points obtained by sampling more accurate, in this embodiment, after obtaining the image to be detected with a high-contrast edge, the image to be detected is intercepted with the high-contrast edge as the center according to the position of the high-contrast edge in the image to be detected, and a sub-image to be detected with a high-contrast edge area, a bright area and a dim area is generated, thereby avoiding interference of other color pixels in the image with the detection result, and multiple pixel points are collected in the sub-image to be detected generated after interception according to the above-mentioned collection method, so that the collected pixel points only include pixel points in the bright area, pixel points in the high-contrast edge and pixel points in the dim area, and the first pixel point farthest from the reference point among the multiple pixel points is a pixel point in the bright area, and the second pixel point is a pixel point in the dim area.

[0062] Optionally, in one implementation, the above step S102 includes:

[0063] Determine the target orientation of high contrast edges at reference points;

[0064] Generate a pixel acquisition line in a direction perpendicular to the direction of the target in the image to be detected;

[0065] With the reference point as the center, multiple pixel points are generated along the opposite direction of the pixel acquisition line according to the preset acquisition spacing.

[0066] For example, in this embodiment, any pixel point on a high-contrast edge is used as a reference point to determine the target direction of the reference point on the high-contrast edge. The target direction can be the direction of the line segment formed between the reference point and the adjacent pixel point on the high-contrast edge in the image to be detected. After determining the target direction of the reference point, a straight line perpendicular to the target direction and passing through the reference point is used as a pixel acquisition line. With the reference point as the center, multiple pixel points are collected on the pixel acquisition line in the opposite direction according to a preset acquisition interval. For example, Figure 2 is a schematic diagram of a pixel acquisition method according to an exemplary embodiment. Figure 2 As shown, the image is a sub-image to be detected that is captured and generated by the above method, wherein the upper half area is a dark area, the lower half area is a bright area, the line running left and right in the middle is a high-contrast edge, and pixel point A in the high-contrast edge is used as a reference point. According to the target direction of pixel point A in the high-contrast edge, a pixel acquisition line is generated at the position of pixel point A in a direction perpendicular to the target direction, and multiple pixel points are collected on the pixel acquisition line, wherein pixel point B farthest from the reference point in the dark area is the first pixel point, and pixel point C farthest from the reference point in the bright area is the second pixel point.

[0067] In step S103, a plurality of Lab values ​​corresponding to the plurality of pixel points in a Lab color space are determined according to the plurality of RGB values ​​corresponding to the plurality of pixel points in a one-to-one manner.

[0068] It is worth mentioning that the RGB value of the pixel is the RGB value generated by the terminal device after color conversion based on the RGB color space according to the color recognition result. The RGB color space is the color standard of the industry. The color of each pixel determined by the RGB color space is close to the color that the human eye can perceive, but there is still a certain color deviation. The final generated image is used for users to appreciate and observe. Therefore, the dispersion artifacts in the image are measured by the visual standard of the human eye to obtain more accurate dispersion artifact detection results. Usually, the dispersion artifacts in the image to be detected observed by the human eye are relatively light. If the degree of dispersion artifacts is low, the dispersion artifacts in the image to be detected may not be perceived based on the user's perspective. The dispersion artifacts determined based on the RGB values ​​in the image are based on the color standards of the industry, which can easily lead to the user being unable to perceive the dispersion artifacts in the image to be detected based on visual observation when the RGB value determines that there are dispersion artifacts in the image to be detected. Compared with the RGB color space, the Lab color space is a device-independent color system and a color system based on physiological characteristics, which means that it uses a digital method to describe human visual perception, and the color of each pixel obtained through the Lab color space is closer to the visually perceived color. Therefore, in this embodiment, after determining a series of multiple pixel points through the above steps, the RGB values ​​of the multiple pixel points are determined according to the pixel color presentation algorithm in the terminal device, and the RGB values ​​corresponding to the multiple pixel points are converted into multiple Lab values ​​of the Lab color space according to the numerical conversion method between the RGB color space and the Lab color space.

[0069] Optionally, in another implementation, the above step S103 includes:

[0070] Perform linearization processing on multiple RGB values ​​to generate multiple linear RGB values;

[0071] Convert multiple linear RGB values ​​from RGB color space to XYZ color space to generate multiple XYZ values;

[0072] Convert multiple XYZ values ​​from XYZ color space to Lab color space to generate multiple Lab values.

[0073] It is worth mentioning that the RGB value of a pixel point cannot be directly converted to the Lab value in the Lab color space. The RGB value needs to be converted to the XYZ value of the XYZ color space first, and then converted from the XYZ color space to the Lab color space. For example, in this embodiment, the three RGB channels of multiple pixels are sampled, and the RGB value obtained for each pixel point is linearized to generate the corresponding linear RGB value. For example, for each pixel point, the linear RGB value corresponding to the pixel point can be determined by the following formula;

[0074] R line =gamma(R)

[0075] G line =gamma(G)

[0076] B line =gamma(B)

[0077] Among them, the gamma function is:

[0078] output line =input 2.255

[0079] Output in the gamma function line is the linear output of the gamma function, and input is the input of the gamma function. The gamma function converts the RGB value of each pixel into a linear RGB value. After the linear RGB value is generated, the linear RGB value can be normalized in the following way;

[0080] R Normalized =R line / 255

[0081] G Normalized =G line / 255

[0082] B Normalized =B line / 255

[0083] The normalized linear RGB value is converted into the XYZ color space to generate an XYZ value. For example, the normalized linear RGB value can be converted into an XYZ value in the following manner;

[0084]

[0085] Then convert the XYZ value from the XYZ color space to the Lab color space. For example, the conversion can be performed in the following way;

[0086]

[0087] Where x0=95.05, y0=100, z0=108.9, the function f(x) is expressed as:

[0088]

[0089] In f(x), when x>0.008856, When x≤0.008856, y=7.787*x+16 / 116. In the above manner, the RGB value of each pixel in the RGB color space is converted into a Lab value in the Lab color space.

[0090] In step S104, first color difference values ​​and second color difference values ​​between a plurality of pixels and a first pixel and a second pixel are determined according to a plurality of Lab values.

[0091] It is worth mentioning that after converting the RGB value of each pixel to the Lab value of the Lab color space in the above manner, the Lab value of each pixel is compared with the Lab value of the first pixel and the Lab value of the second pixel to determine whether there is color difference in each pixel. When a dispersion artifact occurs on a high-contrast edge, the pixel corresponding to the dispersion artifact will produce a more obvious color difference with the first pixel and the second pixel, so the Lab value can be compared to determine whether there is a dispersion artifact in the image. For example, in this embodiment, after determining the Lab value of each pixel through the above steps, the first Lab value of the first pixel and the second Lab value of the second pixel are found in the multiple Lab values ​​of the multiple pixels. The Lab values ​​of other pixels except the first pixel and the second pixel are subjected to color difference calculation with the first Lab value and the second Lab value to determine the first color difference value and the second color difference value between each pixel and the first pixel and the second pixel.

[0092] Optionally, in another implementation, the above step S104 includes:

[0093] According to the multiple Lab values, determine a first brightness difference, a first chroma difference, and a first hue difference between each pixel and a first pixel, and a second brightness difference, a second chroma difference, and a second hue difference between each pixel and a second pixel;

[0094] A first color difference value is generated according to a preset weight parameter and the first brightness difference, the first chroma difference, and the first hue difference, and a second color difference value is generated according to the preset weight parameter and the second brightness difference, the second chroma difference, and the second hue difference.

[0095] It is worth mentioning that the color difference between pixels is affected by the brightness, chroma and phase of each pixel, and based on the sensitivity of human vision to color in three dimensions, different calculation weights are divided in three dimensions when calculating the color difference, so that the color difference between each pixel and the first pixel and the second pixel determined by calculation is more accurate. For example, the Lab values ​​of the first pixel and the second pixel in the sampling column are recorded as First_Lab and Last_Lab. The color difference value Delta E between each pixel in the sampling column and First_Lab and Last_Lab is calculated. Among them, Delta E can be calculated by the following formula;

[0096]

[0097]

[0098] Among them, G is the adjustment factor of the axis in the Lab color coordinate system, is the average Euclidean distance between two pixels in the Lab coordinate system, L' is the brightness value of any pixel, L * is the brightness value of the head pixel or the tail pixel, A' is the A-phase coordinate value of any pixel, A * is the A-phase coordinate value of the head pixel or the tail pixel, B' is the B-phase coordinate value of any pixel, B * is the B-phase coordinate value of the head pixel or tail pixel, C' ab is the Euclidean distance between two pixels in the Lab coordinate system, h' ab is the hue difference between two pixels. The lightness difference is ΔL, and the chroma difference is ΔC ab , the hue difference is ΔH ab , can be calculated as follows;

[0099]

[0100] T=1-0.017*cos(h' ab -30°)+0.24*cos(2*h' ab )+0.32*cos(3*h' ab +6°)-0.2*cos(4*h' ab -63°)

[0101]

[0102] S C =1+0.045*C' ab

[0103] S H =1+0.015*C' ab *T

[0104]

[0105] Δθ=30exp{-[(h' ab -275°) / 25 2}

[0106] R T =-sin(2Δθ)*R C

[0107]

[0108] Among them, T is the function of hue angle, S L is the brightness weight factor, S C is the chroma weight factor, S H is the hue weight factor, R C is the rotation amplitude according to the chroma change, R T is a rotation function used to correct the deflection of the main axis direction of the tolerance ellipse in the blue area of ​​the color space, Δθ is the rotation angle determined by the hue, ΔE 00 is the color difference value.

[0109] In step S105, for any pixel point, when the first color difference value and the second color difference value are both greater than a set threshold, it is determined that there is a dispersion artifact in the image to be detected.

[0110] For example, in this embodiment, after calculating and determining the Lab value of each pixel and the first color difference value and the second color difference value between the first pixel and the second pixel through the above steps, the color difference value is compared with the set threshold value. When the first color difference value and the second color difference value are both greater than the set threshold value, the pixel is determined to be a pixel where a dispersion artifact occurs, and the corresponding image to be detected has a dispersion artifact. For example, the set threshold value is 3. When the color difference values ​​of the pixel are all greater than 3, the pixel is a pixel corresponding to the dispersion artifact.

[0111] Through the above method, an image to be detected with a high-contrast edge is obtained, and any pixel point on the high-contrast edge is used as a reference point, and multiple pixel points are collected in the opposite direction in the image to be detected, wherein the pixel point farthest from the reference point among the multiple pixel points is the first pixel point and the second pixel point, and multiple Lab values ​​corresponding to the multiple pixel points in the Lab color space are determined according to the multiple RGB values ​​corresponding to the multiple pixel points, and the first color difference value and the second color difference value between the multiple pixel points and the first pixel point and the second pixel point are determined according to the multiple Lab values. For any pixel point, when the first color difference value and the second color difference value are both greater than the set threshold value, it is determined that there is a dispersion artifact in the image to be detected. Thus, it can adapt to indoor and outdoor image scenes, and there is no need to test the chart to identify the high-contrast edge in the image in the Lab color space that is more in line with human vision, so that the obtained dispersion artifact detection result is more accurate.

[0112] Figure 3 is a flow chart of a method for determining a dispersion artifact width according to an exemplary embodiment. Figure 3 As shown, the method is applied to a terminal device and includes the following steps.

[0113] In step S201, the number of dispersion artifact pixel points is obtained, where the dispersion artifact pixel points are pixel points whose first color difference value is greater than a set threshold and whose second color difference value is greater than a set threshold among multiple pixel points.

[0114] It is worth mentioning that this embodiment is based on the determination of the presence of dispersion artifacts in the image in the above-mentioned scheme. After determining the presence of dispersion artifacts in the image through the above-mentioned steps, according to the comparison method in the above-mentioned step S105, the pixel points among multiple pixel points whose first color difference value and second color difference value are both greater than the set threshold are determined to be dispersion artifact pixels, and the number of dispersion artifact pixels among multiple pixel points is determined by statistics as the number of pixels.

[0115] Optionally, in one implementation, the above step S201 includes:

[0116] According to multiple Lab values, multiple pixel points are marked in the Lab color coordinate system;

[0117] Obtaining a reference Lab value corresponding to a non-dispersion artifact region in the image to be detected;

[0118] Determine the coverage area of ​​the reference Lab value in the Lab color coordinate system;

[0119] The number of pixels of dispersion artifact pixels is determined by calculation, wherein the pixels outside the coverage area in the Lab color coordinate system are dispersion artifact pixels.

[0120] For example, in this embodiment, after determining multiple Lab values ​​of multiple pixel points in the Lab color space by the above method, each pixel point is marked in the Lab color coordinate system by multiple Lab values ​​in the Lab color coordinate system corresponding to the Lab color space. The reference Lab values ​​of the bright area and the dark area in the image are determined by detecting the image to be detected. It is worth mentioning that the contrast in the image is gradual. Therefore, the reference Lab value corresponding to the bright area and the dark area is a Lab value range, which corresponds to a closed area in the Lab color coordinate system. The coverage area of ​​the bright area and the dark area in the Lab color coordinate system is determined according to the reference Lab value. The pixel points outside the coverage area among the marked pixel points are dispersion artifact pixels, and the number of the dispersion artifact pixels is counted to obtain the number of pixels. Among them, the coverage area of ​​the benchmark Lab value in the Lab color coordinate system can be determined by the Lab value of the head pixel, the Lab value of the tail pixel and the preset color difference range. The preset color difference range is the allowable color difference range for each pixel in the bright area and the dim area. The points beyond the color difference range are the pixels corresponding to the dispersion artifacts. Therefore, according to the preset color difference range and the positions of the head pixel and the tail pixel in the Lab color coordinate system, the coverage areas of the bright area and the dim area in the Lab color coordinate system are marked.

[0121] For example, Figure 4 is an example diagram showing a method for determining the number of pixels according to an exemplary embodiment. Figure 4 As shown, a Lab color coordinate system corresponding to the Lab color space is constructed, and the pixel points are marked in the Lab color coordinate system according to the Lab value of each pixel point. The coverage area of ​​the bright area and the dim area is marked in the Lab color coordinate system according to the benchmark Lab values ​​of the bright area and the dim area. The pixel points outside the coverage area are dispersion artifact pixel points, and the number of pixel points outside the coverage area is recorded as the number of pixels of the dispersion artifact.

[0122] In step S202, the dispersion artifact width of the high-contrast edge is determined according to the preset acquisition interval and the number of pixels.

[0123] For example, in this embodiment, multiple pixel points in the image to be detected are collected in a direction perpendicular to the direction of the target according to a preset collection interval. Therefore, the dispersion artifact width of the dispersion artifact corresponding to the high-contrast edge in the image to be detected can be determined based on the preset collection interval and the number of pixels.

[0124] Optionally, in another implementation, after the above step S202, the method further includes:

[0125] Determine a point with the largest first color difference value and / or second color difference value among the multiple pixel points as a target pixel point;

[0126] According to the target Lab value corresponding to the target pixel point, the target color of the dispersion artifact in the Lab color space is determined.

[0127] For example, in this embodiment, after determining the color difference value between each pixel and the first pixel and the second pixel through the above steps, determine the pixel with the largest first color difference value and / or second color difference value among multiple pixels as the target pixel, and depict the target pixel in the Lab color coordinate system according to the target Lab value of the target pixel, calculate the angle between the target pixel and the coordinate origin in the Lab color coordinate system, and determine the target color of the target pixel in the Lab color space according to the angle. For example, if the angle is 60°-180°, it is determined that the dispersion artifact in the image to be detected presents yellow-green; if the angle is 240°-360°, it is determined that the dispersion artifact presents purple. By determining the presentation color of the dispersion artifact, color compensation can be performed on the dispersion artifact in the image to be detected later, thereby eliminating the dispersion artifact in the image to be detected, and bringing a better user experience to the user.

[0128] In the above manner, based on the acquisition rules of multiple pixel points and the number of dispersion artifact pixels, the width of the dispersion artifact in the image to be detected can be calculated and determined, so as to more accurately evaluate the dispersion artifact in the image and prepare for the subsequent elimination of the dispersion artifact in the image.

[0129] Figure 5 is a block diagram of a device for determining a dispersion artifact according to an exemplary embodiment. Figure 5 The device 100 includes: an acquisition module 110, a collection module 120, a first determination module 130, a second determination module 140 and a judgment module 150.

[0130] The acquisition module 110 is configured to acquire an image to be detected having a high-contrast edge, where the high-contrast edge is a region in the image to be detected where the light-dark contrast is greater than a set contrast threshold;

[0131] The acquisition module 120 is configured to take any pixel point on the high-contrast edge as a reference point, and acquire multiple pixel points from both sides of the reference point in the image to be detected, wherein the pixel points on both sides of the reference point and the farthest distance from the reference point among the multiple pixel points are the first pixel point and the second pixel point;

[0132] The first determination module 130 is configured to determine a plurality of Lab values ​​corresponding to the plurality of pixels in a Lab color space according to the plurality of RGB values ​​corresponding to the plurality of pixels;

[0133] The second determination module 140 is configured to determine the first color difference value and the second color difference value between the plurality of pixels and the first pixel and the second pixel according to the plurality of Lab values;

[0134] The determination module 150 is configured to determine, for any pixel point, that a dispersion artifact exists in the image to be detected when the first color difference value and the second color difference value are greater than a set threshold.

[0135] Optionally, the acquisition module 120 is configured to:

[0136] Determine the target orientation of high contrast edges at reference points;

[0137] Generate a pixel acquisition line in a direction perpendicular to the direction of the target in the image to be detected;

[0138] With the reference point as the center, multiple pixel points are generated along the opposite direction of the pixel acquisition line according to the preset acquisition spacing.

[0139] Optionally, the apparatus 100 further includes a third determining module, and the third determining module includes:

[0140] An acquisition submodule is configured to acquire the number of dispersion artifact pixel points, where the dispersion artifact pixel points are pixel points whose first color difference value is greater than a set threshold and whose second color difference value is greater than a set threshold among multiple pixel points;

[0141] The determination submodule is configured to determine the dispersion artifact width of the high-contrast edge according to a preset acquisition interval and a number of pixels.

[0142] Optionally, the acquisition submodule is configured as:

[0143] According to multiple Lab values, multiple pixel points are marked in the Lab color coordinate system;

[0144] Obtaining a reference Lab value corresponding to a non-dispersion artifact region in the image to be detected;

[0145] Determine the coverage area of ​​the reference Lab value in the Lab color coordinate system;

[0146] The number of pixels of dispersion artifact pixels is determined by calculation, wherein the pixels outside the coverage area in the Lab color coordinate system are dispersion artifact pixels.

[0147] Optionally, the apparatus 100 further includes a fourth determining module, and the fourth determining module is configured to:

[0148] Determine a point with the largest first color difference value and / or second color difference value among the multiple pixel points as a target pixel point;

[0149] According to the target Lab value corresponding to the target pixel point, the target color of the dispersion artifact in the Lab color space is determined.

[0150] Optionally, the first determining module 130 is configured to:

[0151] Perform linearization processing on multiple RGB values ​​to generate multiple linear RGB values;

[0152] Convert multiple linear RGB values ​​from RGB color space to XYZ color space to generate multiple XYZ values;

[0153] Convert multiple XYZ values ​​from XYZ color space to Lab color space to generate multiple Lab values.

[0154] Optionally, the second determining module 140 is configured to:

[0155] According to a plurality of Lab values, determining a first brightness difference, a first chroma difference, and a first hue difference between each pixel and the first pixel, and a second brightness difference, a second chroma difference, and a second hue difference between each pixel and the second pixel;

[0156] A first color difference value is generated according to a preset weight parameter and the first brightness difference, the first chroma difference, and the first hue difference, and a second color difference value is generated according to the preset weight parameter and the second brightness difference, the second chroma difference, and the second hue difference.

[0157] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0158] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon. When the program instructions are executed by a processor, the steps of the method for determining the dispersion artifact provided by the present disclosure are implemented.

[0159] Figure 6 6 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0160] Reference Figure 6 , the device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 607 , an audio component 610 , an input / output interface 612 , a sensor component 614 , and a communication component 616 .

[0161] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method for determining dispersion artifacts. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 607 and the processing component 602.

[0162] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0163] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device 600.

[0164] The multimedia component 607 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 607 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0165] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0166] The input / output interface 612 provides an interface between the processing component 602 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0167] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0168] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0169] In an exemplary embodiment, the device 600 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned method for determining dispersion artifacts.

[0170] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned dispersion artifact determination method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0171] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned method for determining the dispersion artifact. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, for example, the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned method for determining the dispersion artifact is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned method for determining the dispersion artifact.

[0172] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for performing the above-mentioned method for determining a chromatic dispersion artifact when the computer program is executed by the programmable device.

[0173] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0174] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for determining a dispersion artifact, characterized in that: include: Acquire an image to be detected with a high-contrast edge, wherein the high-contrast edge is an area in the image to be detected where the light-dark contrast is greater than a set contrast threshold; Taking any pixel point on the high-contrast edge as a reference point, collecting multiple pixel points from both sides of the reference point in the image to be detected, wherein the multiple pixel points and the reference point are located on the same straight line, and the pixel points on both sides of the reference point and the farthest from the reference point among the multiple pixel points are the first pixel point and the second pixel point; Determine a plurality of Lab values ​​corresponding to the plurality of pixel points in a Lab color space according to the plurality of RGB values ​​corresponding to the plurality of pixel points in a one-to-one manner; Determine, according to the multiple Lab values, a first color difference value and a second color difference value between the multiple pixels and the first pixel and the second pixel; For any pixel point, when the first color difference value and the second color difference value are both greater than a set threshold, it is determined that there is a dispersion artifact in the image to be detected.

2. The determination method according to claim 1, characterized in that: The method of taking any pixel point on the high-contrast edge as a reference point and collecting a plurality of pixel points from both sides of the reference point in the image to be detected includes: Determining a target direction of the high contrast edge at the reference point; Generating a pixel acquisition line in the direction perpendicular to the direction of the target in the image to be detected; The plurality of pixel points are generated along the opposite direction of the pixel acquisition line according to a preset acquisition interval with the reference point as the center.

3. The determination method according to claim 2, characterized in that: The method further comprises: Acquire the number of dispersion artifact pixel points, where the dispersion artifact pixel points are pixel points whose first color difference value is greater than the set threshold and whose second color difference value is greater than the set threshold among the multiple pixel points; The dispersion artifact width of the high-contrast edge is determined according to the preset acquisition interval and the number of pixels.

4. The determination method according to claim 3, characterized in that: The step of obtaining the number of pixels of dispersion artifact pixels comprises: According to the multiple Lab values, marking the multiple pixel points in a Lab color coordinate system; Obtaining a reference Lab value corresponding to a non-dispersion artifact region in the image to be detected; Determine a coverage area of ​​the reference Lab value in the Lab color coordinate system; The pixel quantity of the dispersion artifact pixel points is calculated and determined, wherein the pixel points outside the coverage area in the Lab color coordinate system are the dispersion artifact pixel points.

5. The determination method according to claim 1, characterized in that: The method further comprises: Determine a point among the multiple pixel points where the first color difference value and / or the second color difference value is the largest as a target pixel point; The target color of the dispersion artifact in the Lab color space is determined according to the target Lab value corresponding to the target pixel.

6. The determination method according to any one of claims 1 to 5, characterized in that: The determining, according to the multiple RGB values ​​corresponding to the multiple pixel points in one-to-one correspondence in the Lab color space, multiple Lab values ​​corresponding to the multiple pixel points in one-to-one correspondence in the Lab color space includes: Performing linearization processing on the multiple RGB values ​​to generate multiple linear RGB values; Convert the plurality of linear RGB values ​​from the RGB color space to the XYZ color space to generate a plurality of XYZ values; The multiple XYZ values ​​are converted from the XYZ color space to the Lab color space to generate the multiple Lab values.

7. The determination method according to any one of claims 1 to 5, characterized in that: The determining, according to the multiple Lab values, a first color difference value and a second color difference value between each pixel and the first pixel and the second pixel, comprises: Determine, according to the multiple Lab values, a first brightness difference, a first chroma difference, and a first hue difference between each pixel and the first pixel, and a second brightness difference, a second chroma difference, and a second hue difference between each pixel and the second pixel; The first color difference value is generated according to a preset weight parameter and the first brightness difference, the first chroma difference, and the first hue difference, and the second color difference value is generated according to the preset weight parameter and the second brightness difference, the second chroma difference, and the second hue difference.

8. A device for determining a dispersion artifact, characterized in that: include: An acquisition module is configured to acquire an image to be detected having a high-contrast edge, wherein the high-contrast edge is an area in the image to be detected where the light-dark contrast is greater than a set contrast threshold; A collection module is configured to take any pixel point on the high-contrast edge as a reference point, and collect a plurality of pixel points from both sides of the reference point in the image to be detected, wherein the plurality of pixel points and the reference point are located on the same straight line, and the pixel points on both sides of the reference point and the farthest from the reference point among the plurality of pixel points are the first pixel point and the second pixel point; A first determining module is configured to determine a plurality of Lab values ​​corresponding to the plurality of pixel points in a Lab color space according to the plurality of RGB values ​​corresponding to the plurality of pixel points in a one-to-one manner; A second determination module is configured to determine, according to the plurality of Lab values, a first color difference value and a second color difference value between the plurality of pixels and the first pixel and the second pixel; The determination module is configured to determine, for any pixel point, that a dispersion artifact exists in the image to be detected when both the first color difference value and the second color difference value are greater than a set threshold.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the steps of the method described in any one of claims 1-7 when executing the executable instructions.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • System and method of correcting image artifacts

    CN105408936A

  • Gamut mapping method and device for compressed domain from outer domain to inner domain, storage medium and electronic equipment

    CN108810508A

  • Image processing method and device, image forming device and storage medium

    CN111935364A

  • Printed matter color detection method, device and equipment and medium

    CN112085707A

  • Method and apparatus for canceling chromatic aberration

    US20100110238A1