Pseudo-color detection method and device, electronic equipment and storage medium

By calculating the fluctuation of the YUV component of the target pixel in the image, the problem of pseudo-color phenomenon in the image is solved, and the image quality and user experience are improved.

CN120147212APending Publication Date: 2025-06-13BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311705868.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The pseudo-color phenomenon in the image due to lens chromatic aberration and image sensor highlight overflow affects the intuitive feeling and user experience of the image.

Method used

By acquiring the YUV components of the image to be detected, the values ​​indicating the fluctuation degree of the YUV components of each pixel in the adjacent area of ​​the target pixel are calculated, and pseudo-color detection is performed based on these values.

Benefits of technology

Effectively detect and process pseudo-color phenomena in images, improve the intuitive feeling and user experience of images, and ensure image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147212A_ABST
    Figure CN120147212A_ABST
Patent Text Reader

Abstract

The invention relates to a pseudo color detection method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a to-be-detected image, and enabling each pixel in the to-be-detected image to correspond to a YUV component; for any target pixel in the to-be-detected image, based on the YUV component of each pixel in the adjacent area of the target pixel, obtaining a first numerical value indicating the fluctuation degree of a Y component, a second numerical value indicating the fluctuation degree of a U component and a third numerical value indicating the fluctuation degree of a V component; and performing pseudo color detection on the target pixel according to the first value, the second value and the third value. According to the invention, the vacancy of pseudo-color detection in the YUV domain is filled.
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 technologies, and in particular, to a method, apparatus, electronic device, and storage medium for pseudo-color detection. Background Art

[0002] When a camera takes a picture, the imaging system generally focuses on green first. However, due to chromatic aberration of the lens, the blue channel and the red channel cannot be fully accurately focused, and purple-red color fringes appear at the edges of the object, resulting in a pseudo-color phenomenon in the image.

[0003] In addition, in the high-light saturation area and the low-light transition area of the image, due to the high-light overflow (blooming) phenomenon of the image sensor, the pixel quantum well charges in the high-light area are saturated and overflow to adjacent pixel units, causing errors in adjacent pixels, and further leading to a degradation effect at the edges, resulting in a pseudo-color phenomenon in the image.

[0004] The appearance of a pseudo-color phenomenon in the image will cause the intuitive feeling of the image to be distorted and reduce the user experience. Therefore, in order to ensure the image quality and meet the user's requirements for the image quality, it is necessary to perform pseudo-color detection on the image. Summary of the Invention

[0005] To overcome the problems in the related art, the present disclosure provides a method, apparatus, electronic device, and storage medium for pseudo-color detection.

[0006] According to a first aspect of an embodiment of the present disclosure, there is provided a method for pseudo-color detection, including:

[0007] Obtain an image to be detected, where each pixel in the image to be detected corresponds to a YUV component;

[0008] For any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel, obtain a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component;

[0009] Perform pseudo-color detection on the target pixel according to the first value, the second value, and the third value.

[0010] According to a second aspect of an embodiment of the present disclosure, there is provided a pseudo-color detection apparatus, including:

[0011] An image acquisition module, configured to obtain an image to be detected, where each pixel in the image to be detected corresponds to a YUV component;

[0012] A numerical value acquisition module, configured to obtain a first numerical value indicating the fluctuation degree of the Y component, a second numerical value indicating the fluctuation degree of the U component, and a third numerical value indicating the fluctuation degree of the V component for any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel;

[0013] A false color detection module, configured to perform false color detection on the target pixel according to the first numerical value, the second numerical value, and the third numerical value.

[0014] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the false color detection method provided in the first aspect is implemented.

[0015] According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which computer program instructions are stored. When the program instructions are executed by a processor, the false color detection method provided in the first aspect of the present disclosure is implemented.

[0016] This application acquires an image to be detected, and each pixel in the image to be detected corresponds to YUV components; for any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel, a first numerical value indicating the fluctuation degree of the Y component, a second numerical value indicating the fluctuation degree of the U component, and a third numerical value indicating the fluctuation degree of the V component are obtained; false color detection is performed on the target pixel according to the first numerical value, the second numerical value, and the third numerical value, filling the gap in false color detection in the YUV domain.

