Image optimization method and image sensing device

By calculating the variance value and direction probability of each pixel in the image, combined with the color difference information, the false color probability is determined and the image is optimized, which solves the problem of inaccurate false color suppression in the existing technology and achieves efficient false color suppression of the image. , improved image quality.

CN118382011BActive Publication Date: 2024-09-06上海为旌科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410797077.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-06
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Existing technology is difficult to effectively suppress the false color phenomenon in images, especially in the process of color image processing and color space conversion. Common false color suppression strategies are not accurate enough in detection, and are prone to false detection or missed detection, affecting the image effect.

Method used

By obtaining the variance value and direction probability of each pixel in the target image, combined with the color difference information, the pseudo color probability is divided, and the image is optimized according to the final pseudo color probability. The specific steps include calculating the variance value, direction probability and color difference gradient value, and determining The false color probability of each pixel is used to optimize the image and reduce false color performance.

Benefits of technology

This method can be flexibly embedded in different stages of image processing, accurately identify and suppress false colors, reduce false detections and missed detections, improve image quality, and optimize the entire image without causing too many side effects on the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118382011B
    Figure CN118382011B
Patent Text Reader

Abstract

The present application provides an image optimization method and an image sensing device, and relates to the field of image processing. The method comprises: obtaining the variance value of the area corresponding to each pixel in the target image; dividing the variance value of the area corresponding to each pixel based on the variance threshold, and determining the first pseudo-color probability of each pixel in the target image; multiplying the direction probability of each pixel in the target image in each direction with the color difference mean of the corresponding direction, and obtaining the color difference gradient value of each pixel in the target image; dividing the color difference gradient value of each pixel based on the gradient threshold, and determining the second pseudo-color probability of each pixel in the target image; determining the final pseudo-color probability of each pixel in the target image based on the first pseudo-color probability and the second pseudo-color probability, and optimizing the target image according to the final pseudo-color probability. The present method can optimize different target images, take the pixel as the basic unit, and combine the direction probability, variance and color difference information to reduce the pseudo-color performance in the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to image optimization methods and image sensing devices. Background Art

[0002] A color channel refers to a part of the different color information separated from an image. In common color images, three basic color channels, red (R), green (G), and blue (B), are usually used to represent the color information in the image. Due to cost and volume considerations, most digital cameras can only obtain one color channel value at each pixel, and the remaining two color channel values ​​are determined by the color filter array (CFA) and interpolation algorithm. Pseudo color that may appear during the interpolation process will affect the presentation of the image. In addition, when performing color space conversion, such as converting from RGB to YUV format, pseudo color still exists. How to suppress pseudo color in images is an urgent problem to be solved. Summary of the invention

[0003] In view of this, the present application discloses an image optimization method and an image sensing device for suppressing pseudo colors in a target image.

[0004] In a first aspect, the present application discloses an image optimization method for suppressing pseudo-color in a target image, wherein the target image is an original image, a red, green, and blue image, or a brightness-chrominance image, and the method comprises: obtaining variance values ​​of regions corresponding to respective pixels in the target image; dividing the variance values ​​of regions corresponding to respective pixels based on a first variance threshold and a second variance threshold, and determining a first pseudo-color probability of respective pixels in the target image; multiplying the direction probability of respective pixels in the target image in respective directions by the color difference mean of the corresponding directions, and obtaining a color difference gradient value of respective pixels in the target image; dividing the color difference gradient values ​​of respective pixels based on a first gradient threshold and a second gradient threshold, and determining a second pseudo-color probability of respective pixels in the target image; determining a final pseudo-color probability of respective pixels in the target image based on the first pseudo-color probability and the second pseudo-color probability, and optimizing the target image according to the final pseudo-color probability.

[0005] Optionally, when the target image is an original image or a red, green and blue image, the variance value of the area corresponding to each pixel point in the target image is obtained, including: selecting any pixel point in the target image as the center point, and determining a window of a preset size range in the target image; respectively calculating the red channel variance, green channel variance and blue channel variance in the window; using the green channel variance in the green channel value weight conversion window, the red channel variance in the red channel value weight conversion window and the blue channel variance in the blue channel value weight conversion window, adding the converted results to obtain the variance value of the area corresponding to the center point; repeatedly selecting the center point and calculating until the variance value of the area corresponding to each pixel point in the target image is obtained.

[0006] Optionally, when the target image is a luminance-chrominance image, the variance value of the area corresponding to each pixel in the target image is obtained, including: selecting any pixel in the target image as the center point, and determining a window of a preset size range in the target image; based on the luminance channel value of each pixel in the window, calculating the luminance channel variance in the window, and obtaining the variance value of the area corresponding to the center point; repeatedly selecting the center point and calculating until the variance value of the area corresponding to each pixel in the target image is obtained.

[0007] Optionally, the first variance threshold is less than the second variance threshold, and the variance value of the area corresponding to each pixel is divided based on the first variance threshold and the second variance threshold to determine the first pseudo-color probability of each pixel in the target image, including: when the variance value of the area corresponding to the pixel is less than or equal to the first variance threshold, the corresponding first pseudo-color probability is 0; when the variance value of the area corresponding to the pixel is greater than or equal to the second variance threshold, the corresponding first pseudo-color probability is 1; when the variance value of the area corresponding to the pixel is greater than the first variance threshold and less than the second variance threshold, the corresponding first pseudo-color probability is the quotient of the first variance intermediate value and the second variance intermediate value; wherein the first variance intermediate value is the difference between the variance value of the area corresponding to the pixel and the first variance threshold, and the second variance intermediate value is the difference between the second variance threshold and the first variance threshold.

[0008] Optionally, the image optimization method further includes: converting the directional probability of each pixel point in the target image in each direction to enhance the texture area of ​​the target image.

[0009] Optionally, the directional probability of each pixel point in the target image in each direction is multiplied by the mean color difference in the corresponding direction to obtain the color difference gradient value of each pixel point in the target image, including: selecting any pixel point in the target image as the center point, and determining a window of a preset size range in the target image; based on the color difference of each pixel point in the window, obtaining the mean red color difference and the mean blue color difference in each direction; multiplying the directional probability in each direction by the mean red color difference in the corresponding direction to obtain the red color difference gradient value of each pixel point in the target image; multiplying the directional probability in each direction by the mean blue color difference in the corresponding direction to obtain the blue color difference gradient value of each pixel point in the target image.

