Image correction method and device, electronic equipment, medium and program product
Through channel separation and area division of the image, crosstalk pixels are found and corrected, which improves the quality and clarity of image correction and solves the problem of weakening image details and edge information caused by averaging processing.
Patent Information
- Application Number
- CN202410749954.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
During the image correction process in the existing technology, the averaging process will weaken the details and edge information of the image, resulting in a decrease in image quality.
By performing channel separation on the original image, dividing the edge area map and the flat area map, finding the crosstalk pixels whose pixel value is greater than the preset threshold, and performing a block search on them to match the target image block, based on the center pixel of the target image block Color channel values are corrected.
Effectively retain image edge details, avoid the weakening of edge information by mean filtering, and improve image correction quality and clarity.
Smart Images

Figure CN118608440A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image correction method, device, electronic device, medium and program product. Background Art
[0002] The original image output by the image sensor, taking the most commonly used Bayer pattern as an example, each pixel has only one color channel value, the green pixel (G pixel) and the red pixel (R pixel) are in the same row, the green pixel (G pixel) and the blue pixel (B pixel) are in another adjacent row, and the color channels of the G pixel are recorded as the Gr channel and the Gb channel, where the Gr channel represents the color channel of the G pixel in the same row as the R pixel, and the Gb channel represents the color channel of the G pixel in the same row as the B pixel. Because neighboring pixels may interfere with the central pixel, and because of possible incident light angles, the adjacent sensors absorb excess photons and convert them into electronic signals, thereby introducing maze noise into the image.
[0003] At present, in response to the above phenomenon, the average values of Gr and Gb within a certain range are first calculated, which can be recorded as Gr_Mean and Gb_Mean, and half of the average values are calculated as diff_Mean, and then diff_Mean is compared with the preset threshold; if diff_Mean is greater than the preset threshold, it is considered that there is crosstalk between Gr and Gb within the range, and correction is required. The correction is to use Gr'=(Gr+Gb) / 2, Gb'=(Gr+Gb) / 2 to directly replace all Gr and Gb within the original range. However, this method of averaging and correcting crosstalk pixels will weaken the original details and edge information in the image, reducing the image quality. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides an image correction method, device, electronic device, medium and program product, which can improve the quality of the corrected image.
[0005] In order to achieve the above purpose, the technical solutions provided by the embodiments of the present application are as follows:
[0006] In a first aspect, the present application provides an image correction method, comprising:
[0007] Separate the channels of the original image to obtain different color channel sub-images;
[0008] Divide the color channel sub-image into regions to obtain an edge region map and a flat region map;
[0009] From the edge area map and the flat area map, searching for crosstalk pixel points whose pixel values are greater than a preset threshold;
[0010] Perform block search on the area map corresponding to the crosstalk pixel point and match it to obtain the target image block;
[0011] Based on the color channel value of the central pixel of the target image block, the crosstalk pixels are corrected.
[0012] As an optional implementation of the embodiment of the present application, the color channel sub-image is divided into regions to obtain an edge region map and a flat region map, including: performing edge extraction on the color channel sub-image to obtain an edge region map; performing a subtraction operation on the color channel sub-image and the edge region map to obtain a flat region map.
[0013] As an optional implementation of the embodiment of the present application, searching for crosstalk pixel points whose pixel values are greater than a preset threshold from an edge area map and a flat area map includes: calculating a first pixel mean map and a first pixel difference map according to the edge area map; obtaining crosstalk pixel points when the first pixel mean map and the first pixel difference map satisfy a first preset condition; wherein the first preset condition includes: there are pixels in the first pixel mean map whose pixel values are greater than a first mean threshold, and / or there are pixels in the first pixel difference map whose pixel values are greater than a first difference threshold.
[0014] As an optional implementation of the embodiment of the present application, a block search is performed on the area map corresponding to the crosstalk pixel point to match and obtain the target image block, including: constructing an image pyramid for the edge area map corresponding to the crosstalk pixel point; and performing a block search on the image pyramid according to the crosstalk pixel point to obtain the target image block.
[0015] As an optional implementation of the embodiment of the present application, an image pyramid is constructed for the edge area corresponding to the crosstalk pixel point, including: taking the edge area map as the bottom layer, downsampling layer by layer to construct other layers on the bottom layer to obtain the image pyramid.
[0016] As an optional implementation of the embodiment of the present application, a block search is performed on the image pyramid according to the crosstalk pixel point to obtain a target image block, including: constructing a sliding window centered on the crosstalk pixel point; using the sliding window to perform a block search in the image pyramid to match the target image block.
[0017] In a second aspect, the present application provides an image correction device, the device comprising:
[0018] The channel separation module is used to separate the channels of the original image to obtain different color channel sub-images;
[0019] A region division module is used to divide the color channel sub-image into regions to obtain an edge region map and a flat region map;
[0020] A search module, used to search for crosstalk pixels whose pixel values are greater than a preset threshold from the edge area map and the flat area map;
[0021] A matching module is used to perform block search on the area map corresponding to the crosstalk pixel points and obtain the target image block by matching;
[0022] The correction module is used to correct the crosstalk pixels based on the color channel value of the central pixel of the target image block.
[0023] As an optional implementation of the embodiment of the present application, the region division module is specifically used to extract the edge of the color channel sub-image to obtain an edge region map; and perform a subtraction operation on the color channel sub-image and the edge region map to obtain a flat region map.
[0024] As an optional implementation of the embodiment of the present application, the search module is specifically used to calculate a first pixel mean map and a first pixel difference map based on the edge area map; when the first pixel mean map and the first pixel difference map meet a first preset condition, crosstalk pixels are obtained; wherein the first preset condition includes: a pixel value of a pixel in the first pixel mean map is greater than a first mean threshold, and / or a pixel value of a pixel in the first pixel difference map is greater than a first difference threshold.
[0025] As an optional implementation of the embodiment of the present application, the matching module is specifically used to construct an image pyramid for the edge area map corresponding to the crosstalk pixel points; based on the crosstalk pixel points, the image pyramid is block searched to obtain the target image block.
[0026] As an optional implementation of the embodiment of the present application, the matching module is specifically used to take the edge area map as the bottom layer, downsample layer by layer to construct other layers on the bottom layer, and obtain an image pyramid.
[0027] As an optional implementation of the embodiment of the present application, the matching module is specifically used to construct a sliding window centered on the crosstalk pixel point; and use the sliding window to perform block search in the image pyramid to match the target image block.
[0028] In a third aspect, the present application provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the image correction method as described in the first aspect or any one of its optional embodiments is implemented.
[0029] In a fourth aspect, the present application provides a computer-readable storage medium, comprising: a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the image correction method as described in the first aspect or any one of its optional embodiments.
[0030] In a fifth aspect, the present application provides a computer program product, comprising: the computer program product comprises a computer program, and when the computer program runs on a computer, the computer implements the image correction method as described in the first aspect or any one of its optional embodiments.
[0031] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:
[0032] The embodiments of the present application provide an image correction method, device, electronic device, medium and program product, wherein the method first performs channel separation on the original image to obtain sub-images of different color channels, then divides the color channel sub-images into regions to obtain edge region images and flat region images, and then searches for crosstalk pixels whose pixel values are greater than a preset threshold from the edge region images and the flat region images, and then performs a block search on the region images corresponding to the crosstalk pixels, matches to obtain the target image block, and further corrects the crosstalk pixels based on the color channel value of the central pixel of the target image block. In this way, the implementation of the present application divides the edge region image and the flat region image, and processes the different region images independently, thereby retaining the image edge details, avoiding the weakening of the image edge information by direct mean filter correction, and is conducive to improving the quality and clarity of image correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] Figure 1 A schematic diagram of a flow chart of an image correction method provided in an embodiment of the present application;
[0036] Figure 2 A schematic diagram of an image pyramid provided in an embodiment of the present application;
[0037] Figure 3 A schematic diagram of the structure of an image correction device provided in an embodiment of the present application;
[0038] Figure 4 A schematic diagram of the structure of an electronic device described in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only part of the embodiments of the present application, rather than all of the embodiments.
[0041] In order to solve some or all of the technical problems existing in the related art, the embodiments of the present application provide an image correction method, device, electronic device, medium and program product, wherein the method first performs channel separation on the original image to obtain sub-images of different color channels, and then divides these color channel sub-images into regions to obtain edge region maps and flat region maps, and then searches for crosstalk pixels whose pixel values are greater than a preset threshold from the edge region maps and the flat region maps, and then performs block search on the region maps corresponding to the crosstalk pixels, matches to obtain the target image block, and further corrects the crosstalk pixels based on the color channel value of the central pixel of the target image block. In this way, the implementation of the present application divides the edge region map and the flat region map, and processes the different region maps independently, thereby retaining the image edge details, avoiding the weakening of the image edge information by direct mean filter correction, and is beneficial to improving the quality and clarity of image correction.
[0042] An image correction method provided in the embodiments of the present application can be implemented by an image correction device or an electronic device, and the electronic device includes but is not limited to a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. The operating system of the electronic device may include Android, a mobile operating system (iOS) developed by Apple, an operating system (Windows) developed by Microsoft Corporation of the United States, etc., and the embodiments of the present application are not limited to this. The electronic device can be operated alone to implement the present application, or it can be connected to the network and implement the present application through interactive operations with other computer devices in the network. Among them, the network in which the electronic device is located includes but is not limited to the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN) network, etc.
[0043] It should be noted that the protection scope of the image correction method described in the embodiment of the present application is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0044] like Figure 1 As shown, Figure 1This is a flow chart of an image correction method according to an embodiment of the present application. The method can be performed by an image correction device, wherein the device can be implemented using software and / or hardware and can generally be integrated into an electronic device.
[0045] like Figure 1 As shown, the method mainly includes the following steps S101 to S105:
[0046] S101, performing channel separation on the original image to obtain different color channel sub-images.
[0047] The different color channels include Gr channel and Gb channel. Correspondingly, the color channel sub-images include Gr sub-image and Gb sub-image. Optionally, the size of Gr sub-image is one quarter of the original image, and the size of Gb sub-image is one quarter of the original image.
[0048] Specifically, the original image is subjected to channel separation, and the original image is separated into sub-images with different color channels, that is, different color channel sub-images are obtained.
[0049] S102 , dividing the color channel sub-image into regions to obtain an edge region image and a flat region image.
[0050] In some embodiments, in the process of dividing the color channel sub-image into regions, the color channel sub-image is firstly subjected to edge extraction to obtain an edge region map, and then the color channel sub-image and the edge region map are subtracted to obtain a flat region map.
[0051] Optionally, the Laplacian operator is used to extract the edge of the color channel sub-image, as shown in the following formula (1):
[0052] ▽2f(x,y) = f(x+1,y) + f(x-1,y) + f(x,y-1) + f(x,y+1) -4f(x,y) (1)
[0053] In formula (1), ▽2 is a second-order Laplacian operator, and f(x, y) represents the pixel value of the pixel point (x, y) to be processed in the color channel sub-image. Exemplarily, assuming that a 3*3 window is used for Laplacian filtering, f(x+1, y) represents the pixel value of the pixel point in the same row and the right column as the pixel point to be processed in the color channel sub-image, f(x-1, y) represents the pixel value of the pixel point in the same row and the left column as the pixel point to be processed in the color channel sub-image, f(x, y-1) represents the pixel value of the pixel point in the same column and the next row as the pixel point to be processed in the color channel sub-image, and f(x, y+1) represents the pixel value of the pixel point in the same column and the next row as the pixel point to be processed in the color channel sub-image.
[0054] Exemplarily, the edge of the Gr sub-graph and the Gb sub-graph is extracted by the Laplace operator to obtain the edge area map corresponding to the Gr sub-graph, which is recorded as the GrEdge map, and the edge area map corresponding to the Gb sub-graph, which is recorded as the GbEdge map. Then, the Gr sub-graph is subtracted from the GrEdge map to obtain the corresponding flat area map, which is recorded as the GrFLat map, and the Gb sub-graph is subtracted from the GbEdge map to obtain the corresponding flat area map, which is recorded as the GbFlat map.
[0055] S103 , searching for crosstalk pixel points whose pixel values are greater than a preset threshold from the edge area map and the flat area map.
[0056] The following will introduce the edge area map and flat area map respectively:
[0057] (1) Edge area map
[0058] In some embodiments, during the execution of step S103, a first pixel mean map and a first pixel difference map are first calculated based on the edge area map, and then the crosstalk pixel points are determined when the first pixel mean map and the first pixel difference map meet a first preset condition.
[0059] Among them, the first preset condition includes: there are pixels in the first pixel mean map whose pixel values are greater than the first mean threshold, and / or there are pixels in the first pixel difference map whose pixel values are greater than the first difference threshold.
[0060] Specifically, according to the edge area map corresponding to the different color channel sub-images, the first pixel mean map is obtained by averaging each pixel. According to the edge area map corresponding to the different color channel sub-images, the first pixel difference map is obtained by subtracting each pixel. The pixel values of all pixels in the first pixel mean map are traversed and compared with the first mean threshold. If the pixel value of a certain pixel is greater than the first mean threshold, it indicates that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel; and / or, the pixel values of all pixels in the first pixel difference map are traversed and compared with the first difference threshold. If the pixel value of a certain pixel is greater than the first difference threshold, it indicates that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel.
[0061] Exemplarily, following the previous example, the first pixel mean map EdgeMean is calculated based on the following formula (2):
[0062]
[0063] The first pixel difference map EdgeDiff is calculated based on the following formula (3):
[0064]
[0065] Assume that the first mean threshold is EdgeMeanThe, and the first difference threshold is EdgeDiffThe. Traverse the first pixel mean map EdgeMean and compare it with the first mean threshold EdgeMeanThe; and traverse the first pixel difference map EdgeDiff and compare it with the first difference threshold EdgeDiffThe. If there is a pixel point in the first pixel mean map EdgeMean whose pixel value is greater than EdgeMeanThe, it means that the pixel point is unbalanced and needs to be corrected, and the pixel point is used as a crosstalk pixel point; and / or, if the pixel value of a pixel point in the first pixel difference map EdgeDiff is greater than the first difference threshold EdgeDiffThe, it means that the pixel point is unbalanced and needs to be corrected, and the pixel point is used as a crosstalk pixel point.
[0066] (2) Flat area
[0067] In some embodiments, during the execution of step S103, a second pixel mean map and a second pixel difference map are calculated based on the flat area map, and then the crosstalk pixel points are determined when the second pixel mean map and the second pixel difference map meet a second preset condition.
[0068] The second preset condition includes: there are pixels in the second pixel mean map whose pixel values are greater than the second mean threshold, and / or there are pixels in the second pixel difference map whose pixel values are greater than the second difference threshold.
[0069] Specifically, according to the flat area map corresponding to the different color channel sub-images, the second pixel mean map is obtained by averaging each pixel. According to the flat area map corresponding to the different color channel sub-images, the second pixel difference map is obtained by subtracting each pixel. The pixel values of all pixels in the second pixel mean map are traversed and compared with the second mean threshold. If the pixel value of a certain pixel is greater than the second mean threshold, it indicates that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel; and / or, the pixel values of all pixels in the second pixel difference map are traversed and compared with the second difference threshold. If the pixel value of a certain pixel is greater than the second difference threshold, it indicates that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel.
[0070] Exemplarily, following the previous example, the second pixel mean map FlatMean is calculated based on the following formula (4):
[0071]
[0072] The second pixel difference map FlatDiff is calculated based on the following formula (5):
[0073]
[0074] Assume that the second mean threshold is FlatMeanThe and the second difference threshold is FlatDiffThe. Traverse the second pixel mean map FlatMean and compare it with the second mean threshold FlatMeanThe; and traverse the second pixel difference map FlatDiff and compare it with the second difference threshold FlatDiffThe. If the pixel value of a certain pixel in the second pixel mean map FlatMean is greater than the second mean threshold FlatMeanThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel; and / or, if the pixel value of a certain pixel in the second pixel difference map FlatDiff is greater than the second difference threshold FlatDiffThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel.
[0075] In some embodiments, after executing step S103, when crosstalk pixels are found in the flat area map and the edge area does not contain crosstalk pixels, mean filtering is performed on the flat area map. Optionally, a sliding window centered on the crosstalk pixels is constructed, and mean filtering is performed on the flat area map based on the sliding window, thereby compensating for unbalanced pixels in the flat area.
[0076] It is understandable that if only crosstalk pixels are found in the flat area map, it means that the imbalance phenomenon only exists in the flat area of the image. At this time, the flat area map can be directly subjected to mean filtering to correct the imbalance. If no crosstalk pixels are found in the edge area map, it means that the image is balanced, and no processing is performed. Further, the corrected flat area map and the unprocessed edge area map are merged to obtain the corrected image. In this way, by dividing the image into flat areas and edge areas, and processing them separately, the flat area is processed independently in the case of imbalance, which is fast and convenient, and retains the original edge details of the image, avoiding the weakening of the image edge, thereby ensuring the quality of the image after correction, and improving the image quality compared to traditional technologies.
[0077] Exemplarily, a 3*3 window is constructed with the crosstalk pixel as the center, and the 3*3 window is used to perform mean filtering on the Gr image and the Gb image.
[0078] In other embodiments, after executing step S103, when crosstalk pixels are found in the flat area and the edge area does not contain crosstalk pixels, steps S104 to S105 can be executed. The specific implementation method is introduced later. Compared with mean filtering, the image correction effect is greatly improved.
[0079] S104: Perform block search on the area map corresponding to the crosstalk pixel point, and obtain the target image block by matching.
[0080] The area maps corresponding to the crosstalk pixel points include: an edge area map, a flat area map, and an edge area map and a flat area map. The following will introduce step S104 according to these three situations:
[0081] (1) The area map corresponding to the crosstalk pixel is the edge area map
[0082] In some embodiments, the area map corresponding to the crosstalk pixel points is an edge area map, indicating that the imbalance of the original image occurs in the edge area, and an image pyramid is constructed for the edge area map corresponding to the crosstalk pixel points; a block search is performed on the image pyramid based on the crosstalk pixel points to obtain a target image block.
[0083] Among them, the edge region map corresponding to the crosstalk pixel point can be the edge region map of different color channel sub-maps. It can be understood that there are crosstalk pixels in the edge region map of different color channel sub-maps, and the number of edge region maps corresponding to the crosstalk pixel points is less than or equal to the number of edge regions of the color channel sub-map. For example, the edge region map corresponding to the crosstalk pixel point is a GrEdge map and a GbEdge map. Correspondingly, the image pyramid can be represented as a GrEdge pyramid and a GbEdge pyramid.
[0084] Optionally, the edge area map is used as the bottom layer, and downsampling is performed layer by layer to construct other layers on the bottom layer to obtain an image pyramid; a sliding window centered on the crosstalk pixel point is constructed, and the sliding window is used to perform block search in the image pyramid to match the target image block.
[0085] Specifically, the original edge area map is used as the bottom layer, i.e., the kth layer, and even rows and columns are extracted layer by layer to construct other layers on the kth layer to obtain an image pyramid. Due to the self-similarity of images, the present application constructs a sliding window with the crosstalk pixel point as the center, and uses the sliding window to search for matching target image blocks in different layers of the image pyramid, and the target image blocks are similar to the image blocks defined by the crosstalk pixel points.
[0086] For example, the original edge region map is taken as the kth layer, even rows and columns are extracted from the edge region map of the kth layer as the k+1th layer, even rows and columns are extracted from the k+1th layer as the k+2th layer, and so on, to construct a 5-layer image pyramid, such as Figure 2 As shown, Figure 2 A schematic diagram of an image pyramid provided in an embodiment of the present application. A sliding window of size 5*5 is constructed with the crosstalk pixel as the center, and a block search is performed in each layer of the image pyramid to find the target image block.
[0087] (2) The area map corresponding to the crosstalk pixel is a flat area map
[0088] In some embodiments, the area map corresponding to the crosstalk pixel points is a flat area map, indicating that the imbalance of the original image occurs in the flat area. An image pyramid can be constructed for the flat area map corresponding to the crosstalk pixel points; a block search is performed on the image pyramid based on the crosstalk pixel points to obtain a target image block.
[0089] Among them, the flat area map corresponding to the crosstalk pixel point can be the flat area map of different color channel sub-images. It can be understood that there are crosstalk pixels in the flat area map of different color channel sub-images, and the number of flat area maps corresponding to the crosstalk pixels is less than or equal to the number of flat areas of the color channel sub-image. For example, the flat area map corresponding to the crosstalk pixel point is a GrFlat map and a GbFlat map. Correspondingly, the image pyramid can be represented as a GrFlat pyramid and a GbFlat pyramid.
[0090] Optionally, the flat area map is used as the bottom layer, and downsampling is performed layer by layer to construct other layers on the bottom layer to obtain an image pyramid; a sliding window centered on the crosstalk pixel point is constructed, and the sliding window is used to perform block search in the image pyramid to match the target image block.
[0091] Specifically, the original flat area map is used as the bottom layer, i.e., the kth layer, and even rows and columns are extracted layer by layer to construct other layers on the kth layer to obtain an image pyramid. Due to the self-similarity of images, the present application constructs a sliding window with the crosstalk pixel point as the center, and uses the sliding window to search for matching target image blocks in different layers of the image pyramid, and the target image blocks are similar to the image blocks defined by the crosstalk pixel points.
[0092] For example, the original flat area map is taken as the kth layer, even rows and columns are extracted from the flat area map of the kth layer as the k+1th layer, even rows and columns are extracted from the k+1th layer as the k+2th layer, and so on, to construct a 5-layer image pyramid. With the crosstalk pixel point as the center, a sliding window of size 5*5 is constructed, and a block search is performed in each layer of the image pyramid to find the target image block.
[0093] (1) The area maps corresponding to the crosstalk pixels are the edge area map and the flat area map
[0094] In some embodiments, as described in the aforementioned embodiments, crosstalk pixel points whose pixel values are greater than a preset threshold are searched from the edge area map, and crosstalk pixel points whose pixel values are greater than a preset threshold are searched from the flat area map. The specific implementation methods can refer to the aforementioned implementation methods, and this application will not elaborate on them here.
[0095] S105 , correcting the crosstalk pixels based on the color channel value of the central pixel of the target image block.
[0096] In any of the above embodiments, after finding the target image block, the color channel value of the central pixel of the target image block is calculated, and the crosstalk pixel is corrected using the color channel value. It should be noted that the pixel value of the crosstalk pixel is greater than the pixel values of the surrounding pixels.
[0097] Exemplarily, the color channel value of the central pixel of the target image block is calculated, denoted as Ratio, Ratio = min{Gr value, Gb value}. It can be understood that Ratio = Gr / Gb value. During correction, the smaller color channel value is selected to correct the crosstalk pixel.
[0098] In some implementations, different correction processing can be performed on the crosstalk pixels in the edge area image and the crosstalk pixels in the flat area image, including: for the crosstalk pixels in the edge area image, after finding the target image block, the color channel value of the central pixel of the target image block is calculated, and the crosstalk pixels are corrected using the color channel value. For the crosstalk pixels in the flat area image, a sliding window centered on the crosstalk pixels is constructed, and the color channel sub-image is mean filtered based on the window.
[0099] The above embodiment processes the edge area and the flat area of the image independently, thereby retaining the edge information, avoiding the weakening of the edge information by uniformly performing mean filtering on the image, and effectively improving the clarity of the image.
[0100] In summary, the embodiment of the present application provides an image correction method, which first performs channel separation on the original image to obtain sub-images of different color channels, then divides the color channel sub-images into regions to obtain edge region images and flat region images, and then searches for crosstalk pixels whose pixel values are greater than a preset threshold from the edge region images and / or flat region images, and then performs block search on the region images corresponding to the crosstalk pixels, matches to obtain the target image block, and further corrects the crosstalk pixels based on the color channel value of the central pixel of the target image block. In this way, the implementation of the present application divides the edge region images and the flat region images, and processes the different region images independently, thereby retaining the image edge details and avoiding the weakening of the image edge information by direct mean filter correction, which is beneficial to improving the quality and clarity of image correction.
[0101] The present application provides an image correction method, and a feasible embodiment of the method includes the following steps S201 to S208:
[0102] S201, performing channel separation on the original image to obtain different color channel sub-images.
[0103] Exemplarily, the original image rawdata is subjected to channel separation to obtain a Gr sub-image and a Gb sub-image.
[0104] S202: Extract edges of the color channel sub-image to obtain an edge region image.
[0105] Exemplarily, the Laplacian operator is used to perform edge extraction on the color channel sub-images: Gr sub-image and Gb sub-image, to obtain edge region images GrEdge image and GbEdge image.
[0106] S203 , performing a subtraction operation between the color channel sub-image and the edge region image to obtain a flat region image.
[0107] Exemplarily, the GrEdge map is subtracted from the Gr sub-map to obtain the corresponding flat area map GrFLat map, and the GbEdge map is subtracted from the Gb sub-map to obtain the corresponding flat area map GbFlat map.
[0108] The following will respectively search and correct the crosstalk pixels for the flat area map and the edge area map. The search and correct the crosstalk pixels for the flat area map includes steps S204 to S205, and the search and correct the crosstalk pixels for the flat area map includes steps S206 to S208.
[0109] S204, searching for crosstalk pixel points whose pixel values are greater than a preset threshold in the flat area map,
[0110] Optionally, S204 includes the following steps S2041 to S2043:
[0111] S2041. Calculate a second pixel mean map and a second pixel difference map according to the flat area map.
[0112] Specifically, according to the flat area maps corresponding to the different color channel sub-maps, average values are calculated pixel by pixel to obtain the second pixel average map. According to the flat area maps corresponding to the different color channel sub-maps, pixel differences are calculated pixel by pixel to obtain the second pixel difference map.
[0113] Exemplarily, the second pixel mean map FlatMean is calculated based on the following formula (4):
[0114]
[0115] The second pixel difference map FlatDiff is calculated based on the following formula (5):
[0116]
[0117] Assume that the second mean threshold is FlatMeanThe, and the second difference threshold is FlatDiffThe.
[0118] S2042: traverse the second pixel mean map and compare it with the second mean threshold, and traverse the second pixel difference map and compare it with the second difference threshold.
[0119] Exemplarily, the second pixel mean map FlatMean is traversed and compared with the second mean threshold FlatMeanThe, and the second pixel difference map FlatDiff is traversed and compared with the second difference threshold FlatDiffThe.
[0120] S2043. If a pixel value of a certain pixel in the second pixel mean map is greater than a second mean threshold, the pixel is taken as a crosstalk pixel; and / or, if a pixel value of a certain pixel in the second pixel difference map is greater than a second difference threshold, the pixel is taken as a crosstalk pixel.
[0121] Exemplarily, if a pixel value of a certain pixel in the second pixel mean map FlatMean is greater than the second mean threshold FlatMeanThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel;
[0122] and / or,
[0123] If the pixel value of a certain pixel in the second pixel difference map FlatDiff is greater than the second difference threshold FlatDiffThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel.
[0124] S205 , constructing a sliding window centered on the crosstalk pixel point, and performing mean filtering on the flat area map based on the sliding window.
[0125] S206 , searching the edge region map for crosstalk pixel points whose pixel values are greater than a preset threshold.
[0126] Optionally, step S206 includes the following steps S2061 to S2063:
[0127] S2061. Calculate a first pixel mean map and a first pixel difference map according to the edge area map.
[0128] Specifically, according to the edge region images corresponding to the different color channel sub-images, the average of each pixel is calculated to obtain the first pixel average image. According to the edge region images corresponding to the different color channel sub-images, the difference of each pixel is calculated to obtain the first pixel difference image.
[0129] Exemplarily, the first pixel mean map EdgeMean is calculated based on the following formula (2):
[0130]
[0131] The first pixel difference map EdgeDiff is calculated based on the following formula (3):
[0132]
[0133] Assume that the first mean threshold is EdgeMeanThe, and the first difference threshold is EdgeDiffThe.
[0134] S2062, traverse the first pixel mean map and compare it with the first mean threshold; and traverse the first pixel difference map EdgeDiff and compare it with the first difference threshold EdgeDiffThe.
[0135] Exemplarily, the first pixel mean map EdgeMean is traversed and compared with EdgeMeanThe; and the first pixel difference map EdgeDiff is traversed and compared with the first difference threshold EdgeDiffThe.
[0136] S2063. If a pixel value of a certain pixel in the first pixel mean map is greater than a first mean threshold, the pixel is taken as a crosstalk pixel; and / or, if a pixel value of a certain pixel in the first pixel difference map is greater than a first difference threshold, the pixel is taken as a crosstalk pixel.
[0137] Exemplarily, if a pixel value of a certain pixel in the first pixel mean map EdgeMean is greater than the first mean threshold EdgeMeanThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel;
[0138] and / or,
[0139] If the pixel value of a certain pixel in the first pixel difference map EdgeDiff is greater than the first difference threshold EdgeDiffThe, it means that the pixel is unbalanced and needs to be corrected, and the pixel is used as a crosstalk pixel.
[0140] S207 , performing block search on the edge region map corresponding to the crosstalk pixel point, and matching to obtain a target image block.
[0141] Step S207 includes the following steps S2071-S2072:
[0142] S2071. Use the edge area map as the bottom layer, perform downsampling layer by layer to construct other layers on the bottom layer, and obtain an image pyramid.
[0143] For example, the original edge region map is taken as the kth layer, even rows and columns are extracted from the edge region map of the kth layer as the k+1th layer, even rows and columns are extracted from the k+1th layer as the k+2th layer, and so on, to construct a 5-layer image pyramid, such as Figure 2shown.
[0144] S2072: construct a sliding window centered on the crosstalk pixel, and use the sliding window to perform block search in the image pyramid to match and obtain the target image block.
[0145] Exemplarily, a sliding window of size 5*5 is constructed with the crosstalk pixel as the center, and a block search is performed in each layer of the image pyramid to find the target image block.
[0146] S208 , correcting the crosstalk pixels based on the color channel value of the central pixel of the target image block.
[0147] Exemplarily, the color channel value of the central pixel of the target image block is calculated, denoted as Ratio, Ratio = min{Gr value, Gb value}. It can be understood that Ratio = Gr / Gb value. During correction, the smaller color channel value is selected to correct the crosstalk pixel.
[0148] The above embodiment distinguishes the edge area and the flat area of the image by dividing the edge area map and the flat area map, so as to independently process the different area maps, thereby retaining the image edge details and avoiding the weakening of the image edge information by direct unified mean filtering correction, which is beneficial to improving the quality and clarity of image correction.
[0149] like Figure 3 As shown, Figure 3 A schematic diagram of the structure of an image correction device provided in an embodiment of the present application, the device comprising:
[0150] The channel separation module 301 is used to perform channel separation on the original image to obtain different color channel sub-images;
[0151] A region division module 302 is used to divide the color channel sub-image into regions to obtain an edge region map and a flat region map;
[0152] A search module 303 is used to search for crosstalk pixels whose pixel values are greater than a preset threshold from the edge area map and the flat area map;
[0153] A matching module 304 is used to perform block search on the region map corresponding to the crosstalk pixel point, and obtain a target image block by matching;
[0154] The correction module 305 is used to correct the crosstalk pixels based on the color channel value of the central pixel of the target image block.
[0155] As an optional implementation of the embodiment of the present application, the region division module 302 is specifically used to extract the edge of the color channel sub-image to obtain an edge region map; and perform a subtraction operation on the color channel sub-image and the edge region map to obtain a flat region map.
[0156] As an optional implementation of the embodiment of the present application, the search module 303 is specifically used to calculate the first pixel mean map and the first pixel difference map based on the edge area map; when the first pixel mean map and the first pixel difference map meet the first preset condition, the crosstalk pixel point is obtained; wherein the first preset condition includes: the pixel value of the pixel point in the first pixel mean map is greater than the first mean threshold, and / or the pixel value of the pixel point in the first pixel difference map is greater than the first difference threshold.
[0157] As an optional implementation of the embodiment of the present application, the matching module 304 is specifically used to construct an image pyramid for the edge area map corresponding to the crosstalk pixel points; and perform block search on the image pyramid according to the crosstalk pixel points to obtain the target image block.
[0158] As an optional implementation of the embodiment of the present application, the matching module 304 is specifically configured to use the edge region map as the bottom layer, downsample layer by layer to construct other layers on the bottom layer, and obtain an image pyramid.
[0159] As an optional implementation of the embodiment of the present application, the matching module 304 is specifically used to construct a sliding window centered on the crosstalk pixel point; and use the sliding window to perform block search in the image pyramid to match and obtain the target image block.
[0160] In summary, the embodiment of the present application provides an image correction device, which first performs channel separation on the original image through a channel separation module to obtain different color channel sub-images, and then performs region division on these color channel sub-images through a region division module to obtain an edge region map and a flat region map, and then searches for crosstalk pixels whose pixel values are greater than a preset threshold from the edge region map and the flat region map through a search module, and then a matching module performs a block search on the region map corresponding to the crosstalk pixels, and matches to obtain a target image block, and further corrects the crosstalk pixels based on the color channel value of the central pixel of the target image block through a correction module. In this way, the implementation of the present application divides the edge region map and the flat region map, and processes the different region maps independently, thereby retaining the image edge details and avoiding the weakening of the image edge information by direct mean filter correction, which is beneficial to improving the quality and clarity of image correction.
[0161] For the specific definition of the image correction device, please refer to the definition of the image correction method above, which will not be repeated here. Each module in the above-mentioned image correction device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0162] In one embodiment, the present application provides an electronic device, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a method for detecting a jam is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0163] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0164] In one embodiment, the image correction device provided by the present application can be implemented in the form of a computer program. The computer program can be Figure 4 The memory of the electronic device may store various program modules constituting the image correction device, for example, Figure 3 The channel separation module 301, the region division module 302, the search module 303, the matching module 304 and the correction module 305 are shown. The computer program composed of each program module enables the processor to execute the steps of the image correction method of each embodiment of the present application described in this specification.
[0165] For example, Figure 4 The electronic device shown can be Figure 3 The channel separation module 301 in the image correction device shown performs channel separation on the original image to obtain different color channel sub-images; the electronic device can use the area division module 302 to perform area division on the color channel sub-image to obtain an edge area map and a flat area map; the electronic device can use the search module 303 to search for crosstalk pixels whose pixel values are greater than a preset threshold from the edge area map and the flat area map; the electronic device can use the matching module 304 to perform block search on the area map corresponding to the crosstalk pixels to obtain the target image block; the electronic device can use the correction module 305 to correct the crosstalk pixels based on the color channel value of the central pixel of the target image block.
[0166] In one embodiment, the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: performing edge extraction on a color channel sub-image to obtain an edge area map; performing a subtraction operation on the color channel sub-image and the edge area map to obtain a flat area map.
[0167] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to the edge area map, a first pixel mean map and a first pixel difference map are calculated; when the first pixel mean map and the first pixel difference map meet a first preset condition, crosstalk pixels are obtained; wherein the first preset condition includes: a pixel value of a pixel in the first pixel mean map is greater than a first mean threshold, and / or a pixel value of a pixel in the first pixel difference map is greater than a first difference threshold.
[0168] In one embodiment, when the processor executes the computer program, the following steps are further implemented: constructing an image pyramid for an edge region map corresponding to the crosstalk pixel points; and performing a block search on the image pyramid according to the crosstalk pixel points to obtain a target image block.
[0169] In one embodiment, when the processor executes the computer program, the following steps are further implemented: using the edge region map as the bottom layer, downsampling layer by layer to construct other layers on the bottom layer, and obtaining an image pyramid.
[0170] In one embodiment, when the processor executes the computer program, the following steps are further implemented: constructing a sliding window centered on the crosstalk pixel point; and using the sliding window to perform a block search in the image pyramid to match and obtain a target image block.
[0171] When the processor in the electronic device provided by the present application executes the computer program, it first performs channel separation on the original image to obtain sub-images of different color channels, and then divides these color channel sub-images into regions to obtain edge region images and flat region images, and then searches for crosstalk pixels whose pixel values are greater than a preset threshold from the edge region images and the flat region images, and then performs block search on the region images corresponding to the crosstalk pixels, matches to obtain the target image block, and further corrects the crosstalk pixels based on the color channel value of the central pixel of the target image block. In this way, the implementation of the present application divides the edge region image and the flat region image, and processes the different region images independently, thereby retaining the image edge details, avoiding the weakening of the image edge information by direct mean filter correction, and is conducive to improving the quality and clarity of image correction.
[0172] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by the computer program, the following steps are implemented:
[0173] Separate the channels of the original image to obtain different color channel sub-images;
[0174] Divide the color channel sub-image into regions to obtain an edge region map and a flat region map;
[0175] From the edge area map and the flat area map, searching for crosstalk pixel points whose pixel values are greater than a preset threshold;
[0176] Perform block search on the area map corresponding to the crosstalk pixel point and match it to obtain the target image block;
[0177] Based on the color channel value of the central pixel of the target image block, the crosstalk pixels are corrected.
[0178] In one embodiment, when the computer program is executed, the computer program further implements the following steps: performing region division on the color channel sub-image to obtain an edge region image and a flat region image, including: performing edge extraction on the color channel sub-image to obtain an edge region image; performing a subtraction operation on the color channel sub-image and the edge region image to obtain a flat region image.
[0179] In one embodiment, when the computer program executes the computer program, the following steps are also implemented: searching for crosstalk pixel points whose pixel values are greater than a preset threshold from the edge area map and the flat area map, including: calculating a first pixel mean map and a first pixel difference map based on the edge area map; obtaining crosstalk pixel points when the first pixel mean map and the first pixel difference map meet a first preset condition; wherein the first preset condition includes: there are pixel points in the first pixel mean map whose pixel values are greater than a first mean threshold, and / or there are pixel points in the first pixel difference map whose pixel values are greater than a first difference threshold.
[0180] In one embodiment, when the computer program is executed, the following steps are also implemented: performing a block search on the area map corresponding to the crosstalk pixel points to match and obtain a target image block, including: constructing an image pyramid for the edge area map corresponding to the crosstalk pixel points; and performing a block search on the image pyramid according to the crosstalk pixel points to obtain a target image block.
[0181] In one embodiment, when the computer program is executed, the computer program further implements the following steps: constructing an image pyramid for the edge area corresponding to the crosstalk pixel point, including: taking the edge area map as the bottom layer, downsampling layer by layer to construct other layers on the bottom layer to obtain the image pyramid.
[0182] In one embodiment, when the computer program is executed, the computer program further implements the following steps: performing a block search on the image pyramid according to the crosstalk pixel point to obtain a target image block, including: constructing a sliding window centered on the crosstalk pixel point; using the sliding window to perform a block search in the image pyramid to match and obtain the target image block.
[0183] When the computer program in the computer-readable storage medium provided by the present application is executed, the original image is firstly channel-separated to obtain sub-images of different color channels, and these color channel sub-images are then region-divided to obtain edge region images and flat region images, and then crosstalk pixels whose pixel values are greater than a preset threshold are searched from the edge region images and the flat region images, and then block search is performed on the region images corresponding to the crosstalk pixels, and the target image blocks are obtained by matching, and the crosstalk pixels are further corrected based on the color channel values of the central pixels of the target image blocks. In this way, the implementation of the present application divides the edge region images and the flat region images, and processes the different region images independently, thereby retaining the image edge details, avoiding the weakening of the image edge information by direct mean filter correction, and is conducive to improving the quality and clarity of image correction.
[0184] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media that include computer-usable program code.
[0185] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0186] In the present application, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0187] In this application, memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0188] In this application, computer-readable media includes permanent and non-permanent, removable and non-removable storage media. Storage media can be implemented by any method or technology to store information, and the information can be computer-readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0189] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0190] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An image correction method, characterized in that: include: Separate the channels of the original image to obtain different color channel sub-images; Performing region division on the color channel sub-image to obtain an edge region image and a flat region image; Searching for crosstalk pixel points whose pixel values are greater than a preset threshold from the edge area map and the flat area map; Performing block search on the area map corresponding to the crosstalk pixel point to obtain a target image block by matching; Based on the color channel value of the central pixel of the target image block, the crosstalk pixel is corrected.
2. The method according to claim 1, characterized in that The step of dividing the color channel sub-image into regions to obtain an edge region image and a flat region image comprises: Performing edge extraction on the color channel sub-image to obtain an edge region image; A subtraction operation is performed on the color channel sub-image and the edge area image to obtain the flat area image.
3. The method according to claim 1, characterized in that: The step of searching, from the edge area map and the flat area map, crosstalk pixel points whose pixel values are greater than a preset threshold value comprises: Calculating a first pixel mean map and a first pixel difference map according to the edge area map; When the first pixel mean map and the first pixel difference map satisfy a first preset condition, obtaining the crosstalk pixel point; Among them, the first preset condition includes: there are pixels in the first pixel mean map whose pixel values are greater than a first mean threshold, and / or there are pixels in the first pixel difference map whose pixel values are greater than a first difference threshold.
4. The method according to claim 1, characterized in that: The performing block search on the area map corresponding to the crosstalk pixel point to match and obtain the target image block includes: Constructing an image pyramid for the edge area map corresponding to the crosstalk pixel point; According to the crosstalk pixel points, a block search is performed on the image pyramid to obtain the target image block.
5. The method according to claim 4, characterized in that The constructing an image pyramid for the edge area corresponding to the crosstalk pixel point includes: The edge region map is used as a bottom layer, and down-sampled layer by layer to construct other layers on the bottom layer to obtain the image pyramid.
6. The method according to claim 4, characterized in that The performing a block search on the image pyramid according to the crosstalk pixel points to obtain the target image block includes: Constructing a sliding window centered on the crosstalk pixel; The sliding window is used to perform a block search in the image pyramid to match and obtain the target image block.
7. An image correction device, characterized in that: include: The channel separation module is used to separate the channels of the original image to obtain different color channel sub-images; A region division module, used for performing region division on the color channel sub-image to obtain an edge region image and a flat region image; A search module, used to search for crosstalk pixel points whose pixel values are greater than a preset threshold from the edge area map and the flat area map; A matching module, used for performing block search on the area map corresponding to the crosstalk pixel point, and matching to obtain a target image block; A correction module is used to correct the crosstalk pixels based on the color channel value of the central pixel of the target image block.
8. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the image correction method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: include: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the image correction method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that include: The computer program product comprises a computer program, and when the computer program is executed on a computer, the computer is enabled to implement the image correction method according to any one of claims 1 to 6.
Citation Information
Cited By
Image compression method and device, computer equipment, storage medium and program product
CN119211554A
Image compression method, device, computer equipment, storage medium and program product
CN119211554B