[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings

[0018] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.

[0019] Figure 1 is a schematic flowchart of a false color detection method shown according to an exemplary embodiment;

[0020] Figure 2 is a schematic diagram of some false color images and the numerical distribution diagrams corresponding to the false color parts in the false color images in a highlight scene shown according to an exemplary embodiment;

[0021] Figure 3 is a schematic diagram of a true color image and the numerical distribution diagram corresponding to the true color part in the true color image shown according to an exemplary embodiment;

[0022] Figure 4It is a schematic flowchart of a pseudo-color detection method shown according to another exemplary embodiment;

[0023] Figure 5 It is a schematic flowchart of a pseudo-color detection method shown according to yet another exemplary embodiment;

[0024] Figure 6 It is a schematic diagram of a pseudo-color map in a non-highlight scene and a numerical distribution map corresponding to the pseudo-color area in the pseudo-color map shown according to an exemplary embodiment;

[0025] Figure 7 It is a schematic flowchart of a pseudo-color detection method shown according to still another exemplary embodiment;

[0026] Figure 8 It is a schematic diagram of some other pseudo-color maps in a highlight scene and a numerical distribution map corresponding to the pseudo-color area in the pseudo-color map shown according to an exemplary embodiment;

[0027] Figure 9 It is a block diagram of a pseudo-color detection device shown according to an exemplary embodiment;

[0028] Figure 10 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners

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

[0030] It should be noted that all actions of obtaining signals, information, or data in the present disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where it is located and obtaining authorization from the owner of the corresponding device.

[0031] Next, the pseudo-color detection method, device, electronic device, and storage medium of the embodiments of the present application will be described with reference to the drawings.

[0032] Figure 1 It is a flowchart of a pseudo-color detection method shown according to an exemplary embodiment.

[0033] The execution subject of the pseudo-color detection method of the embodiments of the present application is a pseudo-color detection device, and this device can be set in an electronic device. The electronic device can be a smart phone, a tablet computer, etc., which are not limited in this embodiment.

[0034] Such asFigure 1 As shown, the method includes the following steps:

[0035] Step 101, obtain the image to be detected, and each pixel in the image to be detected corresponds to a YUV component.

[0036] Optionally, the image to be detected may refer to an image in YUV format. YUV is a type of compiled color space, where "Y" represents luminance, and "U" and "V" represent chrominance, used to describe color and saturation.

[0037] Optionally, the image to be detected may also refer to an image in other formats, such as an image in red green blue (RGB) format. If the image to be detected is an image in other formats, the image to be detected can be converted into a YUV image to obtain the YUV components corresponding to each pixel.

[0038] Step 102, for any target pixel in the image to be detected, based on the YUV components of each pixel in the adjacent region of the target pixel, obtain a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component.

[0039] Pseudo-color generally appears in areas with large color fluctuations. Based on this, the present application proposes to perform pseudo-color detection based on the fluctuation degrees of the Y, U, and V components.

[0040] Optionally, based on the YUV components of each pixel in the adjacent region of the target pixel, obtaining a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component includes at least one of the following: based on the Y components of each pixel in the adjacent region, obtain the Y component mean value, and determine the first value according to the difference between each pixel's Y component and the Y component mean value; based on the U components of each pixel in the adjacent region, obtain the U component mean value, and determine the second value according to the difference between each pixel's U component and the U component mean value; based on the V components of each pixel in the adjacent region, obtain the V component mean value, and determine the third value according to the difference between each pixel's V component and the V component mean value.

[0041] The target pixel may refer to any pixel in the image to be detected, and the adjacent region may refer to a region with a set size centered on the target pixel.

[0042] The adjacent region of the target pixel can be determined using a window with a set size. As an example but not a limitation, the set size can be 3*3.

[0043] The determination methods of the above first value, second value, and third value are the same. In this embodiment, taking the Y component as an example, the determination method of the value indicating the fluctuation degree of each component is described:

[0044] In one implementation manner of the embodiment of the present application, the variance or standard deviation may be calculated according to the difference between the Y component of each pixel and the average value of the Y components to obtain a first value.

[0045] Since the square root operation has a large amount of calculation and also consumes a large amount of hardware resources, in another implementation manner of the embodiment of the present application, the average value is calculated according to the absolute value of the difference between the Y component of each pixel and the average value of the Y components to determine the first value. Specifically, the first value may be determined according to the following formula:

[0046]

[0047] y_std is the first value, n is the total number of pixels in the neighboring region, p y,i is the Y component of the i-th pixel in the neighboring region, mean_value y is the average value of the Y components, and abs is the absolute value function.

[0048] For the convenience of description, the present application denotes the second value as u_std and the third value as v_std.

[0049] Optionally, the larger the first value y_std is, the greater the fluctuation of the Y components of each pixel in the neighboring region can be illustrated. Similarly, the larger the second value u_std is, the greater the fluctuation of the U components of each pixel in the neighboring region can be illustrated. The larger the third value v_std is, the greater the fluctuation of the V components of each pixel in the neighboring region can be illustrated. Among them, the degree of fluctuation can also be understood as the degree of dispersion.

[0050] Step 103, perform pseudo-color detection on the target pixel according to the first value, the second value, and the third value.

[0051] In one implementation manner of the embodiment of the present application, performing pseudo-color detection on the target pixel according to the first value, the second value, and the third value includes: inputting the first value, the second value, and the third value into a trained pseudo-color detection network, and obtaining the pseudo-color detection result output by the pseudo-color detection network for the target pixel.

[0052] Please refer to Figure 2 and Figure 3 , Figure 2 which shows some pseudo-color images in a highlight scene and the numerical distribution diagrams corresponding to the pseudo-color parts in the pseudo-color images, Figure 3 is the true-color image and the numerical distribution diagram corresponding to the true-color part in the true-color image.

[0053] Figure 2 The content boxed by the square box in Figure 3 is the pseudo-color part, and the content boxed by the square box in

[0054] Among them, the pseudo-color areas can include both pseudo-color dots and true-color dots. The value distribution diagram includes three distribution curves corresponding to the first value, the second value, and the third value. The abscissa of the value distribution diagram is the pixel, and the ordinate is the value. As an example, the area sizes corresponding to the pseudo-color areas and the true-color areas can be 5*5, and the value distribution diagram can be obtained based on the first value, the second value, and the third value corresponding to 25 pixels in the corresponding area.

[0055] Compare Figure 2 and Figure 3 with the value distribution diagram in, it can be found that the first value, the second value, and the third value corresponding to the true-color areas and the pseudo-color areas respectively have certain size rules.

[0056] Based on this, in another implementation manner of the embodiment of the present application, pseudo-color detection is performed on the target pixel according to the first value, the second value, and the third value, including: determining a first target value according to the maximum value of the second value and the third value; determining a second target value according to the difference between the second value and the third value; and performing pseudo-color detection on the target pixel based on the size relationships between the first value, the first target value, and the second target value and the corresponding thresholds.

[0057] Optionally, determining the second target value according to the difference between the second value and the third value includes: obtaining the absolute value of the difference between the second value and the third value to obtain the second target value.

[0058] If the size relationships between the first value, the first target value, and the second target value and the corresponding thresholds satisfy the size relationships corresponding to pseudo-color, it can be determined that the target pixel is a pseudo-color dot. If the size relationships between the first value, the first target value, and the second target value and the corresponding thresholds do not satisfy the size relationships corresponding to pseudo-color, it can be determined that the target pixel is not a pseudo-color dot.

[0059] Based on the first value, the second value, and the third value, the present application can perform pseudo-color detection on the target pixel, with simple logic, small computation amount, and being friendly to hardware.

[0060] Optionally, the method further includes: determining a pseudo-color area according to the target pixel determined to be a pseudo-color dot in the image to be detected.

[0061] In one implementation manner of the embodiment of the present application, a binary image having the same size as the image to be detected can be generated according to the pseudo-color detection results corresponding to each pixel in the image to be detected. The pixel value in the binary image indicates whether the pixel at the corresponding position is a pseudo-color dot; connected component analysis is performed on the binary image to obtain at least one pseudo-color area. As an example but not limited thereto, the binary image can include 0 and 1, where 1 indicates that the corresponding pixel is a pseudo-color dot, and 0 indicates that the corresponding pixel is not a pseudo-color dot.

[0062] Optionally, after performing pseudo-color detection on the image to be detected, pseudo-color correction can be performed on the image to be detected according to the pseudo-color detection result.

[0063] In this embodiment, an image to be detected is obtained, and each pixel in the image to be detected corresponds to YUV components; for any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel, a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component are obtained; pseudo-color detection is performed on the target pixel according to the first value, the second value, and the third value. This application performs pseudo-color detection based on YUV components, filling the gap in pseudo-color detection in the YUV domain.

[0064] Figure 4 It is a flowchart of a pseudo-color detection method shown according to an exemplary embodiment.

[0065] As Figure 4 shown, the method includes the following steps:

[0066] Step 401, obtain an image to be detected.

[0067] Step 402, for any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel, obtain a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component.

[0068] Step 403, determine a first target value according to the maximum value of the second value and the third value; determine a second target value according to the difference between the second value and the third value.

[0069] The relevant content in Steps 401 - 403 can refer to the relevant descriptions in Steps 101 - 103, which will not be elaborated here.

[0070] Step 404, when the first target value is greater than the first threshold, the first value is greater than the second threshold, and the second target value is less than or equal to the third threshold, determine that the target pixel is a pseudo-color point.

[0071] Among them, the second threshold is K times the first target value, where K > 1. It should be noted that the value of K can be an integer or a non-integer.

[0072] For ease of description, this application denotes the first target value as max_std, the second target value as std_diff, the first threshold as th1, the second threshold as K * max_std, and the third threshold as th2.

[0073] Compare Figure 2and Figure 3 It can be found that for the pseudo-color points, the corresponding max_std is greater than th1, the y_std is greater than K times the first target value, that is, K*max_std, and the std_diff is less than or equal to th2, while the true-color points do not meet the foregoing conditions.

[0074] Based on this, this application determines whether the target pixel is a pseudo-color point based on the first target value, the second target value, and the magnitude relationship between the first value and the corresponding threshold.

[0075] Among them, th1, K*max_std, and th2 can be empirical thresholds obtained after statistical analysis of a large number of pseudo-color images and true-color images. Based on the empirical thresholds, true-color points and pseudo-color points can be accurately distinguished, and when performing pseudo-color detection, true-color points can be prevented from being misdetected as pseudo-color points.

[0076] In this embodiment, when the first target value is greater than the first threshold, the first value is greater than the second threshold, and the second target value is less than or equal to the third threshold, it is determined that the target pixel is a pseudo-color point. This application can accurately distinguish true-color points and pseudo-color points in a highlight scene, prevent true-color points from being misdetected as pseudo-color points, and has a high accuracy. When performing pseudo-color correction based on the pseudo-color detection result of this application, the problem of color loss caused by pseudo-color misdetection can be avoided.

[0077] Figure 5 is a flowchart of a pseudo-color detection method shown according to an exemplary embodiment.

[0078] As Figure 5 shown, the method includes the following steps:

[0079] Step 501, obtain the image to be detected.

[0080] Step 502, for any target pixel in the image to be detected, based on the YUV components of the pixels in the adjacent region of the target pixel, obtain a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component.

[0081] Step 503, determine the first target value according to the maximum value of the second value and the third value; determine the second target value according to the difference between the second value and the third value.

[0082] The relevant content in Steps 501 - 503 can refer to the relevant descriptions in Steps 101 - 103, which will not be elaborated here.

[0083] Step 504, when the first target value is greater than the first threshold, the first value is less than the fourth threshold, and the second target value is less than or equal to the third threshold, determine that the target pixel is a pseudo-color point.

[0084] Among them, the fourth threshold is L times the third target value, where 0 < L < 1, and the third target value is the minimum of the second value and the third value.

[0085] For ease of description, in this application, the third target value is denoted as min_std, and the fourth threshold is denoted as L * min_std.

[0086] Please refer to Figure 6 , Figure 6 which shows some pseudo-color images in a non-highlight scene and the numerical distribution diagram corresponding to the pseudo-colored areas in the pseudo-color images.

[0087] Analyzing Figure 6 the numerical distribution diagram in, it can be found that in this scene, y_std is less than min_std. The fourth threshold is determined based on min_std to determine whether the target pixel is a pseudo-colored point according to the magnitude relationship between y_std and the fourth threshold.

[0088] To avoid misdetecting the target pixel as a pseudo-colored point when y_std and min_std are close, this application determines L times min_std as the fourth threshold. By way of example and not limitation, the value of L can be 1 / 2.

[0089] In this embodiment, when the first target value is greater than the first threshold, the first value is less than the fourth threshold, and the second target value is less than or equal to the third threshold, the target pixel is determined to be a pseudo-colored point. In addition to the highlight scene, this application can also accurately detect pseudo-colored points in the non-highlight scene, with good versatility.

[0090] Figure 7 is a flowchart of a pseudo-color detection method shown according to an exemplary embodiment.

[0091] As Figure 7 shown, the method includes the following steps:

[0092] Step 701, obtain the image to be detected.

[0093] Step 702, for any target pixel in the image to be detected, based on the YUV components of each pixel in the neighboring region of the target pixel, obtain the first value indicating the degree of fluctuation of the Y component, the second value indicating the degree of fluctuation of the U component, and the third value indicating the degree of fluctuation of the V component.

[0094] Step 703, determine the first target value according to the maximum value of the second value and the third value; determine the second target value according to the difference between the second value and the third value.

[0095] For the relevant content in Steps 701 - 703, reference can be made to the relevant descriptions in Steps 101 - 103, which will not be elaborated here.

[0096] Step 704: When the first target value is greater than the first threshold, the first value is greater than the fifth threshold, the second target value is greater than the third threshold, and the third target value is greater than the sixth threshold, determine that the target pixel is a false color point.

[0097] Among them, the fifth threshold is M times the first target value, where M > K, the sixth threshold is N times the first threshold, where 0 < N < 1, and the third target value is the minimum of the second value and the third value.

[0098] For ease of description, in this application, the fifth threshold is denoted as M * max_std, and the sixth threshold is denoted as N * th1.

[0099] Please refer to Figure 8 , Figure 8 which shows some other false color images in the highlight scene and the numerical distribution diagram corresponding to the false color areas in the false color images.

[0100] For Figure 8 the numerical distribution diagram in, it can be found that in this scene, std_diff is greater than th2.

[0101] To avoid missed detection of false color points in this scene, after a large number of statistical analyses, it is found that when std_diff is greater than th2, y_std is greater than M times max_std, and min_std is greater than N times th1. By way of example and not limitation, M can be 2 times K, and the value of N can be 1 / 3.

[0102] Based on this, this application determines whether the target pixel is a false color point based on the magnitude relationship between the first target value, the second target value, the third target value, and the first value and the corresponding thresholds.

[0103] In this embodiment, when the first target value is greater than the first threshold, the first value is greater than the fifth threshold, the second target value is greater than the third threshold, and the third target value is greater than the sixth threshold, determine that the target pixel is a false color point. This application can perform false color detection on some special images in the highlight scene, improving the recall rate of the detection method of this application.

[0104] In one implementation manner of the embodiment of this application, in combination with the foregoing embodiments, this application can perform false color detection on the target pixel according to the following detection method:

[0105] Detect whether the first target value is greater than the first threshold, and detect whether the first value is greater than the second threshold or detect whether the first threshold is less than the fourth threshold.

[0106] When the first target value is greater than the first threshold and the first value is greater than the second threshold, or when the first target value is greater than the first threshold and the first value is less than the fourth threshold, detect whether the second target value is less than or equal to the third threshold.

[0107] When the second target value is less than or equal to the third threshold, determine that the target pixel is a false color point.

[0108] When the second target value is greater than the third threshold, detect whether the first value is greater than the fifth threshold and detect whether the third target value is greater than the sixth threshold.

[0109] When the first value is greater than the fifth threshold and the third target value is greater than the sixth threshold, determine that the target pixel is a false color point.

[0110] This application first detects the magnitude relationship between the first target value and the first value and the corresponding thresholds, then detects the magnitude relationship between the second target value and the corresponding threshold, and finally, based on the magnitude relationship between the second target value and the corresponding threshold, determines whether it is necessary to further detect the magnitude relationship between the first value and the third target value and the corresponding thresholds, which can improve the false color detection efficiency with less hardware resources consumed.

[0111] To implement the above embodiments, an embodiment of this application also proposes a false color detection device.

[0112] Figure 9 It is a schematic structural diagram of a false color detection device provided by an embodiment of this application.

[0113] As Figure 9 shown, the false color detection device 900 may include:

[0114] An image acquisition module 901, configured to acquire an image to be detected, and each pixel in the image to be detected corresponds to a YUV component;

[0115] A value acquisition module 902, configured to, for any target pixel in the image to be detected, based on the YUV components of each pixel in the adjacent region of the target pixel, acquire a first value indicating the degree of fluctuation of the Y component, a second value indicating the degree of fluctuation of the U component, and a third value indicating the degree of fluctuation of the V component;

[0116] A false color detection module 903, configured to perform false color detection on the target pixel according to the first value, the second value, and the third value.

[0117] In an implementation manner of the embodiment of this application, the false color detection module 903 is further configured to:

[0118] Determine the first target value according to the maximum value of the second value and the third value;

[0119] Determine a second target value according to the difference between the second value and the third value;

[0120] Based on the magnitude relationship between the first value, the first target value, and the second target value and their corresponding thresholds, perform pseudo-color detection on the target pixel.

[0121] In an implementation manner of the embodiment of the present application, the pseudo-color detection module 903 is further configured to:

[0122] When the first target value is greater than the first threshold, the first value is greater than the second threshold, and the second target value is less than or equal to the third threshold, determine that the target pixel is a pseudo-color point;

[0123] Wherein, the second threshold is K times the first target value, and K>1.

[0124] In an implementation manner of the embodiment of the present application, the pseudo-color detection module 903 is further configured to:

[0125] When the first target value is greater than the first threshold, the first value is less than the fourth threshold, and the second target value is less than or equal to the third threshold, determine that the target pixel is a pseudo-color point;

[0126] Wherein, the fourth threshold is L times the third target value, 0<L<1, and the third target value is the minimum value of the second value and the third value.

[0127] In an implementation manner of the embodiment of the present application, the pseudo-color detection module 903 is further configured to:

[0128] When the first target value is greater than the first threshold, the first value is greater than the fifth threshold, the second target value is greater than the third threshold, and the third target value is greater than the sixth threshold, determine that the target pixel is a pseudo-color point;

[0129] Wherein, the fifth threshold is M times the first target value, M>K, the sixth threshold is N times the first threshold, 0<N<1, and the third target value is the minimum value of the second value and the third value.

[0130] In an implementation manner of the embodiment of the present application, the value acquisition module 902 is further configured to:

[0131] Based on the Y components of the pixels in the adjacent region, obtain the Y component mean value, and determine the first value according to the difference between the Y component of each pixel and the Y component mean value;

[0132] Based on the U components of the pixels in the adjacent region, obtain the U component mean value, and determine the second value according to the difference between the U component of each pixel and the U component mean value;

[0133] Based on the V components of each pixel in the adjacent region, obtain the average value of the V components, and determine a third value according to the difference between the V component of each pixel and the average value of the V components.

[0134] In an implementation manner of the embodiments of the present application, the device further includes a region determination module, configured to:

[0135] Determine a pseudo-color region according to the target pixels determined as pseudo-color points in the image to be detected.

[0136] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0137] To implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing method embodiments is implemented.