[0010] Optionally, the first gradient threshold is less than the second gradient threshold, and the color difference gradient value of the pixel point is the larger value of the red color difference gradient value and the blue color difference gradient value of the pixel point; the color difference gradient value of each pixel point is divided based on the first gradient threshold and the second gradient threshold, and the second pseudo-color probability of each pixel point in the target image is determined, including: when the color difference gradient value of the pixel point is less than or equal to the first gradient threshold, the corresponding second pseudo-color probability is 0; when the color difference gradient value of the pixel point is greater than or equal to the second gradient threshold, the corresponding second pseudo-color probability is 1; when the color difference gradient value of the pixel point is greater than the first gradient threshold and less than the second gradient threshold, the corresponding second pseudo-color probability is the quotient of the first gradient intermediate value and the second gradient intermediate value; wherein the first gradient intermediate value is the difference between the gradient value of the area corresponding to the pixel point and the first gradient threshold, and the second gradient intermediate value is the difference between the second gradient threshold and the first gradient threshold.

[0011] Optionally, a final pseudo-color probability of each pixel in the target image is determined based on the first pseudo-color probability and the second pseudo-color probability, including: determining a pseudo-color suppression strength, multiplying the pseudo-color suppression strength, the first pseudo-color probability and the second pseudo-color probability to determine the final pseudo-color probability of each pixel in the target image, wherein the value of the pseudo-color suppression strength is between 0 and 1.

[0012] Optionally, optimizing the target image according to the final pseudo-color probability includes: when the target image is an original image or a red, green and blue image, calculating a first difference between a red channel value and a green channel value and a second difference between a blue channel value and a green channel value of any pixel in the target image, optimizing the red channel value based on the green channel value in combination with the final pseudo-color probability and the first difference, optimizing the blue channel value based on the green channel value in combination with the final pseudo-color probability and the second difference, and repeating the above steps until all pixels in the target image are optimized; when the target image is a luminance-chrominance image, the luminance channel value of each pixel in the target image remains unchanged, and the final pseudo-color probability is used to optimize the blue chrominance component and the red chrominance component of each pixel.

[0013] In a second aspect, the present application discloses an image sensing device, comprising: a photosensitive element for sensing light signals and converting the light signals into electrical signals, wherein the electrical signals include image data of a target image; and an image processing device for executing the image optimization method disclosed in the first aspect above to suppress pseudo-color in the target image.

[0014] In summary, the image optimization method and image sensing device disclosed in this application have at least the following beneficial effects:

[0015] (1) This image optimization method can process different input images and can be flexibly embedded in different stages of image processing. At the same time, the directional probability information is combined with the variance and color difference information to greatly reduce the false detection and missed detection that may occur during the pseudo-color suppression process, thereby reducing the pseudo-color performance in the image.

[0016] (2) During the optimization process, the pixel is taken as the basic unit, and the pseudo-color probability is calculated for each pixel in the image. Each pixel is optimized accordingly, thereby achieving the effect of optimizing the entire image. This optimization process has a good effect on suppressing pseudo-color and will not produce too many side effects on the image itself. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The following is a brief introduction to the drawings used in describing the embodiments of the present application:

[0018] Figure 1 is a schematic diagram of an image optimization method provided in an embodiment of the present application;

[0019] Figure 2 is a schematic diagram of another image optimization method provided in an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of another image optimization method provided in an embodiment of the present application;

[0021] Figure 4 It is a window example provided in the embodiment of the present application;

[0022] Figure 5 is another window example provided in the embodiment of the present application;

[0023] Figure 6 It is another window example provided in the embodiment of the present application;

[0024] Figure 7 It is a structural schematic diagram of an image sensing device provided in an embodiment of the present application.

[0025] In the figure: 70 - image sensing device, 71 - lens, 72 - photosensitive element, 73 - image processing device. DETAILED DESCRIPTION

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the specific implementation methods of the present application will be described below with reference to the accompanying drawings. The accompanying drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other accompanying drawings and other implementation methods can be obtained based on these drawings without creative work. Adjustments and improvements made without departing from the concept of the present application are all within the scope of protection of the present application.

[0027] In order to simplify the drawings, only the parts related to the corresponding embodiments are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, only part of the components with the same structure or function in some figures are schematically drawn, and there may be more or fewer components with the same structure or function in reality.

[0028] In this application, unless otherwise clearly specified and limited, ordinal numbers, such as "first", "second", etc., are only used to distinguish and describe associated objects, and cannot be understood as indicating or implying the relative importance or order between associated objects; in addition, they do not represent the number of associated objects. "Multiple" includes two or more, and other quantifiers are similar. " / " is used to describe the relationship between associated objects, which indicates the "or" relationship between associated objects. "And / or" is used to describe the relationship between associated objects, which includes any combination relationship between associated objects, such as "a and / or b" includes: "alone a", "alone b", or "a and b". "One or more" or "at least one" in multiple objects refers to any object or any combination of multiple objects, such as "one or more of a1, a2, a3" or "at least one of a1, a2, a3" includes: "alone a1", "alone a2", "alone a3", "a1 and a2", "a1 and a3", "a2 and a3", or "a1, a2 and a3".

[0029] In the image signal processing (ISP) process, images of different data formats can be processed. For example, the image sensor captures the original image (such as a raw image), and after the ISP pipeline demosaic, white balance, and color correction operations, a red, green, and blue image (RGB image) is generated. Then, in the process of video processing or transmission, the RGB image can be converted into a luminance-chrominance image (YUV image) for compression and transmission.

[0030] In the process of converting a raw image to an RGB image, since the raw image is composed of several pixels, each pixel generally has only one color channel value, such as a green channel value, a red channel value, or a blue channel value, various interpolation algorithms (such as the nearest neighbor method, bilinear interpolation, or bicubic interpolation) can be used to convert it into a color image. For example, in the Bayer pattern, each pixel can only sense one of red, green, or blue. The remaining two color channel values ​​can be interpolated through the structure and algorithm of the color filter array (CFA) to obtain the RGB image corresponding to the raw image. The raw image and the interpolated RGB color image have the same number of pixels. The difference between them is that each pixel in the raw image has one color channel value, while the RGB color image has three color channel values ​​of red, green, and blue. Therefore, the image effect of the RGB color image is better and can better show the photographed object. However, in this case, the red filter and the blue filter are arranged in an interleaved manner. This means that in the interpolation process, the pixels of the red and blue channels need to be estimated alternately. Since the color information of adjacent pixels is complementary, errors are prone to occur during interpolation, especially between pixels in the red and blue channels. When the demosaicing algorithm incorrectly interpolates pixels in the red and blue channels, it causes color shift or false color in the image; this phenomenon is particularly noticeable in image areas with rich details, because the demosaicing algorithm is more likely to make incorrect color estimates in these areas.

