Interpolation-based pseudo-color removal method and apparatus for images, and system-on-chip and computer storage medium
By obtaining the color difference channel values in image processing and performing filtering based on the target pixel orientation information, the problem of false color removal is solved, and image quality is improved.
Patent Information
- Application Number
- PCT/CN2024/115866
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-05
AI Technical Summary
Existing image processing methods cannot efficiently remove false colors, which affects the quality of color images.
By acquiring the original image, extracting the buffer window, calculating the color difference channel values, and performing filtering based on the orientation information of the target pixels, false colors are removed.
While ensuring image clarity, it accurately removes false colors in edge areas and textures, thereby improving image quality.
Smart Images

Figure CN2024115866_05032026_PF_FP_ABST
Abstract
Description
Image pseudocolor removal method and apparatus based on interpolation, system-on-a-chip, computer storage medium Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an image pseudocolor removal method and apparatus, system-on-a-chip, and computer storage medium based on interpolation. Technical Background
[0002] Current imaging devices, such as cameras, typically employ a single image sensor paired with a filter design for cost reasons. After the image sensor acquires an image, an ISP (Image Signal Processing) system processes the image to ultimately output an RGB color image. ISPs typically include linear error correction, noise reduction, dead pixel removal, white balance, color correction, tone mapping, and depigmentation. Technical issues
[0003] False color often appears in complex texture areas during image processing, or due to errors in averaging local pixel values during interpolation, or because the image does not overlap as expected. False color severely affects the quality of the final output color image. Therefore, it is essential to remove false color to ensure clear, accurate colors and a good visual experience. Technical solutions
[0004] The purpose of this invention is to provide an image pseudocolor removal method and apparatus, system-on-a-chip, and computer storage medium based on interpolation, so as to solve the problem that existing image processing methods cannot efficiently remove pseudocolor from images.
[0005] To address the aforementioned technical problems, this invention provides an image pseudo-color removal method based on interpolation, comprising:
[0006] Obtain the original image;
[0007] Extract the cache window based on the current target pixel in the original image;
[0008] Calculate the color difference channel values within the cache window;
[0009] Based on the orientation information of the current target pixel, the color difference channel value is filtered to remove false colors;
[0010] Using the filtered color difference channel values, the full channel values after removing false colors are calculated to output the image after removing false colors.
[0011] Optionally, in the interpolation-based image pseudo-color removal method, the step of filtering the color difference channel values according to the orientation information of the current target pixel to remove pseudo-color includes:
[0012] Based on the orientation information of the current target pixel, extract several candidate filtering points from the cache window to obtain a set of filtering points;
[0013] Obtain the color difference channel values corresponding to all filter candidate points in the filter point set to obtain the filter dataset;
[0014] The filtered dataset is subjected to categorical median filtering to obtain the color difference channel values of all candidate filtered points after removing false colors.
[0015] Optionally, in the interpolation-based image pseudo-color removal method, the step of extracting the cache window based on the current target pixel in the original image includes:
[0016] Based on the current target pixel in the original image, extract a buffer window of m rows and n columns, where m is an odd number greater than or equal to 3 and n is an odd number greater than or equal to 3;
[0017] The current target pixel is located in the middle row and middle column of the cache window.
[0018] Optionally, in the interpolation-based image pseudo-color removal method, the step of calculating the color difference channel values in the buffer window includes:
[0019] If the original image is an RGB image, then RG and BG are calculated as two color difference channels;
[0020] If the original image is a YUV image, then U and V are taken as two color difference channels.
[0021] Optionally, in the interpolation-based image pseudo-color removal method, the orientation information of the current target pixel includes whether the current target pixel is on an edge, whether the current target pixel is a directional point, and the edge direction of the current target pixel.
[0022] Optionally, in the interpolation-based image pseudo-color removal method, the step of extracting candidate filtering points from the cache window based on the orientation information of the current target pixel to obtain a set of filtering points includes:
[0023] Determine if the current target pixel is on an edge; if so, determine if the current target pixel is a directional point.
[0024] If the current target pixel is determined to be a directional point, then the direction perpendicular to the edge direction of the current target pixel is selected as the direction for selecting candidate points, and more than or equal to 8 filter candidate points are extracted from the cache window along the direction of the selected candidate points.
[0025] If the current target pixel is determined to be a point without direction, then extract 8 or more filter candidate points from the cache window according to the isotropic distribution.
[0026] Optionally, in the interpolation-based image pseudo-color removal method, eight of the extracted filter candidate points are adjacent to the current target pixel.
[0027] Optionally, in the interpolation-based image pseudocolor removal method, the step of performing categorical median filtering on the filtered dataset to obtain the color difference channel values of all candidate filtered points after pseudocolor removal includes:
[0028] Based on the preset color difference channel threshold, the color difference channel values in the filtered dataset are divided into outlier color difference regions or target color difference regions.
[0029] Determine whether the current target pixel is located in the target color difference region;
[0030] If the color difference channel value of the current target pixel is located in the target color difference area, then its color difference channel value is retained;
[0031] If the color difference channel value of the current target pixel is located in the outlier color difference region, then the color difference channel value of the current target pixel is replaced by the color difference channel value that is closest to the current target pixel in the target color difference region.
[0032] Optionally, in the interpolation-based image pseudo-color removal method, the step of determining whether the current target pixel is located in the target color difference region includes:
[0033] Sort the color difference channel values in the filtered dataset according to a preset method;
[0034] Obtain the rank of the color difference channel value of the current target pixel in the sorted filtered dataset;
[0035] Determine whether the current target pixel is located in the target color difference area based on its position.
[0036] To address the aforementioned technical problems, the present invention also provides an interpolation-based image pseudo-color removal apparatus for implementing the interpolation-based image pseudo-color removal method as described in any of the preceding claims, wherein the interpolation-based image pseudo-color removal apparatus comprises:
[0037] The image acquisition module is used to acquire the original image;
[0038] The color difference calculation module is used to extract the cache window and calculate the color difference channel values within the cache window;
[0039] The filtering module is used to filter the color difference channel values based on the orientation information of the current target pixel in order to remove false colors;
[0040] The image output module is used to calculate the full channel values after removing false colors using the filtered color difference channel values, so as to output the image after removing false colors.
[0041] To address the aforementioned technical problems, the present invention also provides a system-on-a-chip (SoC) comprising a processor and a memory, wherein the processor and the memory are coupled, and the processor is configured to execute a computer program stored in the memory to perform the interpolation-based image pseudo-color removal method as described in any of the preceding claims.
[0042] To address the aforementioned technical problems, the present invention also provides a computer storage medium storing an executable program; when the executable program is executed, it implements the image pseudo-color removal method based on interpolation as described in any of the preceding claims. Beneficial effects
[0043] The image pseudocolor removal method and apparatus, system-on-a-chip, and computer storage medium based on interpolation provided by this invention locate the edge regions prone to pseudocolor by using the directional information of the current target pixel, and then filter the color difference channel values obtained by interpolation calculation. This can accurately remove pseudocolor in edge regions and textures while ensuring image clarity, thereby effectively improving image quality and efficiently removing pseudocolor from the image. Attached Figure Description
[0044] Figure 1 is a flowchart illustrating the image pseudo-color removal method based on interpolation provided in this embodiment;
[0045] Figure 2 is a schematic diagram of the coordinate positions of each pixel in the 5×5 buffer window provided in this embodiment;
[0046] Figure 3 is a flowchart illustrating step S4 provided in this embodiment;
[0047] Figure 4 is a schematic diagram of the extracted filter candidate points when the direction of the selected filter candidate points is vertical, as provided in this embodiment;
[0048] Figure 5 is a schematic diagram of the extracted filter candidate points when the direction of the selected filter candidate points is horizontal, as provided in this embodiment;
[0049] Figure 6 is a schematic diagram of the filtered candidate points extracted when the direction of the selected filtered candidate points is the diagonal direction, as provided in this embodiment;
[0050] Figure 7 is a schematic diagram of the filter candidate points extracted when the direction of the selected filter candidate points is the anti-diagonal direction, as provided in this embodiment;
[0051] Figure 8 is a schematic diagram of the extracted filter candidate points when there is no direction to select filter candidate points according to this embodiment;
[0052] Figure 9 is a schematic diagram of the classification median filtering provided in this embodiment;
[0053] Figure 10 is a schematic diagram of the image pseudo-color removal device based on interpolation provided in this embodiment;
[0054] Figure 11 is a schematic diagram of the system-on-a-chip provided in this embodiment. Embodiments of the present invention
[0055] Currently, false color in images is mainly caused by lens processing or ISP (Image Signal Processing) procedures. Lens-related false color typically appears at object edges, often in shades of purple, yellow-green, or magenta, with variable width and a radial trend. ISP-related false color usually appears at object edges and in areas with dense texture, with a smaller width (generally around 2 pixels) and higher saturation. Therefore, effectively removing false color at object edges can significantly improve the effect of false color removal and enhance image quality.
[0056] Based on this, this embodiment provides an image pseudo-color removal method based on interpolation, as shown in Figure 1, including:
[0057] S1, Obtain the original image;
[0058] S2, using the current target pixel in the original image as a reference, extract the cache window;
[0059] S3, calculate the color difference channel values in the cache window;
[0060] S4, Based on the orientation information of the current target pixel, filter the color difference channel value to remove false color;
[0061] S5 uses the filtered color difference channel values to calculate the full channel values after removing false colors, and outputs the image after removing false colors.
[0062] The image pseudocolor removal method based on interpolation provided in this embodiment locates the edge regions prone to pseudocolor by using the directional information of the current target pixel, and then filters the color difference channel values obtained by difference calculation. This method can accurately remove pseudocolor in edge regions and textures while ensuring image clarity, thereby effectively improving image quality and efficiently removing pseudocolor from the image.
[0063] Specifically, in this embodiment, step S1, acquiring the original image can be an original image acquired from various photographic and video recording devices, or an image output after some image processing steps. The format of the acquired original image can be a RAW image (the original image acquired from the image sensor), an RGB image (an image composed of the color intensities of the three channels: red (R), green (G), and blue (B)), or a YUV image (an image composed of luminance signal (Y) and chrominance signals (U and V)).
[0064] Furthermore, in this embodiment, step S2, using the current target pixel in the original image as a reference, extracts a cache window. Specifically, this can be done by extracting a cache window of m rows and n columns, using the current target pixel in the original image as a reference, where m is an odd number greater than or equal to 3 and n is an odd number greater than or equal to 3; the current target pixel is located in the middle row and middle column of the cache window.
[0065] In this embodiment, the pixel value of the pixel in the cache window is denoted as P. x,y Where x represents the row coordinate of the pixel in the buffer window, ordered from left to right, x = 0, 1, ..., m-1; y represents the column coordinate of the pixel in the buffer window, ordered from top to bottom, y = 0, 1, ..., n-1; the pixel value of the current target pixel is denoted as P. i,j ,in,
[0066] As shown in Figure 2, in this embodiment, m = 5 and n = 5 are set to extract a 5×5 buffer window. At this time, the current target pixel is located in the third row and third column, i.e., i = 2 and j = 2, and the pixel value of the current target pixel is denoted as P. 2,2 .
[0067] Of course, in practical applications, the size of the buffer window can be determined based on the hardware resources or the content of the image capture, and the buffer window can be square or rectangular.
[0068] Furthermore, depending on the format of the original image, in this embodiment, step S3, the method for calculating the color difference channel values in the cache window specifically includes:
[0069] S3-1, If the original image is an RGB image, then RG and BG are calculated as two color difference channels. The method for calculating the RG and BG color difference values in the RGB domain is well known to those skilled in the art, and will not be elaborated upon here.
[0070] S3-2, If the original image is a YUV image, then U and V are taken as two color difference channels. The method of taking the values of the U and V channels in the YUV domain is well known to those skilled in the art, and will not be elaborated upon here.
[0071] In practical applications, if the original image is a non-RGB or non-YUV format image such as a RAW image, the original image format can be converted to RGB or YUV format first through color gamut conversion, and then the color difference channel values can be calculated using the steps described above. Color gamut conversion methods are well known to those skilled in the art, and will not be elaborated upon here.
[0072] Furthermore, within the cache window, if the current target pixel is in a flat area, most of the color difference values within that area are quite similar; however, due to noise, there may be a very small number of outlier color difference values. If the current target pixel is in an edge area, the color difference values within that area may cluster into two groups, corresponding to the two sides of the edge, respectively. The cluster with the larger color difference value can be identified as the color difference value on the edge side where the current target pixel is located. When false color occurs in the edge area, in addition to the large clustering of color difference values on the edge side where the current target pixel is located, there are also additional pixels with large color difference values that are not included in the clustering. This part is usually the false color that needs to be removed.
[0073] Therefore, in this embodiment, as shown in Figure 3, step S4, filtering the color difference channel value according to the orientation information of the current target pixel to remove false color, includes the following method:
[0074] S41, based on the orientation information of the current target pixel, extract several candidate filtering points from the cache window to obtain a set of filtering points.
[0075] Specifically, in this embodiment, the orientation information of the current target pixel includes whether the current target pixel is at an edge, whether the current target pixel is a directional point, and the edge orientation of the current target pixel.
[0076] In practical applications, the interpolation calculation during the demosaicing process can be used to determine whether the current target pixel is on an edge. Alternatively, other edge-calculation modules within the ISP can be used to determine this, or edge detection can be performed independently. When determining whether the current target pixel is a directional point, the calculation result of the interpolation direction during the demosaicing process can be used. If an interpolation direction is calculated during demosaicing, the current target pixel is considered a directional point. Since the interpolation direction obtained during demosaicing is generally consistent with the edge direction, in practical applications, the edge direction of the current target pixel can be defined as the interpolation direction.
[0077] When extracting candidate points for filtering, first, it is determined whether the current target pixel is on an edge. If so, it is determined whether the current target pixel is a directional point.
[0078] If the current target pixel is determined to be a directional point, then the direction perpendicular to the edge direction of the current target pixel is selected as the direction for selecting candidate points, which is also the direction perpendicular to the interpolation direction. Since the direction of the candidate point selection is perpendicular to the edge direction, the extracted candidate points can include more normal pixels on both sides of the edge, thereby improving the accuracy of the judgment when performing pseudo-color judgment. Then, along the direction of the candidate point selection, more than or equal to 8 candidate points are extracted from the cache window.
[0079] If the current target pixel is determined to be an undirected point, then extract at least 8 filter candidate points from the buffer window according to an isotropic distribution. Since the current target pixel is considered to be an undirected point, it can be assumed to be located in a flat region. Flat regions are less prone to false color, therefore, there are no strict requirements for the extraction method of filter candidate points in flat regions, as long as the number of extracted filter candidate points is consistent with the number extracted when the current target pixel is a directed point, thus facilitating subsequent filtering processes.
[0080] In one specific embodiment, taking a 5×5 buffer window as an example, when the direction of selecting candidate points is vertical, as shown in Figure 4, the middle 3 columns of pixels in the vertical direction are extracted as filter candidate points (the gray squares in Figure 4 represent the extracted filter candidate points). At this time, the current target pixel and its 8 adjacent pixels are also extracted as filter candidate points. When the direction of selecting candidate points is horizontal, as shown in Figure 5, the middle 3 columns of pixels in the horizontal direction are extracted as filter candidate points (the gray squares in Figure 5 represent the extracted filter candidate points). At this time, the current target pixel and its 8 adjacent pixels are also extracted as filter candidate points. When the direction of selecting candidate points is diagonal, as shown in Figure 6... As shown in Figure 6, 15 pixels along the diagonal direction are extracted as candidate filtering points (gray squares in Figure 6 represent the extracted candidate filtering points). At this time, the current target pixel and its eight adjacent pixels are also extracted as candidate filtering points. When the direction of the candidate points is the anti-diagonal direction, as shown in Figure 7, 15 pixels along the anti-diagonal direction are extracted as candidate filtering points (gray squares in Figure 7 represent the extracted candidate filtering points). At this time, the current target pixel and its eight adjacent pixels are also extracted as candidate filtering points. When the current target pixel is a point without direction (no direction for selecting candidate points), as shown in Figure 8, 15 pixels are uniformly extracted along each direction with the current target as the center as candidate filtering points (gray squares in Figure 8 represent the extracted candidate filtering points). At this time, the current target pixel and its eight adjacent pixels are also extracted as candidate filtering points.
[0081] Of course, those skilled in the art will know methods for extracting filter candidate points in buffer windows of other sizes, such as extracting a number of symmetrical columns, rows, diagonals, or anti-diagonals as filter candidate points centered on the current target pixel; or, when the size of the buffer window is less than 5×5 (e.g., the size of the buffer window is 3×3, 3×5, or 5×3), extracting a number of symmetrical columns, rows, diagonals, or anti-diagonals as filter candidate points centered on the current target pixel, wherein, when the size of the buffer window is 3×3, the extracted filter candidate points are 8 pixels surrounding the current target pixel; or, when the size of the buffer window is greater than 5×5, extracting a number of symmetrical columns, rows, diagonals, or anti-diagonals as filter candidate points centered on the current target pixel, still limited to a 5×5 size range, and this application does not impose any restrictions on this.
[0082] In practical applications, it is necessary to reasonably set the number of candidate points for filtering and the position of the extracted pixels based on the actual size of the buffer window and the accuracy requirements for pseudo-color removal.
[0083] Preferably, to facilitate subsequent filtering, the number of extracted pixels needs to be consistent. Simultaneously, to ensure the continuity of edge detection and the accuracy of pseudo-color detection, the region formed by the extracted filter candidate points should be continuous and complete, and all filter candidate points should be pairwise adjacent; that is, there should be no non-filter candidate points within the region formed by all filter candidate points. Furthermore, the extracted filter candidate points should include the current target pixel, and at least eight of the filter candidate points should be adjacent to the current target pixel.
[0084] S42, obtain the color difference channel values corresponding to all filter candidate points in the filter point set to obtain the filter dataset.
[0085] Specifically, the color difference channel values of the extracted filter candidate points are calculated according to the image format. For example, for an RGB image, the BG and RG color difference channel values of each filter candidate point need to be calculated, which can be denoted as Cb and Cr. The filter dataset needs to be established separately for different types of color difference channel values. For example, the BG color difference channel values Cb of all filter candidate points together constitute the Cb filter dataset, denoted as Cb[T]; the RG color difference channel values Cr of all filter candidate points together constitute the Cr filter dataset, denoted as Cr[T]; where T is the total number of filter candidate points. Taking the above 5×5 buffer window to extract 15 filter candidate points as an example, the filter dataset is Cb
[0015] and Cr
[0015] .
[0086] S43, perform classification median filtering on the filtered dataset to obtain the color difference channel values of all candidate filtered points after removing false colors.
[0087] Specifically, in this embodiment, firstly, according to a preset color difference channel threshold, the color difference channel values in the filtered dataset are divided into outlier color difference regions or target color difference regions; then, it is determined whether the current target pixel is located in the target color difference region; if the color difference channel value of the current target pixel is located in the target color difference region, its color difference channel value is retained; if the color difference channel value of the current target pixel is located in the outlier color difference region, the color difference channel value of the current target pixel that is closest to the current target pixel in the target color difference region is used to replace the color difference channel value of the current target pixel.
[0088] The preset color difference channel threshold needs to be set reasonably based on the clustering of color difference channel values in the image and the accuracy requirements for removing false colors, so as to ensure that the details of the image are not lost while removing false colors, thereby resulting in a high-quality output image.
[0089] In practical applications, an adaptive adjustment method can be used to determine the color difference channel threshold within the current cache window. For example, all color difference channel values in the filtered dataset can be arranged in ascending order, and the target color difference region can be selected symmetrically from the median outwards, representing 60% of all color difference channel values in the filtered dataset. The color difference channel values at both ends are then the color difference channel thresholds. Of course, the selected proportion is not limited to 60% and can be set according to the actual clustering of color difference channel values and the accuracy requirements for pseudo-color removal.
[0090] In one specific embodiment, as shown in Figure 9, firstly, the color difference channel values in the filtered dataset are sorted according to a preset method, for example, in ascending order.
[0091] Then, based on the preset color difference channel thresholds, the color difference channel values in the sorted filtered dataset are sequentially divided into the first outlier color difference region, the target color difference region, and the second outlier color difference region. At this point, a minimum threshold and a maximum threshold for the color difference channels need to be set. Color difference channel values below the minimum threshold are assigned to the first outlier color difference region, color difference channel values above the maximum threshold are assigned to the second outlier color difference region, and the remaining color difference channel values are assigned to the target color difference region. Since the color difference channel values in the target color difference region are clustered, the range of the target color difference region can be obtained based on the clustering relationship. The minimum value among the color difference channel values in the target color difference region is the minimum threshold, and the maximum value is the maximum threshold.
[0092] At this point, since the order of each color difference channel value is sorted by the size of the color difference channel values, if we know the order of the color difference channel value closest to the color difference channel threshold in the sorted filtered dataset, or if we know the order of the color difference channel threshold in the sorted filtered dataset, we can know the region where each color difference channel value is located.
[0093] Next, it is determined whether the current target pixel is located within the target color difference region. Specifically, the rank of the current target pixel's color difference channel value in the sorted filtered dataset can be obtained; then, the rank can be used to determine whether the current target pixel is located within the target color difference region. Alternatively, the determination can be made based on the comparison between the current target pixel's color difference channel value and the color difference channel threshold.
[0094] Finally, if the color difference channel value of the current target pixel is located in the target color difference region, it means that the current target pixel is in the cluster, so its color difference channel value is retained; if the color difference channel value of the current target pixel is located in the first outlier color difference region, it means that the current target pixel is outlier and the color difference channel value is too small, so the color difference channel value of the current target pixel is replaced by the color difference channel value of the target color difference region that is closest to the first outlier color difference region (i.e., the minimum color difference channel value in the target color difference region); if the color difference channel value of the current target pixel is located in the second outlier color difference region, it means that the current target pixel is outlier and the color difference channel value is too large, so the color difference channel value of the current target pixel is replaced by the color difference channel value of the target color difference region that is closest to the second outlier color difference region (i.e., the maximum color difference channel value in the target color difference region).
[0095] In this way, by judging whether the color difference channel value of the current target pixel is within the cluster, it can be confirmed whether the current target pixel has false color. Then, the original color difference channel value is replaced by the color difference channel value of the closest color difference channel value of the current target pixel within the cluster. This can ensure the removal of false color while maintaining the reasonableness and coordination of the overall color difference of the image, thereby improving the image quality while effectively removing false color.
[0096] Furthermore, in this embodiment, in step S5, the full channel value after removing false color is calculated using the filtered color difference channel value, so as to output the image after removing false color.
[0097] Taking the example above, let the filtered BG color difference channel value of the current target pixel be denoted as Cbs, and the filtered RG color difference channel value be denoted as Crs. Correspondingly, the color difference channel values after removing pseudo-color are Cb_new and Cr_new, respectively. Then, the B channel value of the current target pixel after removing pseudo-color is Cb_new+G, and the R channel value is Cr_new+G.
[0098] By iterating through all the pixels of the image, you can obtain the image after removing false colors.
[0099] The image pseudocolor removal method based on interpolation provided in this embodiment targets edge and texture areas where pseudocolor is prone to occur. Based on the different edge directions, different filtering candidate points are selected along the vertical direction of the edge direction, thereby introducing as many candidate points of correct color as possible into the filter. This allows pseudocolor to be replaced by the maximum cluster in the classification filter, thus correctly filtering out outlier pseudocolor and effectively avoiding false negatives.
[0100] The image pseudocolor removal method based on interpolation provided in this embodiment, which uses a classification median filtering method, can make the filtered color difference move closer to the main cluster color difference rather than towards "de-colorization and low saturation". Therefore, it can protect the true color of the edge and avoid the problem of gray or obvious saturation reduction at the edge.
[0101] This embodiment also provides an interpolation-based image pseudo-color removal device for implementing the interpolation-based image pseudo-color removal method described above, as shown in Figure 10. The interpolation-based image pseudo-color removal device includes:
[0102] The image acquisition module is used to acquire the original image;
[0103] The color difference calculation module is used to extract the cache window and calculate the color difference channel values within the cache window;
[0104] The filtering module is used to filter the color difference channel values based on the orientation information of the current target pixel in order to remove false colors;
[0105] The image output module is used to calculate the full channel values after removing false colors using the filtered color difference channel values, so as to output the image after removing false colors.
[0106] The image pseudocolor removal device based on interpolation provided in this embodiment calculates the orientation information of the current target pixel through the filtering processing module and locates the edge area where pseudocolor is prone to occur. Then, it filters the color difference channel value output by the color difference calculation module. While ensuring image clarity, it can accurately remove pseudocolor in edge areas and textures, thereby effectively improving image quality and efficiently removing pseudocolor in the image.
[0107] Furthermore, this embodiment also provides a system-on-a-chip (SoC) including a processor and a memory, wherein the processor and the memory are coupled together, and the processor is used to execute a computer program stored in the memory to perform the image pseudo-color removal method based on interpolation as described above.
[0108] Furthermore, this embodiment also provides a computer storage medium storing an executable program; when the executable program is executed, it implements the image pseudo-color removal method based on interpolation as described in any of the preceding claims.
[0109] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to mutually. In addition, different parts between embodiments can also be combined with each other, and this invention does not limit this.
[0110] The image pseudocolor removal method, apparatus, and system-on-a-chip based on interpolation provided in this embodiment locate the edge regions prone to pseudocolor by using the directional information of the current target pixel, and then filter the color difference channel values obtained by difference calculation. This can accurately remove pseudocolor in edge regions and textures while ensuring image clarity, thereby effectively improving image quality and efficiently removing pseudocolor from the image.
[0111] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims. Industrial applicability
[0112] The image pseudocolor removal method based on interpolation provided in this embodiment targets edge and texture areas where pseudocolor is prone to occur. Based on the different edge directions, different filtering candidate points are selected along the vertical direction of the edge direction, thereby introducing as many candidate points of correct color as possible into the filter. This allows pseudocolor to be replaced by the maximum cluster in the classification filter, thus correctly filtering out outlier pseudocolor and effectively avoiding false negatives.
[0113] The image pseudocolor removal method based on interpolation provided in this embodiment, which uses a classification median filtering method, can make the filtered color difference move closer to the main cluster color difference rather than towards "de-colorization and low saturation". Therefore, it can protect the true color of the edge and avoid the problem of gray or obvious saturation reduction at the edge.
Claims
1. A method for removing false color from images based on interpolation, characterized in that, include: Obtain the original image; Extract the cache window based on the current target pixel in the original image; Calculate the color difference channel values within the cache window; Based on the orientation information of the current target pixel, the color difference channel value is filtered to remove false colors; Using the filtered color difference channel values, the full channel values after removing false colors are calculated to output the image after removing false colors.
2. The image pseudo-color removal method based on interpolation according to claim 1, characterized in that, The step of filtering the color difference channel values based on the orientation information of the current target pixel to remove false colors includes: Based on the orientation information of the current target pixel, extract several candidate filtering points from the cache window to obtain a set of filtering points; Obtain the color difference channel values corresponding to all filter candidate points in the filter point set to obtain the filter dataset; The filtered dataset is subjected to categorical median filtering to obtain the color difference channel values of all candidate filtered points after removing false colors.
3. The image pseudo-color removal method based on interpolation according to any one of claims 1 or 2, characterized in that, The step of extracting the cache window based on the current target pixel in the original image includes: Based on the current target pixel in the original image, extract a buffer window of m rows and n columns, where m is an odd number greater than or equal to 3 and n is an odd number greater than or equal to 3; The current target pixel is located in the middle row and middle column of the cache window.
4. The image pseudo-color removal method based on interpolation according to any one of claims 1 or 2, characterized in that, The step of calculating the color difference channel value in the cache window includes: If the original image is an RGB image, then RG and BG are calculated as two color difference channels; If the original image is a YUV image, then U and V are taken as two color difference channels.
5. The image pseudo-color removal method based on interpolation according to claim 2, characterized in that, The orientation information of the current target pixel includes whether the current target pixel is on an edge, whether the current target pixel is a directional point, and the edge orientation of the current target pixel.
6. The image pseudo-color removal method based on interpolation according to claim 5, characterized in that, The step of extracting candidate filtering points from the cache window based on the orientation information of the current target pixel to obtain a set of filtering points includes: Determine if the current target pixel is on an edge; if so, determine if the current target pixel is a directional point. If the current target pixel is determined to be a directional point, then the direction perpendicular to the edge direction of the current target pixel is selected as the direction for selecting candidate points, and more than or equal to 8 filter candidate points are extracted from the cache window along the direction of the selected candidate points. If the current target pixel is determined to be a point without direction, then extract 8 or more filter candidate points from the cache window according to the isotropic distribution.
7. The image pseudo-color removal method based on interpolation according to claim 6, characterized in that, Eight of the extracted filter candidate points are adjacent to the current target pixel.
8. The image pseudo-color removal method based on interpolation according to claim 2, characterized in that, The step of performing median filtering on the filtered dataset to obtain the color difference channel values of all candidate filtered points after removing false colors includes: Based on the preset color difference channel threshold, the color difference channel values in the filtered dataset are divided into outlier color difference regions or target color difference regions. Determine whether the current target pixel is located in the target color difference region; If the color difference channel value of the current target pixel is located in the target color difference area, then its color difference channel value is retained; If the color difference channel value of the current target pixel is located in the outlier color difference region, then the color difference channel value of the current target pixel is replaced by the color difference channel value that is closest to the current target pixel in the target color difference region.
9. The image pseudo-color removal method based on interpolation according to claim 8, characterized in that, The step of determining whether the current target pixel is located in the target color difference region includes: Sort the color difference channel values in the filtered dataset according to a preset method; Obtain the rank of the color difference channel value of the current target pixel in the sorted filtered dataset; Determine whether the current target pixel is located in the target color difference region based on its position.
10. An image pseudo-color removal apparatus based on interpolation, used to implement the image pseudo-color removal method based on interpolation as described in any one of claims 1 to 9, characterized in that, The interpolation-based image pseudo-color removal device includes: The image acquisition module is used to acquire the original image; The color difference calculation module is used to extract the cache window and calculate the color difference channel values within the cache window; The filtering module is used to filter the color difference channel values based on the orientation information of the current target pixel in order to remove false colors; The image output module is used to calculate the full channel values after removing false colors using the filtered color difference channel values, so as to output the image after removing false colors.
11. A system-on-a-chip, characterized in that, The system-on-a-chip includes a processor and a memory, the processor and the memory being coupled together, the processor being used to execute a computer program stored in the memory to perform the image pseudo-color removal method based on interpolation as described in any one of claims 1 to 9.
12. A computer storage medium, characterized in that, The computer storage medium stores an executable program; when the executable program is executed, it implements the image pseudo-color removal method based on interpolation as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Image color edge processing method and device, storage medium and electronic equipment
CN112446830A
Image pseudo-color removing method and device based on self-adaption
CN118524296A
Image pseudo-color removing method and device
CN118524297A
Video image signal processing device, imaging device and video signal processing method
JP2009296471A