[0138] Figure 10 It is a block diagram of an electronic device provided in an embodiment of the present application. For example, the electronic device 1000 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.

[0139] Refer to Figure 10 , the electronic device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power component 1006, a multimedia component 1008, an audio component 1010, an input / output (I / O) interface 1012, a sensor component 1014, and a communication component 1016.

[0140] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, telephone call, data communication, camera operation, and recording operation. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.

[0141] The memory 1004 is configured to store various types of data to support the operation of the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, and the like. The memory 1004 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, a magnetic disk, or an optical disk.

[0142] The power component 1006 provides power to various components of the electronic device 1000. The power component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 1000.

[0143] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 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 can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of the touch or swipe actions but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0144] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 1004 or transmitted via the communication component 1016. In some embodiments, the audio component 1010 further includes a speaker for outputting audio signals.

[0145] The I / O interface 1012 provides an interface between the processing component 1002 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power-on button, and a lock button.

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

[0147] The communication component 1016 is configured to facilitate communication between the electronic device 1000 and other devices in a wired or wireless manner. The electronic device 1000 can access a wireless network based on communication standards, such as WiFi, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 1016 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 1016 further 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.

[0148] In an exemplary embodiment, the electronic device 1000 can 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 for performing the above method.

[0149] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the above instructions can be executed by a processor 1020 of the electronic device 1000 to complete the above 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, and an optical data storage device, etc.