[0031] The above example shows that pseudo color may occur due to interpolation errors when converting a raw image to an RGB image; in addition, pseudo color may also occur during the conversion of an RGB image to a YUV image. The conversion between RGB images and YUV images usually uses a linear transformation formula to convert the color components in the RGB image to the color components in the YUV image. In order to reduce the amount of data, the chroma components (U and V) in the YUV image are subsampled. During the subsampling process, the resolution of the chroma components is reduced, especially in high-frequency areas, which can lead to loss of details and color distortion, which is specifically manifested as chroma aliasing and / or blurred color edges; in this way, pseudo color appears in the YUV image.

[0032] In addition, pseudo-color may also appear in other cases such as when converting YUV images to RGB images, which will not be listed here one by one. In short, pseudo-color may appear in each process of image processing. Because pseudo-color usually manifests as color distortion, color blocks and unnatural color boundaries, it will greatly affect the image effect. However, common pseudo-color suppression strategies are not good enough for pseudo-color detection, and are prone to false detection or missed detection. Therefore, there is an urgent need for a pseudo-color suppression method with high detection accuracy to suppress pseudo-color that may appear in the image.

[0033] In one embodiment, please refer to Figure 1 , which shows a schematic diagram of an image optimization method provided by an embodiment of the present application. Figure 1 As shown, an image optimization method is used to suppress pseudo-color in a target image, where the target image is an original image, a red, green, and blue image, or a brightness-chrominance image, and the method comprises:

[0034] S100, obtaining the variance value of the area corresponding to each pixel point in the target image;

[0035] S200, dividing the variance value of the area corresponding to each pixel point based on the first variance threshold and the second variance threshold, and determining a first pseudo-color probability of each pixel point in the target image;

[0036] S300, multiplying the direction probability of each pixel point in the target image in each direction by the color difference mean value of the corresponding direction to obtain the color difference gradient value of each pixel point in the target image;

[0037] S400, dividing the color difference gradient value of each pixel point based on the first gradient threshold and the second gradient threshold value, and determining a second pseudo color probability of each pixel point in the target image;

[0038] S500, determining a final pseudo color probability of each pixel in a target image based on the first pseudo color probability and the second pseudo color probability, and optimizing the target image according to the final pseudo color probability.

[0039] Based on the above description, the target image mentioned in the present application can be an unprocessed raw image captured by the image acquisition device, or it can be an RGB image or YUV image that has been partially processed. Moreover, the image optimization method disclosed in the present application can be flexibly set in the process of ISP, without being restricted to a certain location node. For example, when the target image is a raw image, the image optimization method can be set before the de-mosaicing operation, that is, to suppress the pseudo-color that may exist in the raw image in advance, so as to reduce the resources consumed by the subsequent suppression of pseudo-color, so that the output is a raw image that has completed the suppression of pseudo-color; when the target image is a raw image, the image optimization method can also be set in the process of performing de-mosaicing, so that the interpolation operation and the suppression of pseudo-color are performed simultaneously, and finally the RGB image that has completed the suppression of pseudo-color is output. Therefore, it can be decided where to set the image optimization method disclosed in the present application according to actual needs.

[0040] Different from the prior art that performs pseudo-color suppression based on the entire image or a set of several pixel points, the present application performs pseudo-color suppression based on each pixel point in the target image; the pseudo-color probability is calculated for each pixel point in the image, and each pixel point is optimized accordingly, thereby achieving the effect of optimizing the entire image. Such an optimization process has a good pseudo-color suppression effect and will not produce too many side effects on the image itself.

[0041] Exemplarily, the present application obtains the variance value of the area corresponding to each pixel in the target image, and divides the variance value of the area corresponding to each pixel based on the first variance threshold and the second variance threshold, and determines the first pseudo-color probability of each pixel in the target image. By calculating the variance of the image block, the flat area and the texture area in the image can be preliminarily distinguished, so that it is convenient to perform further operations on the texture area later. In the image, the pixel value change in the flat area is small, so the variance is low, and these areas are usually parts with uniform tones, such as blue sky, walls, etc.; while the pixel value change in the texture area is large, so the variance is high, and these areas contain more details and complex structures, such as grass, leaves, fabrics, etc. Because the texture area contains high-frequency details and complex color changes, while the flat area is relatively simple, and the color and brightness change less, the texture area is more likely to have pseudo-color than the flat area, and it should be paid more attention in the process of pseudo-color suppression. By distinguishing the flat area and the texture area of ​​the target image through a given variance threshold, the probability of pseudo-color appearing in each pixel (that is, the above first pseudo-color probability) can be preliminarily obtained.

[0042] At the same time, the present application multiplies the direction probability of each pixel in the target image in each direction with the color difference mean of the corresponding direction to obtain the color difference gradient value of each pixel in the target image, and divides the color difference gradient value of each pixel based on the first gradient threshold and the second gradient threshold to determine the second pseudo-color probability of each pixel in the target image. In fact, the order of determining the first pseudo-color probability and the second pseudo-color probability is not fixed, and their order can be determined according to actual needs, and the two can also be performed simultaneously. In this embodiment, the calculation of variance information is preferentially performed to distinguish the distribution of flat areas and texture areas as early as possible, so that there is no need to consume hardware resources in the flat area to perform further operations. By multiplying the direction probability of the current pixel with the color difference mean of the corresponding direction, the direction information and color difference information of each pixel in the target image are combined. In image processing, the direction probability describes the distribution of pixels in different directions. It is usually used to analyze the texture and structure of the image and help identify the main directional features in the image. The direction of the pixel is usually represented by its gradient direction. The image gradient is a vector that represents the direction and amplitude of the pixel value change. By calculating the gradient direction, the direction information of each pixel can be obtained. After determining the color difference gradient value of each pixel in the target image, the color difference gradient value corresponding to each pixel is divided based on a pre-set gradient threshold to determine the second pseudo-color probability of each pixel in the target image. Since the calculation of the color difference gradient value can accurately identify the areas with drastic color changes in the image, that is, the high-frequency detail areas, and these areas are usually prone to pseudo-color, the pseudo-color probability can be calculated by dividing the color difference gradient value corresponding to each pixel. For areas with a high pseudo-color probability, the pseudo-color phenomenon can be effectively reduced, making the image color more realistic and natural; for areas with a low pseudo-color probability, more image details and texture information can be retained without losing details due to excessive processing.