[0150] To implement the above embodiments, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the foregoing method embodiments is implemented.

[0151] To implement the above embodiments, the present application also provides a computer program product, on which a computer program is stored. When the computer program is executed by a processor, the method described in the foregoing method embodiments is implemented.

[0152] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without conflict, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0153] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be construed as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present application, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0154] Any process or method description shown in the flowchart or described in other ways herein may be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logic function or process. The scope of the preferred embodiments of the present application includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in an order opposite to that shown or discussed, according to the functions involved, which should be understood by those skilled in the art to which the embodiments of the present application pertain.

[0155] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.

[0156] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0157] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0158] In addition, each functional unit in various embodiments of the present application may be integrated into a processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0159] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

[0160] Those skilled in the art will readily conceive of 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, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.

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

Claims

1. A pseudo-color detection method, characterized in that, it includes: obtaining an image to be detected, where each pixel in the image to be detected corresponds to YUV components; for any target pixel in the image to be detected, based on the YUV components of each pixel in the adjacent region of the target pixel, obtaining a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component; performing pseudo-color detection on the target pixel according to the first value, the second value, and the third value.

2. The method according to claim 1, characterized in that, the performing pseudo-color detection on the target pixel according to the first value, the second value, and the third value includes: determining a first target value according to the maximum value of the second value and the third value; determining a second target value according to the difference between the second value and the third value; performing pseudo-color detection on the target pixel based on the size relationships between the first value, the first target value, and the second target value and their corresponding thresholds.

3. The method according to claim 2, characterized in that, the performing pseudo-color detection on the target pixel based on the size relationships between the first value, the first target value, and the second target value and their corresponding thresholds includes: when the first target value is greater than a first threshold, the first value is greater than a second threshold, and the second target value is less than or equal to a third threshold, determining that the target pixel is a pseudo-color point; wherein, the second threshold is K times the first target value, and K>1.

4. The method according to claim 2, characterized in that, the performing pseudo-color detection on the target pixel based on the size relationships between the first value, the first target value, and the second target value and their corresponding thresholds includes: when the first target value is greater than the first threshold, the first value is less than a fourth threshold, and the second target value is less than or equal to the third threshold, determining that the target pixel is a pseudo-color point; wherein, the fourth threshold is L times a third target value, 0<L<1, and the third target value is the minimum value of the second value and the third value.

5. The method according to claim 3, characterized in that, the performing pseudo-color detection on the target pixel based on the size relationships between the first value, the first target value, and the second target value and their corresponding thresholds includes: when the first target value is greater than the first threshold, the first value is greater than a fifth threshold, the second target value is greater than the third threshold, and a third target value is greater than a sixth threshold, determining that the target pixel is a pseudo-color point; wherein, the fifth threshold is M times the first target value, M>K, the sixth threshold is N times the first threshold, 0<N<1, and the third target value is the minimum value of the second value and the third value.