[0043] The first pseudo-color probability and the second pseudo-color probability of each pixel in the target image calculated above are combined to determine the final pseudo-color probability of each pixel, and each pixel in the target image is optimized according to the final pseudo-color probability, thereby achieving the effect of optimizing the entire target image.

[0044] The image optimization method in the present embodiment can process different input images (raw images, RGB images or YUV images), and is flexibly embedded in different stages of image processing. The variance, directional probability and color difference information in the target image are combined, which greatly reduces the possible false detection and missed detection in the pseudo-color suppression process, reduces the pseudo-color performance in the image, and enhances the image quality. In addition, in the optimization process, taking the pixel as the basic unit, the pseudo-color probability is calculated respectively for each pixel in the image, and each pixel is optimized with this, so as to achieve the effect of optimizing the entire image, such an optimization process is very good at suppressing the pseudo-color, and because too many operations are not performed for the area where the pseudo-color probability is low, too many side effects will not be produced to the image itself.

[0045] The image optimization method disclosed in the present application can suppress pseudo-color of raw images, RGB images or YUV images, but the specific operation steps are slightly different among the three, which will be described separately in the following implementation manner.

[0046] In some embodiments, please refer to Figure 2 , which shows a schematic diagram of another image optimization method provided by an embodiment of the present application. Figure 2 As shown, when the target image is an original image or a red, green and blue image, the variance value of the area corresponding to each pixel point in the target image is obtained, including:

[0047] S110, selecting any pixel point in the target image as a center point, and determining a window of a preset size range in the target image;

[0048] S120, respectively calculating the red channel variance, the green channel variance and the blue channel variance in the window;

[0049] S130, using the green channel variance in the green channel value weight conversion window, the red channel variance in the red channel value weight conversion window, and the blue channel variance in the blue channel value weight conversion window, adding the converted results to obtain the variance value of the area corresponding to the center point;

[0050] S140, repeatedly selecting a center point and calculating until the variance value of the area corresponding to each pixel point in the target image is obtained.

[0051] For raw images and RGB images, they have certain similarities: each of their pixels includes at least one of the red channel, green channel or blue channel, so they can be discussed together when calculating the variance.

[0052] First, select any pixel point in the target image as the center point, and determine a window of a preset size range in the target image. Exemplarily, assuming that there are M*N pixels in the target image, select any pixel point (m, n) in the target image as the center point, where 0<=m<=M-1, 0<=n<=N-1. With (m, n) as the center, select a window of a preset size range. The size of the window can be set by the user according to actual conditions, and there is no restriction here. The size of the window can be set to an odd number of squares such as 3*3, 5*5, or 7*7 to facilitate subsequent unified calculations. In order to more clearly illustrate this embodiment, take a window size of 5*5 as an example. At this time, there are at most 25 pixels in the window. In this way, the position of the window in the target image is determined: that is, the area surrounded by (m-4, n-4), (m-4, n+4), (m+4, n+4) and (m+4, n-4); if the pixels in the window are outside the range of the target image, such as m-4<0, n-4<0, m+4>M or n+4>N, the pixels outside these ranges can be ignored and not included in the calculation. If the window size is other values, the above method can also be used to determine the actual pixels included in the calculation.

[0053] After determining the window range, calculate the red channel variance, green channel variance, and blue channel variance in the window respectively. Continue to use the above window as an example for explanation. For the raw image, take the calculation of the red channel variance in the window as an example, and the calculation formula is as follows: , , where R i is one of all the pixels with red channel values ​​in the window, N is the total number of pixels with red channel values ​​in the window, is the mean of the red channel values, is the red channel variance. Similarly, the green channel variance and the blue channel variance can be calculated by referring to the calculation method of the red channel variance, which will not be repeated here. The red channel variance, green channel variance and blue channel variance calculated in the above steps are mixed to obtain the variance value of the area corresponding to the current pixel point. The current pixel point is the center point (m, n) of the above window. Corresponding to each color, there is a respective channel value weight. The conversion formula is as follows: , ,in, is the red channel value weight, is the green channel value weight, is the blue channel value weight, S is the variance value of the area corresponding to the center point, they are respectively combined with the red channel variance, green channel variance and blue channel variance calculated above, and finally the variance value of the area corresponding to the center point is obtained by combination, and the variance value is corresponded to the center point. Select other pixel points in the target image as the center point and repeat the above calculation process, so that the variance value of the area corresponding to each pixel point in the target image can be calculated. The order of selecting the center point can be set by the user. Exemplarily, the variance value of the area corresponding to each pixel point in the target image can be calculated in sequence: that is, (0, 0), (0, 1)...(0, N), (1, 0)...(1, N)...(M, N).

[0054] When the target image is an RGB image, the processing method is the same as the above raw image, so it will not be repeated here. The only difference is that each pixel in the RGB image has a red channel value, a green channel value, and a blue channel value. For example, when calculating the variance of the red channel in the window of the raw image, the pixels with green channel values ​​or blue channel values ​​in the window do not need to be taken into account; for RGB images, when calculating the variance of each color, each pixel in the window needs to be taken into account.

[0055] In some embodiments, please refer to Figure 3 , which shows a schematic diagram of another image optimization method provided by an embodiment of the present application. Figure 3 As shown, when the target image is a brightness-chrominance image, the variance value of the area corresponding to each pixel in the target image is obtained, including:

[0056] S150, selecting any pixel point in the target image as a center point, and determining a window of a preset size range in the target image;

[0057] S160, calculating the brightness channel variance in the window based on the brightness channel value of each pixel point in the window, and obtaining the variance value of the area corresponding to the center point;

[0058] S170, repeatedly selecting a center point and calculating until the variance value of the area corresponding to each pixel point in the target image is obtained.

[0059] Unlike raw images or RGB images, when the target image is a YUV image, the calculation of the variance only needs to consider the Y channel value, because the Y channel represents brightness information. The YUV color space separates the brightness information and chromaticity information of the image, where the Y channel represents brightness (or grayscale) information, and the U and V channels represent chromaticity information. The brightness information of the image usually has a greater impact on the visual perception of the human eye, while the chromaticity information is relatively minor. Therefore, when calculating the variance, focusing on the Y channel can well reflect the brightness changes of the image. In addition, only considering the Y channel to calculate the variance can simplify the calculation process, because the amount of data processed for one channel is less than the amount of data processed for three channels. Doing so not only improves the calculation efficiency, but also usually does not significantly lose information, because the brightness variance can already well reflect the overall change trend of the image. In summary, only the Y channel is considered when calculating the variance of the YUV image because the Y channel contains the main brightness information, which is crucial to the visual perception and analysis of the image. At the same time, this approach can also simplify the calculation process without significantly affecting the validity of the results.

[0060] The operations related to selecting the center point and determining the window of the preset size range can refer to the above implementation method, which will not be repeated here. When calculating the variance, based on the brightness channel value of each pixel point in the window, the brightness channel variance in the window is calculated to obtain the variance value of the area corresponding to the center point. The calculation formula is: , Among them, Y i is one of the Y channel values ​​of all pixels in the window, and N is the total number of pixels in the window. is the mean value of the brightness channel, is the brightness channel variance.

[0061] Then, the above operation is repeated until the variance calculation is performed for each pixel point in the target image. In this way, when the target image is a YUV image, the variance value of the area corresponding to each pixel point in the target image can be obtained.

[0062] In some embodiments, the first variance threshold is less than the second variance threshold, and based on the first variance threshold and the second variance threshold, the variance values of the regions corresponding to each pixel are divided to determine the first pseudo-color probability of each pixel in the target image, including: when the variance value of the region corresponding to the pixel is less than or equal to the first variance threshold, the corresponding first pseudo-color probability is 0; when the variance value of the region corresponding to the pixel is greater than or equal to the second variance threshold, the corresponding first pseudo-color probability is 1; when the variance value of the region corresponding to the pixel is greater than the first variance threshold and less than the second variance threshold, the corresponding first pseudo-color probability is the quotient of the first variance intermediate quantity and the second variance intermediate quantity; wherein, the first variance intermediate quantity is the difference between the variance value of the region corresponding to the pixel and the first variance threshold, and the second variance intermediate quantity is the difference between the second variance threshold and the first variance threshold.

[0063] In this embodiment, an exemplary calculation method is given for dividing the texture region and the flat region of the target image according to the variance information. The variance value S of the region corresponding to each pixel obtained in the above embodiment is divided by the preset first variance threshold STHr1 and the second variance threshold STHr2 to obtain the first pseudo-color probability FC1. Taking one pixel as an example, the calculation formula is as follows: when S <= STHr1, FC1 = 0; when S >= STHr2, FC1 = 1; when STHr1 < S < STHr2, , where the first variance intermediate quantity is S - STHr1, and the second variance intermediate quantity is STHr2 - STHr1. Repeating the above operations can determine the first pseudo-color probability of all pixels in the target image.

[0064] In some embodiments, the image optimization method further includes: converting the direction probabilities of each pixel in the target image in each direction to enhance the texture region of the target image.

[0065] In this application, the acquisition method of the direction probability is not limited, nor is the number of direction probabilities. For example, the direction probability can be calculated using image brightness or color information. The direction probability can be the horizontal direction probability and the vertical direction probability. The direction probability can also be selected as the four direction probabilities of east, west, south, and north, or the four direction probabilities at 0 degrees, 45 degrees, 90 degrees, and 135 degrees, or eight direction probabilities for subsequent calculations. Different numbers of direction probabilities do not have different overall concepts. Their differences lie only in the complexity of the calculation amount. Generally speaking, the more direction probabilities are selected, the greater the corresponding calculation amount, and the relatively more accurate the obtained result, but the hardware resources consumed by the calculation will also increase accordingly. For the sake of illustration, in the following embodiments, only the horizontal direction probability DirWH and the vertical direction probability DirWV of the pixel are used as examples for demonstration. Those skilled in the art can perform calculations in other directions according to the examples given below.

[0066] First, the directional probability of each pixel in the target image is converted in each direction. The calculation formula is as follows: X1=DirWH, X2=DirWV, X1+X2=1, SUM1=X1+X2, Y1=SUM1 / X1, Y2=SUM1 / X2, SUM2=Y1+Y2, Z1=Y1 / SUM2, Z2=Y2 / SUM2, where Z1 represents the horizontal direction probability after conversion, and Z2 represents the vertical direction probability after conversion. In this way, the smaller the directional probability, the greater the color difference calculation involved. In places where the original directional probability is small, it means that the gradient changes in this direction are small, and the structure of the image in this direction is not obvious or very complex. These areas usually contain more details and texture changes, so they contribute more to the visual effect of the image. On the contrary, places with large directional probabilities mean that the gradient changes in this direction are significant, and the image structure is relatively simple, which may be a flat area or a place with obvious edges. Combined with background knowledge, it can be concluded that the area with smaller original directional probability (corresponding to the above texture area) is more likely to produce pseudo-color, and the area with larger original directional probability (corresponding to the above flat area) is less likely to produce pseudo-color. Therefore, through probability conversion, they are transformed into appropriate forms of expression, the texture area in the target image is enhanced, and the subsequent calculation of pseudo-color probability is convenient. It should be noted that the directional probabilities in the following implementations are all converted directional probabilities.

[0067] In some embodiments, the directional probability of each pixel in the target image in each direction is multiplied by the color difference mean in the corresponding direction to obtain the color difference gradient value of each pixel in the target image, including: selecting any pixel in the target image as the center point, and determining a window of a preset size range in the target image; based on the color difference of each pixel in the window, obtaining the red color difference mean and the blue color difference mean in each direction; multiplying the directional probability in each direction by the red color difference mean in the corresponding direction to obtain the red color difference gradient value of each pixel in the target image; multiplying the directional probability in each direction by the blue color difference mean in the corresponding direction to obtain the blue color difference gradient value of each pixel in the target image.