6. The method according to claim 1, characterized in that, Obtaining a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component based on the YUV components of each pixel in the neighboring region of the target pixel includes at least one of the following: Based on the Y components of each pixel in the neighboring region, obtaining a mean value of the Y components, and determining the first value according to the difference between the Y component of each pixel and the mean value of the Y components; Based on the U components of each pixel in the neighboring region, obtaining a mean value of the U components, and determining the second value according to the difference between the U component of each pixel and the mean value of the U components; Based on the V components of each pixel in the neighboring region, obtaining a mean value of the V components, and determining the third value according to the difference between the V component of each pixel and the mean value of the V components.

7. The method according to any one of claims 1-6, wherein, the method further includes: Determining a pseudo-color region according to the target pixel determined as a pseudo-color point in the image to be detected.

8. A pseudo-color detection device, wherein, it includes: An image acquisition module for acquiring an image to be detected, where each pixel in the image to be detected corresponds to YUV components; A value acquisition module for, for any target pixel in the image to be detected, obtaining a first value indicating the fluctuation degree of the Y component, a second value indicating the fluctuation degree of the U component, and a third value indicating the fluctuation degree of the V component based on the YUV components of each pixel in the neighboring region of the target pixel; A pseudo-color detection module for performing pseudo-color detection on the target pixel according to the first value, the second value, and the third value.

9. An electronic device, wherein, it includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method according to any one of claims 1-7 is implemented.

10. A computer-readable storage medium, on which computer program instructions are stored, wherein, when the program instructions are executed by a processor, the method according to any one of claims 1-7 is implemented.