[0068] Next, we will explain different types of target images. When the target image is a raw image, we take the calculation of the color difference gradient in a 3*3 window as an example. For this purpose, a 9*9 window is required to provide image information. Please refer to Figure 4 , which shows a window example provided by an embodiment of the present application. Figure 4As shown, the center point is G (0, 0). First, calculate the horizontal color difference and vertical color difference of all pixels in the 5*5 area (that is, the area surrounded by the four points (-2, -2), (-2, 2), (2, 2), (2, -2)) with G as the center. For example, take R (-2, -1) as an example, the calculation formula for the horizontal color difference and vertical color difference of the pixel is as follows: , ,in, is the horizontal RGB value of the center point, is the vertical RGB value of the center point, is the horizontal chromatic aberration, is the vertical color difference. Then use this to calculate the horizontal color difference gradient and vertical color difference gradient of all pixels in the 3*3 area (that is, the area surrounded by (-1, -1), (-1, 1), (1, 1), (1, -1)) with G as the center. The calculation formula is as follows: , ,in, is the horizontal color gradient, is the vertical color difference gradient. Then, according to the horizontal color difference gradient and vertical color gradient Calculate the horizontal red color difference gradient mean of the center point respectively , vertical red color difference gradient mean , horizontal blue color difference gradient mean and the vertical blue color difference gradient mean , the calculation formula is as follows: , , , , when (i, j) does not exist hour, is 0 when (i, j) does not exist hour, is 0; the values ​​of m, n, p, q are determined by the current pixel type and the selected window size. Figure 4In the 3*3 center window, a horizontal blue color difference gradient and a vertical blue color difference gradient are counted at B; a horizontal red color difference gradient and a vertical red color difference gradient are counted at R; if the left and right sides of G are R, a horizontal red color difference gradient and a vertical blue color difference gradient are counted; if the left and right sides of G are B, a horizontal blue color difference gradient and a vertical red color difference gradient are counted. In this way, it can be concluded that m=3, n=6, p=6, q=3, which also determines the mean red color difference and the mean blue color difference in each direction. Finally, multiply the direction probability in each direction by the mean red color difference in the corresponding direction to obtain the red color difference gradient value CDGR of each pixel in the target image; multiply the direction probability in each direction by the mean blue color difference in the corresponding direction to obtain the blue color difference gradient value CDGB of each pixel in the target image. The calculation formula is as follows: , , where DirWH is the horizontal probability of the center point, and DirWV is the vertical probability of the center point. Their specific calculation and conversion can refer to the examples given in the above implementation, and will not be repeated here. When the directional probability of the central pixel point includes other directions, it can be concluded with reference to the above examples, and their overall concept is completely consistent.

[0069] Similarly, when the target image is an RGB image, taking the calculation of the color gradient in a 3*3 window as an example, a 5*5 window is required to provide image information. Figure 5 , which shows another window example provided by the embodiment of the present application. Figure 5 As shown, each pixel includes three color channel values, with the center point being (0, 0). First, calculate the red color difference of all pixels in a 5*5 area (that is, the area surrounded by the four points (-2, -2), (-2, 2), (2, 2), and (2, -2)). and blue color difference , the calculation formula is as follows: , Next, the horizontal red color difference gradient of each pixel in the 3*3 window is calculated with (0, 0) as the center. , vertical red color gradient , horizontal blue color gradient and vertical blue gradient , the calculation formula is as follows: , , , Then, calculate the horizontal red color difference gradient mean of the center point , vertical red color difference gradient mean , horizontal blue color difference gradient mean and the vertical blue color difference gradient mean , the calculation formula is as follows: , , , , since the target image is an RGB image, m=9, n=9, p=9, q=9. Finally, multiply the direction probability in each direction by the mean value of the red color difference in the corresponding direction to obtain the red color difference gradient value CDGR of each pixel in the target image; multiply the direction probability in each direction by the mean value of the blue color difference in the corresponding direction to obtain the blue color difference gradient value CDGB of each pixel in the target image. The calculation formula is as follows: , , where DirWH is the horizontal probability of the center point, and DirWV is the vertical probability of the center point. Their specific calculation and conversion can refer to the examples given in the above implementation, and will not be repeated here. When the directional probability of the central pixel point includes other directions, it can be concluded with reference to the above examples, and their overall concept is completely consistent.

[0070] Similarly, when the target image is a YUV image, taking the calculation of the color difference gradient in a 3*3 window as an example, a 5*5 window is required to provide image information. Figure 6 , which shows another window example provided by the embodiment of the present application. Figure 6 As shown, each pixel includes three channel values, where U and V represent the blue chromaticity component and the red chromaticity component respectively. First, calculate the horizontal red color difference gradient of all pixels in the 3*3 area centered at (0, 0) (that is, the area surrounded by the four points (-1, -1), (-1, 1), (1, 1), and (1, -1)). , vertical red color gradient , horizontal blue color gradient and vertical blue gradient , the calculation formula is as follows: , , , Then, calculate the horizontal red color difference gradient mean of the center point , vertical red color difference gradient mean , horizontal blue color difference gradient mean and the vertical blue color difference gradient mean , the calculation formula is as follows: , , , , since the target image is a YUV image, so m = 9, n = 9, p = 9, q = 9. Finally, multiply the directional probabilities in each direction by the mean value of the red color difference in the corresponding direction to obtain the red color difference gradient value CDGR of each pixel point in the target image; multiply the directional probabilities in each direction by the mean value of the blue color difference in the corresponding direction to obtain the blue color difference gradient value CDGB of each pixel point in the target image. The calculation formulas are as follows: , , where DirWH is the horizontal direction probability of the center point, and DirWV is the vertical direction probability of the center point. Their specific calculations and conversions can refer to the examples given in the above embodiments, and will not be elaborated here. When the directional probabilities of the central pixel point include other directions, they can be obtained by referring to the above examples, and their overall concepts are exactly the same.

[0071] In some embodiments, the first gradient threshold is less than the second gradient threshold, and the color difference gradient value of a pixel point is the larger value of the red color difference gradient value and the blue color difference gradient value of the pixel point; dividing the color difference gradient values of each pixel point based on the first gradient threshold and the second gradient threshold to determine the second pseudo-color probability of each pixel point in the target image, including: when the color difference gradient value of the pixel point is less than or equal to the first gradient threshold, the corresponding second pseudo-color probability is 0; when the color difference gradient value of the pixel point is greater than or equal to the second gradient threshold, the corresponding second pseudo-color probability is 1; when the color difference gradient value of the pixel point is greater than the first gradient threshold and less than the second gradient threshold, the corresponding second pseudo-color probability is the quotient of the first gradient intermediate quantity and the second gradient intermediate quantity; where the first gradient intermediate quantity is the difference between the gradient value of the area corresponding to the pixel point and the first gradient threshold, and the second gradient intermediate quantity is the difference between the second gradient threshold and the first gradient threshold.

[0072] Use the preset first gradient threshold FCTHr1 and second gradient threshold FCTHr2 to divide the larger value CDG of the color difference gradient values of each pixel point obtained in the above embodiments, that is, FCTHr1 < FCTHr2, CDG = max(CDGR, CDGB). Taking one pixel point as an example, calculate the second pseudo-color probability FC2 of each pixel point, and the calculation formula is as follows: when CDG <= FCTHr1, FC2 = 0; when CDG >= FCTHr2, FC2 = 1; when FCTHr1 < CDG < FCTHr2, , where the first gradient intermediate quantity is CDG - FCTHr1, and the second gradient intermediate quantity is FCTHr2 - FCTHr1. Repeating the above operations can determine the second pseudo-color probability FC2 of all pixel points in the target image.

[0073] In some embodiments, the final pseudo-color probability of each pixel in the target image is determined based on the first pseudo-color probability and the second pseudo-color probability, including: determining the pseudo-color suppression strength, multiplying the pseudo-color suppression strength, the first pseudo-color probability and the second pseudo-color probability, and determining the final pseudo-color probability of each pixel in the target image, and the value of the pseudo-color suppression strength is between 0 and 1.

[0074] Taking pixels as units, multiply the first pseudo-color probability FC1, the second pseudo-color probability FC2 and the pseudo-color suppression strength FCStr determined in the above implementation to obtain the final pseudo-color probability FC3: FC3=FC1*FC2*FCStr. The final pseudo-color probability is the pseudo-color probability of a certain pixel in the target image. By repeating this method, the pseudo-color probability of all pixels in the target image can be obtained. Setting the pseudo-color suppression strength allows the user to adjust the strength of pseudo-color suppression according to actual conditions. This parameter is selected by the user. The larger the parameter, the stronger the pseudo-color suppression. The user can set the parameter to a reasonable value as needed. Among them, the value of the pseudo-color suppression strength FCStr is between 0 and 1.

[0075] In some embodiments, optimizing a target image according to a final pseudo-color probability comprises: when the target image is an original image or a red, green and blue image, calculating a first difference between a red channel value and a green channel value and a second difference between a blue channel value and a green channel value of any pixel in the target image, optimizing the red channel value based on the green channel value in combination with the final pseudo-color probability and the first difference, optimizing the blue channel value based on the green channel value in combination with the final pseudo-color probability and the second difference, and repeating the above steps until all pixels in the target image are optimized; when the target image is a luminance-chrominance image, the luminance channel value of each pixel in the target image remains unchanged, and the final pseudo-color probability is used to optimize the blue chrominance component and the red chrominance component of each pixel.

[0076] When the target image is a raw image, there are three possibilities for any pixel: the pixel has a red channel value, a green channel value, or a blue channel value. Depending on the channel value, the calculation formula is different. When the pixel has a red channel value, the calculation formula is as follows: , , where Rn is the red channel value after pseudo-color suppression, Ro is the red channel value before pseudo-color suppression, and Go can be obtained based on the probability of passing through the original direction and the G channel value within a certain window. The above formula gives a feasible example. When the pixel has a blue channel value, the calculation formula is as follows: , , where Bn is the blue channel value after pseudo-color suppression, Bo is the blue channel value before pseudo-color suppression, and Go has the same meaning as above, so it will not be repeated here. When the pixel has a green channel value, the calculation formula is as follows: Gn=Go, where Gn is the green channel value after pseudo-color suppression, and Go is the green channel value before pseudo-color suppression. That is to say, for green pixels in the raw image, pseudo-color suppression is not required because the probability of pseudo-color is small.

[0077] When the target image is an RGB image, since each pixel has three color channel values, the following calculation formula can be obtained by referring to the above implementation method: , , Gn=Go, then the value of Go can be obtained based on the pixel’s own information.

[0078] When the target image is a YUV image, the following calculation formula is used: , , , where Yo, Uo, and Vo are the values ​​of the pixel before pseudo-color suppression, and Yn, Un, and Vn are the values ​​of the pixel after pseudo-color suppression.

[0079] Repeat the above steps until all pixels in the target image are optimized. In this way, the pseudo-color probability is calculated for each pixel in the image in units of pixels, and each pixel is optimized to achieve the effect of optimizing the entire image. This optimization process has a good effect on suppressing pseudo-color and will not produce too many side effects on the image itself.

[0080] Based on similar technical concepts, this application discloses an image sensing device, please refer to Figure 7 , which shows a schematic diagram of the structure of an image sensing device provided in an embodiment of the present application. Figure 7 As shown, the image sensing device 70 includes:

[0081] A photosensitive element 72, used to sense the light signal and convert the light signal into an electrical signal, wherein the electrical signal includes image data of the target image;

[0082] The image processing device 73 is used to execute the image optimization method disclosed in the above embodiment to suppress pseudo color in the target image.

[0083] In some embodiments, Figure 7The image sensing device 70 may be a camera, the lens 71 receives external light and transmits the light signal to the photosensitive element 72, the photosensitive element 72 may be a CMOS / CCD photosensitive sensor, the light signal is converted into an analog electrical signal by the photosensitive element 72, and then the analog electrical signal is converted into a digital electrical signal by an analog-to-digital converter, the digital electrical signal includes image data of the image to be processed; the image processing device 73 receives the digital electrical signal, and uses the image optimization method disclosed in the above embodiment to suppress pseudo-color in the target image.

[0084] Based on the same technical concept, the present application provides a computer-readable storage medium on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the steps of the above image optimization method are implemented. The computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0085] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments. In addition, the above embodiments can be freely combined as needed.

Claims

1. An image optimization method, characterized in that: For suppressing pseudo-color in a target image, the target image is an original image, a red, green, and blue image, or a brightness-chrominance image, the method comprising: Obtaining the variance value of the area corresponding to each pixel point in the target image; Dividing the variance value of the area corresponding to each pixel point based on the first variance threshold and the second variance threshold, and determining a first pseudo color probability of each pixel point in the target image; Multiplying the direction probability of each pixel point in the target image in each direction by the color difference mean value in the corresponding direction to obtain the color difference gradient value of each pixel point in the target image; Dividing the color difference gradient value of each pixel point based on the first gradient threshold and the second gradient threshold value, and determining a second pseudo color probability of each pixel point in the target image; A final pseudo-color probability of each pixel in the target image is determined based on the first pseudo-color probability and the second pseudo-color probability, and the target image is optimized according to the final pseudo-color probability.

2. The image optimization method according to claim 1, characterized in that: When the target image is an original image or a red, green and blue image, the step of obtaining the variance value of the area corresponding to each pixel point in the target image includes: Select any pixel point in the target image as a center point, and determine a window of a preset size range in the target image; Calculate the red channel variance, green channel variance and blue channel variance in the window respectively; Use the green channel value weight to convert the green channel variance in the window, the red channel value weight to convert the red channel variance in the window, and the blue channel value weight to convert the blue channel variance in the window, and add the converted results to obtain the variance value of the area corresponding to the center point; The center point is repeatedly selected and calculated until the variance value of the area corresponding to each pixel point in the target image is obtained.

3. The image optimization method according to claim 1, characterized in that: When the target image is a luminance-chrominance image, the step of obtaining the variance value of the area corresponding to each pixel point in the target image includes: Select any pixel point in the target image as a center point, and determine a window of a preset size range in the target image; Based on the brightness channel value of each pixel point in the window, the brightness channel variance in the window is calculated to obtain the variance value of the area corresponding to the center point; The center point is repeatedly selected and calculated until the variance value of the area corresponding to each pixel point in the target image is obtained.

4. The image optimization method according to any one of claims 1 to 3, characterized in that: The first variance threshold is smaller than the second variance threshold, and the variance value of the area corresponding to each pixel point is divided based on the first variance threshold and the second variance threshold to determine the first pseudo color probability of each pixel point in the target image, including: When the variance value of the area corresponding to the pixel point is less than or equal to the first variance threshold, the corresponding first false color probability is 0; When the variance value of the area corresponding to the pixel point is greater than or equal to the second variance threshold, the corresponding first pseudo-color probability is 1; When the variance value of the area corresponding to the pixel point is greater than the first variance threshold and less than the second variance threshold, the corresponding first pseudo-color probability is the quotient of the first variance intermediate value and the second variance intermediate value; The first variance intermediate quantity is the difference between the variance value of the area corresponding to the pixel point and the first variance threshold, and the second variance intermediate quantity is the difference between the second variance threshold and the first variance threshold.

5. The image optimization method according to claim 1, characterized in that: Also includes: The directional probabilities of each pixel point in the target image in each direction are converted so that in each direction, the smaller the directional probability, the larger the region participating in the color difference calculation, so as to enhance the texture area of ​​the target image.

6. The image optimization method according to claim 5, characterized in that: The step of multiplying the direction probability of each pixel point in the target image in each direction by the color difference mean value in the corresponding direction to obtain the color difference gradient value of each pixel point in the target image includes: Select any pixel point in the target image as a center point, and determine a window of a preset size range in the target image; Based on the color difference of each pixel in the window, the mean red color difference and the mean blue color difference in each direction are obtained; Multiply the direction probability in each direction by the mean value of the red color difference in the corresponding direction to obtain the red color difference gradient value of each pixel in the target image; The direction probability in each direction is multiplied by the blue color difference mean value in the corresponding direction to obtain the blue color difference gradient value of each pixel point in the target image.

7. The image optimization method according to claim 6, characterized in that: The first gradient threshold is less than the second gradient threshold, and the color difference gradient value of the pixel point is a larger value between a red color difference gradient value and a blue color difference gradient value of the pixel point; The method of dividing the color difference gradient value of each pixel point based on the first gradient threshold and the second gradient threshold value to determine the second pseudo color probability of each pixel point in the target image includes: When the color difference gradient value of the pixel point is less than or equal to the first gradient threshold, the corresponding second false color probability is 0; When the color difference gradient value of the pixel point is greater than or equal to the second gradient threshold, the corresponding second false color probability is 1; When the color difference gradient value of the pixel point is greater than the first gradient threshold and less than the second gradient threshold, the corresponding second pseudo color probability is the quotient of the first gradient intermediate value and the second gradient intermediate value; The first gradient intermediate value is the difference between the gradient value of the area corresponding to the pixel point and the first gradient threshold, and the second gradient intermediate value is the difference between the second gradient threshold and the first gradient threshold.

8. The image optimization method according to claim 1, characterized in that: The determining of the final pseudo-color probability of each pixel in the target image based on the first pseudo-color probability and the second pseudo-color probability includes: Determine the pseudo color suppression strength, multiply the pseudo color suppression strength, the first pseudo color probability and the second pseudo color probability, and determine the final pseudo color probability of each pixel in the target image, where the value of the pseudo color suppression strength is between 0 and 1.

9. The image optimization method according to claim 8, characterized in that: The step of optimizing the target image according to the final pseudo-color probability includes: When the target image is an original image or a red, green and blue image, a first difference between a red channel value and a green channel value and a second difference between a blue channel value and a green channel value of any pixel in the target image are calculated. Taking the green channel value as a reference, combining the final pseudo-color probability and the first difference, optimizing the red channel value, Taking the green channel value as a reference, combining the final false color probability and the second difference, optimizing the blue channel value, Repeat the above steps until all pixels in the target image are optimized; When the target image is a luminance-chrominance image, the luminance channel value of each pixel in the target image remains unchanged, and the blue chrominance component and the red chrominance component of each pixel are optimized using the final pseudo-color probability.

10. An image sensing device, characterized in that: include: A photosensitive element, used to sense a light signal and convert the light signal into an electrical signal, wherein the electrical signal includes image data of a target image; An image processing device, used to execute the image optimization method described in any one of claims 1 to 9 to suppress pseudo-color in the target image.