Image processing method and device, chip and electronic equipment

Through image registration and fusion processing, the image is converted into a three-channel arrangement of R, G, and B, which solves the problem of loss of clarity and contrast caused by the loose arrangement of pixels during image correction in the existing technology, and achieves a higher accuracy and information density.

CN118587130APending Publication Date: 2024-09-03BEIJING X RING TECHNOLOGY CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the image correction process of the existing technology, the pixels of the R, G, and B channels are not closely arranged, resulting in a high interpolation density, which makes it impossible to accurately correct the image, resulting in loss of clarity and contrast.

Method used

By acquiring multiple frames of images to be corrected, using the mapping matrix of the reference frame image and the auxiliary frame image for image registration, converting it into an image arranged in three channels of R, G, and B, and interpolating each pixel to improve the pixels. density and information density.

Benefits of technology

The accuracy and clarity of the corrected image are improved, the interpolation density is reduced, and the amount of information is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587130A
    Figure CN118587130A
Patent Text Reader

Abstract

The invention relates to an image processing method and device, a chip and electronic equipment, and relates to the technical field of digital image processing, and the method comprises the steps: obtaining a plurality of frames of to-be-corrected images, the plurality of frames of to-be-corrected images comprise a reference frame image and at least one auxiliary frame image; determining a mapping matrix between the reference frame image and the auxiliary frame image, and aligning and mapping pixel points in the auxiliary frame image to the reference frame image by using the mapping matrix to obtain a first image of single-channel arrangement after image registration; through image fusion processing, the first image is converted into a second image with R, G and B three-channel arrangement; and pixel interpolation processing of R, G and B channels is carried out on each pixel point in the second image, and a corrected image corresponding to the to-be-corrected image is determined according to an obtained pixel interpolation result. The definition of the correction result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method, device, chip and electronic device. Background Art

[0002] Images captured in the real world often have certain geometric distortions. For images with geometric distortions, image warping is often used to perform rigid deformations such as scaling, translation, rotation, affine, and perspective, or non-rigid deformations such as distortion correction, so that the distortion of the image can be corrected.

[0003] At present, when the original RAW image is corrected by image deformation, the R, G, and B channels of the RAW image are generally interpolated separately. However, since the pixels of the R, G, and B channels are not closely arranged and the interpolation density is large, the pixel results cannot be accurately interpolated, resulting in a significant loss in clarity of the final corrected image compared to the original image. Summary of the invention

[0004] In view of this, the present application provides an image processing method, device, chip and electronic device, the main purpose of which is to improve the technical problem that the clarity of the corrected image compared to the original image is greatly lost by the current traditional image correction method.

[0005] In a first aspect, the present application provides an image processing method, comprising:

[0006] Acquire a plurality of frames of images to be corrected, wherein the plurality of frames of images to be corrected include a reference frame image and at least one auxiliary frame image;

[0007] Determine a mapping matrix between the reference frame image and the auxiliary frame image, and use the mapping matrix to align and map pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, wherein each pixel in the first image includes a pixel value under an original channel, and the original channel is any one of the three channels of R, G, and B;

[0008] By image fusion processing, the first image is converted into a second image arranged in three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​under the three channels of R, G, and B;

[0009] Perform pixel interpolation processing of three channels R, G, and B on each pixel point in the second image, and determine a corrected image corresponding to the image to be corrected according to the obtained pixel interpolation result.

[0010] In some embodiments of the present disclosure, determining a mapping matrix between the reference frame image and the auxiliary frame image, and using the mapping matrix to align and map pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration includes:

[0011] Determine key point pairs of the reference frame image and the auxiliary frame image;

[0012] Determine a mapping matrix between the reference frame image and the auxiliary frame image according to the key point pair, wherein the mapping matrix includes a pixel mapping relationship between the reference frame image and the auxiliary frame image corresponding to the same pixel position;

[0013] Based on the pixel mapping relationship, the pixels in the auxiliary frame image are aligned and mapped to corresponding pixel positions in the reference frame image to obtain a first image after image registration.

[0014] In some embodiments of the present disclosure, determining the key point pairs of the reference frame image and the auxiliary frame image includes:

[0015] Detecting a first key point of the reference frame image and a second key point of the at least one auxiliary frame image;

[0016] Calculating a feature distance between the first key point and the second key point;

[0017] A first key point and a second key point whose corresponding feature distance is less than a preset threshold are determined as a key point pair.

[0018] In some embodiments of the present disclosure, the first image is converted into a second image arranged in three channels of R, G, and B through image fusion processing, including:

[0019] Divide the pixels in the first image into three channels of R, G, and B to obtain a first channel image composed of R channel pixel values, a second channel image composed of G channel pixel values, and a third channel image composed of B channel pixel values;

[0020] Determine a missing pixel value of each pixel in the first image based on the first channel image, the second channel image and the third channel image;

[0021] The missing pixel values ​​are filled into the pixel positions corresponding to the first image to obtain a second image arranged in three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​corresponding to the three channels of R, G, and B.

[0022] In some embodiments of the present disclosure, determining the missing pixel value of each pixel in the first image based on the first channel image, the second channel image, and the third channel image includes:

[0023] Determine a first pixel point in the first image that lacks an R channel pixel value based on the first channel image, determine a second pixel point in the first image that lacks a G channel pixel value based on the second channel image, and determine a third pixel point in the first image that lacks a B channel pixel value based on the third channel image;

[0024] Extracting R channel pixel point information within a preset pixel range corresponding to the first pixel point in the first channel image, substituting the R channel pixel point information into a preset fusion equation to obtain the R channel missing pixel value of the first pixel point, wherein the R channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of R channel pixels, the R channel pixel value of each of the R channel pixels, and the R channel weight value of each of the R channel pixels; and / or

[0025] Extracting G channel pixel point information within a preset pixel range corresponding to the second pixel point in the second channel image, substituting the G channel pixel point information into a preset fusion equation to obtain the G channel missing pixel value of the second pixel point, wherein the G channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of G channel pixels, the G channel pixel value of each of the G channel pixels, and the G channel weight value of each of the G channel pixels; and / or

[0026] Extract B-channel pixel point information within a preset pixel range corresponding to the third pixel point in the third channel image, substitute the B-channel pixel point information into a preset fusion equation, and obtain the B-channel missing pixel value of the third pixel point, wherein the B-channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of B-channel pixels, the B-channel pixel value of each of the B-channel pixels, and the B-channel weight value of each of the B-channel pixels.

[0027] In some embodiments of the present disclosure, filling the missing pixel values ​​into the pixel positions corresponding to the first image to obtain a second image arranged in three channels of R, G, and B includes:

[0028] Fill the R channel pixel value to the pixel position corresponding to the first pixel point in the first image;

[0029] Fill the G channel pixel value to the pixel position corresponding to the second pixel point in the first image;

[0030] The B channel pixel value is filled into the pixel position corresponding to the third pixel point in the first image.

[0031] In some embodiments of the present disclosure, the pixel interpolation result includes three pixel interpolation results of three channels R, G, and B, and determining the corrected image corresponding to the image to be corrected according to the obtained pixel interpolation results includes:

[0032] Among the three pixel interpolation results, the pixel interpolation results of each pixel point corresponding to the original channel are retained, and the pixel interpolation results of the other two channels except the original channel corresponding to each pixel point are removed to obtain a corrected image corresponding to the image to be corrected.

[0033] In a second aspect, the present application provides an image processing device, comprising:

[0034] An acquisition module, used for acquiring a plurality of frames of images to be corrected, wherein the plurality of frames of images to be corrected include a reference frame image and at least one auxiliary frame image;

[0035] A determination module is used to determine a mapping matrix between the reference frame image and the auxiliary frame image, and use the mapping matrix to align and map the pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, wherein each pixel in the first image includes a pixel value under an original channel, and the original channel is any one of the three channels of R, G, and B;

[0036] A fusion module, used for converting the first image into a second image arranged in three channels of R, G, and B through image fusion processing, wherein each pixel point in the second image includes three pixel values ​​under the three channels of R, G, and B;

[0037] The interpolation module is used to perform pixel interpolation processing of three channels R, G, and B on each pixel point in the second image, and determine the corrected image corresponding to the image to be corrected according to the obtained pixel interpolation result.

[0038] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the image processing method described in the first aspect.

[0039] In a fourth aspect, the present application provides an electronic device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the image processing method described in the first aspect when executing the computer program.

[0040] In a fifth aspect, the present application provides a chip comprising one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the image processing method described in the first aspect.

[0041] By means of the above technical scheme, the present application provides an image processing method, device, chip and electronic device. Compared with the existing image correction method of performing interpolation processing on the R, G, and B channels of a RAW image respectively, the present application can obtain multiple frames of images to be corrected, and the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image; based on the at least one auxiliary frame image, the reference frame image is image registered to obtain a first image under a single channel, and each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels of R, G, and B; then, through image fusion processing, the first image is converted into a second image arranged in the three channels of R, G, and B, and each pixel in the second image contains three pixel values ​​under the three channels of R, G, and B. Through image registration and image fusion processing, the pixel density of the image to be corrected can be improved. For any pixel in the second image, the pixel points corresponding to the same channel are closely arranged with itself, instead of having a large interpolation density like the original RAW image, so that it can contain more information. Then, pixel interpolation processing of the three channels of R, G, and B is performed on each pixel in the second image. For the interpolation algorithm, under the same window area, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, improving the accuracy and clarity of the corrected image.

[0042] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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.

[0044] 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.

[0045] Figure 1 A schematic diagram of a process flow of an image processing method provided in an embodiment of the present application is shown;

[0046] Figure 2 An example schematic diagram of image alignment in an embodiment of the present application is shown;

[0047] Figure 3 A schematic diagram showing an example of image pair registration in an embodiment of the present application is shown;

[0048] Figure 4 A schematic diagram showing a flow chart of another image processing method provided in an embodiment of the present application is shown;

[0049] Figure 5 An example schematic diagram of image splitting in an embodiment of the present application is shown;

[0050] Figure 6 A schematic diagram showing an example of image filling provided by an embodiment of the present application is shown;

[0051] Figure 7 A schematic structural diagram of an image processing device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0052] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0053] In order to improve the technical problem that the clarity of the corrected image is greatly lost compared with the original image in the current traditional image correction method. This embodiment provides an image processing method, such as Figure 1 As shown, the method includes:

[0054] Step 101: Acquire multiple frames of images to be corrected, where the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image.

[0055] In the disclosed embodiment, the multiple frames of images to be corrected may be original images, i.e., RAW images (multiple frames of images to be corrected are RAW images), in which the captured light source signals are converted into digital signals by a solid imaging sensor (CMOS image sensor, CMOS) or a charge coupled device image sensor (CCD) during the photographing process. Among them, the RAW image is a single-channel image, and the so-called single channel means that each pixel has only one value to represent the color, so it is called a single channel. The selection criterion of the reference frame image is generally the first frame of the multiple frames of images to be corrected or a frame of image with a clarity greater than a preset threshold, wherein the preset threshold can be pre-set according to actual needs, with the purpose of selecting a frame of image with the greatest clarity as the reference frame. The auxiliary frame image is an image other than the reference frame image in the multiple frames of images to be corrected.

[0056] For the disclosed embodiment, a multi-frame image super-resolution reconstruction algorithm is mainly used to realize image correction of multiple frames of images to be corrected. Among them, the multi-frame image super-resolution reconstruction technology is to use a series of low-resolution image sequences with only small displacements between each other, fuse the information of different low-resolution images for the same scene to be reconstructed, and remove blur, noise and other factors that affect the image quality during the fusion process, so as to reconstruct a high-resolution image. The algorithm is conducive to improving the clarity of the image correction result.

[0057] Step 102, determine the mapping matrix between the reference frame image and the auxiliary frame image, use the mapping matrix to align the pixels in the auxiliary frame image and map them to the reference frame image, and obtain the first image after image registration, where each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels of R, G, and B.

[0058] The mapping matrix may be a homography (H) matrix, which can be calculated by the key points of the reference frame image and the key points of the auxiliary frame image matched therewith. For the embodiment of the present disclosure, the H matrix is ​​a transformation matrix reflecting the mapping relationship between the reference frame and the auxiliary frame, such as Figure 2 and Figure 3 As shown, the mapping relationship in the H matrix can be used to Figure 2 All the pixels in the auxiliary frame images (such as frame2 and frame3) are aligned and mapped to the corresponding pixel positions of the reference frame (such as frame1) to obtain the first image after image registration, that is, Figure 3 Among them, the first image is the registered image after the pixels of the auxiliary frame are aligned and mapped to the pixels of the reference frame. It is a single-channel image with irregular arrangement of R, G, and B. Each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels of R, G, and B.

[0059] In the embodiment of the present disclosure, the first image after image registration has an improved pixel density compared to the initial multiple frames of images to be corrected (i.e., the unregistered reference frame images and auxiliary frame images), and the arrangement of the three types of R, G, and B pixels is more dense, containing more information, which is a key step in improving the clarity of the correction result.

[0060] Step 103: Convert the first image into a second image arranged in three channels of R, G, and B through image fusion processing, where each pixel point in the second image contains three pixel values ​​under the three channels of R, G, and B.

[0061] Image fusion refers to converting the first image in which each pixel position is arranged in a single channel into an R, G, B image in which each pixel position is arranged in three channels, i.e., the second image, based on the image registration in step 102, so that for any pixel, the pixels corresponding to the same channel are closely arranged with itself, instead of irregularly arranged pixels corresponding to the three channels of R, G, and B, respectively, like the reference frame image or the auxiliary frame image, so that there are gaps. For the interpolation algorithm, under the same window area, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, and the accuracy and clarity of the correction results can be improved.

[0062] Step 104: perform pixel interpolation processing of the three channels R, G, and B on each pixel point in the second image, and determine a corrected image corresponding to the image to be corrected according to the obtained pixel interpolation results.

[0063] Among them, when performing pixel interpolation processing of the three channels of R, G, and B on each pixel point in the second image, common interpolation algorithms such as linear interpolation, bilinear interpolation, bicubic interpolation, etc. can be selected, and excessive description of the relevant content is not given here.

[0064] This solution converts the first image into a second image arranged in three channels of R, G, and B. Since the pixels of the second image corresponding to the three channels of R, G, and B are arranged regularly after the conversion, and there are no large gaps between the same pixels, each pixel in the second image is subjected to pixel interpolation processing of the three channels of R, G, and B respectively, and the pixel interpolation results under the three channels (i.e., the results of the three channels of R, G, and B are obtained at the same time), so that the clarity is greatly improved. Since the image to be corrected is a single-channel image, and the interpolation result obtained after the image conversion of this solution is a three-channel result, by comparing the original input reference frame image, retaining one pixel interpolation result under the original channel corresponding to each pixel, and discarding the pixel interpolation results of the other two channels outside the original channel corresponding to each pixel, the corrected image corresponding to the image to be corrected, i.e., the single-channel corrected image, can be further obtained.

[0065] For example, Figure 2 As shown, there are three frames of images to be corrected (the images to be corrected are single-channel images, that is, each pixel in the images to be corrected contains a pixel value in any one of the three channels of R, G, and B), such as frame1, frame2, and frame3, where frame1 is the reference frame, and frame2 and frame3 are auxiliary frames. Frame2 and frame3 are aligned to frame1 and mapped to frame1 to obtain the following: Figure 3 The image after registration shown is the first image (the first image is still a single-channel image). Then, the first image is converted into a second image arranged in three channels of R, G, and B by performing fusion processing on the first image. Each pixel in the second image contains three pixel values ​​under the three channels of R, G, and B. If a certain pixel originally only contains a pixel value under the R channel, the pixel values ​​under the G channel and the B channel can be added to it through image fusion, so that the pixel contains three pixel values ​​under the three channels of R, G, and B at the same time. By performing the above processing on each pixel in the first image, a three-channel regularly arranged RGB image, that is, the second image, can be obtained. Finally, the second image is interpolated to obtain the correction results of each pixel under the three channels. Since the image to be corrected is a single-channel image, and the result obtained by interpolation after image conversion in this scheme is a three-channel result, the correction result is compared with frame1, and the pixel interpolation results of each pixel under the original channel are retained, and the pixel interpolation results of the other two channels except the original channel are removed. After performing the above processing on each pixel in the second image, the corrected image corresponding to the image to be corrected can be obtained. For example, the original channel of pixel a in frame1 is the G channel, and the correction result contains three interpolation results of the three channels of R, G, and B arranged in a regular manner. The interpolation results of the R channel and the B channel corresponding to the pixel a can be discarded, and only the interpolation result of the G channel is retained.

[0066] In summary, according to the image processing method, device, chip and electronic device proposed in the present disclosure, the present application can obtain multiple frames of images to be corrected, including a reference frame image and at least one auxiliary frame image; based on the at least one auxiliary frame image, the reference frame image is image registered to obtain a first image under a single channel, each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels R, G, and B; then, through image fusion processing, the first image is converted into a second image arranged in R, G, and B channels, and each pixel in the second image contains three pixel values ​​under the three channels R, G, and B. Through image registration and image fusion processing, the pixel density of the image to be corrected can be improved. For any pixel in the second image, the pixels corresponding to the same channel are closely arranged with itself, instead of having a large interpolation density like the original RAW image, so that it can contain more information. Then, pixel interpolation processing of the three channels of R, G, and B is performed on each pixel in the second image. For the interpolation algorithm, under the same window area, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, improving the accuracy and clarity of the corrected image.

[0067] based on Figure 1 The embodiment shown is a refinement and extension of the above embodiment. In order to fully illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 4 The specific method shown includes:

[0068] Step 201: Acquire multiple frames of images to be corrected, where the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image.

[0069] For the embodiment of the present disclosure, the specific implementation process can refer to the relevant description in step 101 of the embodiment, which will not be repeated here.

[0070] Step 202: determine key point pairs of the reference frame image and the auxiliary frame image, and determine a mapping matrix of the reference frame image and the auxiliary frame image based on the key point pairs. The mapping matrix includes a pixel mapping relationship between the reference frame image and the auxiliary frame image corresponding to the same pixel position.

[0071] For the disclosed embodiment, the key points can be detected by using methods such as Scale Invariant Feature Transform (SIFT), Harris corner detection method, Binary Robust Independent Elementary Features (BRIEF), and Oriented FAST and Rotated BRIEF (ORB) to respectively determine the key points of the reference frame image and the auxiliary frame image. Since this method is a common key point detection method, the implementation process of this method will not be described in detail here.

[0072] In order to determine the key point pair of the reference frame image and the auxiliary frame image, as a possible implementation method, the key points of the two images can be matched by brute force matching to obtain the key point pair. Accordingly, the implementation steps may include: detecting the first key point of the reference frame image and the second key point of at least one auxiliary frame image, calculating the feature distance between the first key point and the second key point, and determining the first key point and the second key point whose corresponding feature distance is less than a preset threshold as a key point pair, wherein the preset threshold can be set according to actual conditions.

[0073] In the embodiment of the present disclosure, the mapping matrix may be a homography (H) matrix, and the H matrix may be calculated by the key points of the reference frame image and the key points of the auxiliary frame image matched therewith. For the embodiment of the present disclosure, the H matrix is ​​a transformation matrix reflecting the mapping relationship between the reference frame and the auxiliary frame.

[0074] Step 203: Based on the pixel mapping relationship, the pixels in the auxiliary frame image are aligned and mapped to the corresponding pixel positions of the reference frame image to obtain a first image after image registration.

[0075] For the embodiment of the present disclosure, for example, the mapping relationship of the matrix can be used to Figure 2 All pixels in the auxiliary frame images (such as frame2 and frame3) are aligned and mapped to the reference frame image (such as frame1) to obtain the first image after image registration, that is, Figure 3 The first image is a registered image after the pixels of the auxiliary frame are aligned and mapped to the pixels of the reference frame. It is a single-channel irregularly arranged image. Each pixel in the first image corresponds to a pixel value in any original channel of the three channels R, G, and B.

[0076] In the embodiment of the present disclosure, the first image after image registration has an improved pixel density compared to the initial image to be corrected (i.e., the unregistered reference frame image and auxiliary frame image), and the arrangement of the three types of pixels R, G, and B is more dense, containing more information, which is a key step in improving the clarity of the correction result.

[0077] Step 204: divide the pixel points in the first image into three channels of R, G, and B to obtain a first channel image composed of R channel pixel values, a second channel image composed of G channel pixel values, and a third channel image composed of B channel pixel values; based on the first channel image, the second channel image, and the third channel image, determine the missing pixel value of each pixel point in the first image.

[0078] Among them, the first channel image is the R channel image obtained by dividing the pixel points in the first image according to the R channel; the second channel image is the B channel image obtained by dividing the pixel points in the first image according to the B channel; the third channel image is the G channel image obtained by dividing the pixel points in the first image according to the G channel. For the embodiment of the present disclosure, after the first channel image, the second channel image and the third channel image are divided, the R channel missing pixel value of the first image can be determined by using the R channel pixel point information in the first channel image, the G channel missing pixel value of the first image can be determined by using the G channel pixel point information in the second channel image, and the B channel missing pixel value of the first image can be determined by using the B channel pixel point information in the third channel image. Specifically, the R channel pixel point information can be substituted into the preset fusion equation, and the R channel missing pixel value can be calculated using the preset fusion equation; the G channel pixel point information can be substituted into the preset fusion equation, and the G channel missing pixel value can be calculated using the preset fusion equation; the B channel pixel point information can be substituted into the preset fusion equation, and the B channel missing pixel value can be calculated using the preset fusion equation. The preset fusion equation is any preset formula that can calculate the missing pixel value of each pixel point in the first image.

[0079] Exemplarily, the formula feature description of the preset fusion equation may be:

[0080]

[0081] Where c(x, y) represents the pixel value of the target channel, n is the number of image frames of at least one auxiliary frame image, i is the number of pixel points of the target channel within the preset pixel range, and c n,i is the target channel pixel value of each target channel pixel within the preset pixel range, w n,iIt is the target channel weight value of each target channel pixel point within the preset pixel range, wherein the target channel is any one of the three channels R, G, and B; the target channel weight value is determined according to the distance between the pixel point within the preset pixel range and the target channel pixel point, and may be linear, that is, the closer the distance, the greater the target channel weight value.

[0082] For the embodiments of the present disclosure, Figure 5 As shown, the pixels in the first image can be divided into channel images according to the three channels of R, G, and B to obtain a first channel image composed of R channel pixel values, a second channel image composed of G channel pixel values, and a third channel image composed of B channel pixel values. Based on the first channel image, the second channel image, and the third channel image, the missing pixel value of each pixel in the first image is calculated using a preset fusion equation. The specific implementation process can be described as: determining the first pixel in the first image that is missing the R channel pixel value based on the first channel image, determining the second pixel in the first image that is missing the G channel pixel value based on the second channel image, and determining the third pixel in the first image that is missing the B channel pixel value based on the third channel image.

[0083] As a possible implementation method, when determining the R channel missing pixel value of the first pixel, firstly, the R channel pixel information within a preset pixel range corresponding to the first pixel in the first channel image can be extracted, and the R channel pixel information is substituted into a preset fusion equation to obtain the R channel missing pixel value of the first pixel, wherein the R channel pixel information includes the image frame number of at least one auxiliary frame image, the number of R channel pixels, the R channel pixel value of each R channel pixel, and the R channel weight value of each R channel pixel; and / or

[0084] As a possible implementation method, when determining the G channel missing pixel value of the second pixel, firstly, the G channel pixel information within a preset pixel range corresponding to the second pixel in the second channel image can be extracted, and the G channel pixel information is substituted into a preset fusion equation to obtain the G channel missing pixel value of the second pixel, wherein the G channel pixel information includes the image frame number of at least one auxiliary frame image, the number of G channel pixels, the G channel pixel value of each G channel pixel, and the G channel weight value of each G channel pixel; and / or

[0085] As a possible implementation method, when determining the missing pixel value of the B channel of the third pixel, the B channel pixel information within the preset pixel range corresponding to the third pixel in the third channel image can be firstly extracted, and the B channel pixel information is substituted into the preset fusion equation to obtain the missing pixel value of the B channel of the third pixel, wherein the B channel pixel information includes the image frame number of at least one auxiliary frame image, the number of B channel pixels, the B channel pixel value of each B channel pixel, and the B channel weight value of each B channel pixel. The preset pixel range is a pixel range that can be pre-set according to actual user needs, such as 3*3.

[0086] For example, Figure 5 As shown, the pixel point at the pixel position (0, 0) of the first image is R, and the pixel values ​​under the G channel and the B channel are missing. The missing pixel value of the G channel at the pixel point position can be calculated by the split second channel image, and the missing pixel value of the B channel at the pixel point position can be calculated by the third channel image. Taking the calculation of the missing pixel value of the G channel at the pixel point position based on the second channel image as an example, the G channel pixel point information corresponding to the preset pixel range (such as 2*2) of the pixel point at the pixel position (0, 0) can be extracted in the second channel image, and the G channel pixel point information is substituted into the above preset fusion equation to calculate the missing pixel value of the G channel of the pixel point, that is, C(1, 1). For example, if there are two G-channel pixels in the 2*2 range (the G-channel pixel at the pixel position (0, 1) and the G-channel pixel at the pixel position (1, 0)), then the number of G-channel pixels in the preset pixel range is i=,2; if the G-channel pixel at the pixel position (0, 1) and the G-channel pixel at the pixel position (1, 0) are from different auxiliary frame images, then the number of image frames of the auxiliary frame image corresponding to the G-channel pixel is n=2; because the G-channel pixel at the pixel position (0, 1) and the G-channel pixel at the pixel position (1, 0) have the same pixel distance as the pixel at the pixel position (0, 0), the G-channel weight values ​​of the two G-channel pixels can be configured as 0.5 respectively. Then, the G-channel pixel values ​​c of the two G-channel pixels can be n,i and G channel weight value w n,i , as well as the number of image frames n, the number of G channel pixels within the preset pixel range i, are uniformly substituted into the preset fusion equation to calculate C(1, 1).

[0087] Step 205: fill the missing pixel values ​​to the pixel positions corresponding to the first image to obtain a second image arranged in three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​corresponding to the three channels of R, G, and B.

[0088] For the embodiment of the present disclosure, the specific implementation steps of filling the missing pixel values ​​into the pixel positions corresponding to the first image to obtain the second image arranged in three channels of R, G, and B can be described as: filling the R channel pixel value into the pixel position corresponding to the first pixel point in the first image, filling the G channel pixel value into the pixel position corresponding to the second pixel point in the first image, and filling the B channel pixel value into the pixel position corresponding to the third pixel point in the first image. After completing the filling of all the missing pixel values ​​in the first image, the following can be obtained: Figure 6 The second image shown has three channels evenly arranged. In the second image, each pixel point contains three pixel values ​​corresponding to the three channels R, G, and B.

[0089] Step 206: Perform pixel interpolation processing of the three channels R, G, and B for each pixel point in the second image. Among the three pixel interpolation results obtained, the pixel interpolation result of the original channel corresponding to each pixel point is retained, and the pixel interpolation results of the other two channels except the original channel corresponding to each pixel point are removed to obtain a corrected image corresponding to the image to be corrected.

[0090] For the disclosed embodiment, after image fusion, pixel interpolation processing of the three channels R, G, and B is performed on each pixel point in the second image, and the pixel interpolation results under the three channels (i.e., the results of the three channels R, G, and B are obtained at the same time). For the interpolation algorithm, under the same window area, after image fusion, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, and the accuracy and clarity of the correction results are improved. Since the image to be corrected is a single-channel image, and the result obtained by interpolation after image conversion in this scheme is a three-channel result, the pixel interpolation result of each pixel point that is the same as the pixel result under the original channel can be retained by comparing the original input reference frame image, and the pixel interpolation results of the other two channels outside the original channel corresponding to each pixel point are discarded, so as to obtain the corrected image corresponding to the image to be corrected, that is, the single-channel corrected image.

[0091] In summary, according to the image processing method, device, chip and electronic device proposed in the present disclosure, the present application can obtain multiple frames of images to be corrected, and the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image; based on the at least one auxiliary frame image, the reference frame image is image registered to obtain a first image under a single channel, and each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels of R, G, and B; then, through image fusion processing, the first image is converted into a second image arranged in the three channels of R, G, and B, and each pixel in the second image contains three pixel values ​​under the three channels of R, G, and B. Through image registration and image fusion processing, the pixel density of the image to be corrected can be improved. For any pixel in the second image, the pixels corresponding to the same channel are closely arranged with itself, instead of having a large interpolation density like the original RAW image, so that it can contain more information. Then, pixel interpolation processing of the three channels of R, G, and B is performed on each pixel in the second image. For the interpolation algorithm, under the same window area, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, improving the accuracy and clarity of the corrected image.

[0092] Based on the above Figure 1 and Figure 4 The specific implementation of the method shown in the embodiment provides an image processing device, such as Figure 7 As shown, the device includes: an acquisition module 31, a determination module 32, a fusion module 33, and an interpolation module 34.

[0093] An acquisition module 31, which can be used to acquire multiple frames of images to be corrected, wherein the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image;

[0094] A determination module 32 may be used to determine a mapping matrix between the reference frame image and the auxiliary frame image, and use the mapping matrix to align and map the pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, wherein each pixel in the first image includes a pixel value under an original channel, and the original channel is any one of the three channels of R, G, and B;

[0095] The fusion module 33 may be used to convert the first image into a second image arranged in three channels of R, G, and B through image fusion processing, wherein each pixel point in the second image includes three pixel values ​​under the three channels of R, G, and B;

[0096] The interpolation module 34 may be used to perform pixel interpolation processing of the three channels R, G, and B on each pixel point in the second image, and determine a corrected image corresponding to the image to be corrected according to the obtained pixel interpolation result.

[0097] In some embodiments of the present disclosure, the determination module 32 can be used to determine the key point pairs of the base frame image and the auxiliary frame image; determine the mapping matrix of the base frame image and the auxiliary frame image based on the key point pairs, the mapping matrix containing the pixel mapping relationship of the base frame image and the auxiliary frame image corresponding to the same pixel position; based on the pixel mapping relationship, align and map the pixel points in the auxiliary frame image to the corresponding pixel positions of the base frame image to obtain the first image after image registration.

[0098] In some embodiments of the present disclosure, the determination module 32 can be used to detect a first key point of a reference frame image and a second key point of at least one auxiliary frame image; calculate a feature distance between the first key point and the second key point; and determine the first key point and the second key point whose corresponding feature distance is less than a preset threshold as a key point pair.

[0099] In some embodiments of the present disclosure, the fusion module 33 can be used to divide the pixel points in the first image into channel images according to the three channels of R, G, and B, to obtain a first channel image composed of R channel pixel values, a second channel image composed of G channel pixel values, and a third channel image composed of B channel pixel values; based on the first channel image, the second channel image, and the third channel image, determine the missing pixel value of each pixel point in the first image; fill the missing pixel value to the pixel position corresponding to the first image, to obtain a second image arranged in the three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​corresponding to the three channels of R, G, and B.

[0100] In some embodiments of the present disclosure, the fusion module 33 may be used to determine a first pixel point in the first image that lacks an R channel pixel value based on the first channel image, determine a second pixel point in the first image that lacks a G channel pixel value based on the second channel image, and determine a third pixel point in the first image that lacks a B channel pixel value based on the third channel image; extract R channel pixel point information within a preset pixel range corresponding to the first pixel point in the first channel image, substitute the R channel pixel point information into a preset fusion equation, and obtain the R channel missing pixel value of the first pixel point, wherein the R channel pixel point information includes the image frame number of at least one auxiliary frame image, the number of R channel pixels, the R channel pixel value of each R channel pixel point, and the R channel weight value of each R channel pixel point; and / or extract the second image point in the second channel image The pixel point corresponds to G channel pixel point information within a preset pixel range, and the G channel pixel point information is substituted into a preset fusion equation to obtain a G channel missing pixel value of a second pixel point, wherein the G channel pixel point information includes the image frame number of at least one auxiliary frame image, the number of G channel pixels, the G channel pixel value of each G channel pixel point, and the G channel weight value of each G channel pixel point; and / or the B channel pixel point information within the preset pixel range corresponding to the third pixel point in the third channel image is extracted, and the B channel pixel point information is substituted into a preset fusion equation to obtain a B channel missing pixel value of the third pixel point, wherein the B channel pixel point information includes the image frame number of at least one auxiliary frame image, the number of B channel pixels, the B channel pixel value of each B channel pixel point, and the B channel weight value of each B channel pixel point.

[0101] In some embodiments of the present disclosure, the fusion module 33 can be used to fill the R channel pixel value to the pixel position corresponding to the first pixel point in the first image; fill the G channel pixel value to the pixel position corresponding to the second pixel point in the first image; and fill the B channel pixel value to the pixel position corresponding to the third pixel point in the first image.

[0102] In some embodiments of the present disclosure, the interpolation module 34 can be used to retain the pixel interpolation results of the original channel corresponding to each pixel point among the three pixel interpolation results, and remove the pixel interpolation results of the other two channels except the original channel corresponding to each pixel point, so as to obtain a corrected image corresponding to the image to be corrected.

[0103] It should be noted that for other corresponding descriptions of the functional units involved in the image processing device provided in this embodiment, reference can be made to Figures 1 to 4 The corresponding description in will not be repeated here.

[0104] Based on the above Figures 1 to 4 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figures 1 to 4 The method shown.

[0105] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0106] Based on the above Figures 1 to 4 The method shown, and Figure 7 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device, such as a smart phone, a tablet computer, a drone, a smart robot and other smart terminals, which includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 4 The method shown.

[0107] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0108] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0109] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0110] Based on the above Figures 1 to 4 The method shown, and Figure 7 The embodiment of the virtual device shown in the figure, this embodiment also provides a chip, including one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from the memory of the electronic device and send a signal to the processor, the signal including the computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the above-mentioned Figures 1 to 4The method shown.

[0111] Through the description of the above implementation methods, the technicians in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the scheme of this embodiment, the present application can obtain multiple frames of images to be corrected, and the multiple frames of images to be corrected include a reference frame image and at least one auxiliary frame image; based on at least one auxiliary frame image, the reference frame image is image registered to obtain a first image under a single channel, and each pixel in the first image contains a pixel value under the original channel, and the original channel is any one of the three channels of R, G, and B; then, through image fusion processing, the first image is converted into a second image arranged in three channels of R, G, and B, and each pixel in the second image contains three pixel values ​​under the three channels of R, G, and B. Through image registration and image fusion processing, the pixel density of the image to be corrected can be improved. For any pixel in the second image, the pixel points corresponding to the same channel are closely arranged with itself, instead of having a large interpolation density like the original RAW image, so that it can contain more information. Then, pixel interpolation processing of the three channels of R, G, and B is performed on each pixel in the second image. For the interpolation algorithm, under the same window area, the information density and sampling frequency are greatly improved, so that the pixel results can be interpolated more accurately, improving the accuracy and clarity of the corrected image.

[0112] 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.

[0113] 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 applied for herein.

Claims

1. An image processing method, characterized in that: include: Acquire a plurality of frames of images to be corrected, wherein the plurality of frames of images to be corrected include a reference frame image and at least one auxiliary frame image; Determine a mapping matrix between the reference frame image and the auxiliary frame image, and use the mapping matrix to align and map pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, wherein each pixel in the first image includes a pixel value under an original channel, and the original channel is any one of the three channels of R, G, and B; By image fusion processing, the first image is converted into a second image arranged in three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​under the three channels of R, G, and B; Perform pixel interpolation processing of three channels R, G, and B on each pixel point in the second image, and determine a corrected image corresponding to the image to be corrected according to the obtained pixel interpolation result.

2. The method according to claim 1, characterized in that The step of determining a mapping matrix between the reference frame image and the auxiliary frame image, and using the mapping matrix to align and map pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, comprises: Determine key point pairs of the reference frame image and the auxiliary frame image; Determine a mapping matrix between the reference frame image and the auxiliary frame image according to the key point pair, wherein the mapping matrix includes a pixel mapping relationship between the reference frame image and the auxiliary frame image corresponding to the same pixel position; Based on the pixel mapping relationship, the pixels in the auxiliary frame image are aligned and mapped to corresponding pixel positions in the reference frame image to obtain a first image after image registration.

3. The method according to claim 2, characterized in that The determining of the key point pairs of the reference frame image and the auxiliary frame image comprises: Detecting a first key point of the reference frame image and a second key point of the at least one auxiliary frame image; Calculating a feature distance between the first key point and the second key point; A first key point and a second key point whose corresponding feature distance is less than a preset threshold are determined as a key point pair.

4. The method according to claim 1, characterized in that The first image is converted into a second image with three channels of R, G, and B through image fusion processing, including: Divide the pixels in the first image into three channels of R, G, and B to obtain a first channel image composed of R channel pixel values, a second channel image composed of G channel pixel values, and a third channel image composed of B channel pixel values; Determine a missing pixel value of each pixel in the first image based on the first channel image, the second channel image and the third channel image; The missing pixel values ​​are filled into the pixel positions corresponding to the first image to obtain a second image arranged in three channels of R, G, and B, wherein each pixel point in the second image contains three pixel values ​​corresponding to the three channels of R, G, and B.

5. The method according to claim 4, characterized in that The determining, based on the first channel image, the second channel image and the third channel image, the missing pixel value of each pixel in the first image comprises: Determine a first pixel point in the first image that lacks an R channel pixel value based on the first channel image, determine a second pixel point in the first image that lacks a G channel pixel value based on the second channel image, and determine a third pixel point in the first image that lacks a B channel pixel value based on the third channel image; Extracting R channel pixel point information within a preset pixel range corresponding to the first pixel point in the first channel image, substituting the R channel pixel point information into a preset fusion equation to obtain the R channel missing pixel value of the first pixel point, wherein the R channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of R channel pixels, the R channel pixel value of each of the R channel pixels, and the R channel weight value of each of the R channel pixels; and / or Extracting G channel pixel point information within a preset pixel range corresponding to the second pixel point in the second channel image, substituting the G channel pixel point information into a preset fusion equation to obtain the G channel missing pixel value of the second pixel point, wherein the G channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of G channel pixels, the G channel pixel value of each of the G channel pixels, and the G channel weight value of each of the G channel pixels; and / or Extract B-channel pixel point information within a preset pixel range corresponding to the third pixel point in the third channel image, substitute the B-channel pixel point information into a preset fusion equation, and obtain the B-channel missing pixel value of the third pixel point, wherein the B-channel pixel point information includes the image frame number of the at least one auxiliary frame image, the number of B-channel pixels, the B-channel pixel value of each of the B-channel pixels, and the B-channel weight value of each of the B-channel pixels.

6. The method according to claim 5, characterized in that The step of filling the missing pixel values ​​into the pixel positions corresponding to the first image to obtain a second image arranged in three channels of R, G, and B includes: Fill the R channel pixel value to the pixel position corresponding to the first pixel point in the first image; Fill the G channel pixel value to the pixel position corresponding to the second pixel point in the first image; The B channel pixel value is filled into the pixel position corresponding to the third pixel point in the first image.

7. The method according to claim 1, characterized in that The pixel interpolation result includes three pixel interpolation results of three channels R, G, and B. The step of determining the corrected image corresponding to the image to be corrected according to the obtained pixel interpolation results includes: Among the three pixel interpolation results, the pixel interpolation results of each pixel point corresponding to the original channel are retained, and the pixel interpolation results of the other two channels except the original channel corresponding to each pixel point are removed to obtain a corrected image corresponding to the image to be corrected.

8. An image processing device, characterized in that: include: An acquisition module, used for acquiring a plurality of frames of images to be corrected, wherein the plurality of frames of images to be corrected include a reference frame image and at least one auxiliary frame image; A determination module is used to determine a mapping matrix between the reference frame image and the auxiliary frame image, and use the mapping matrix to align and map the pixels in the auxiliary frame image to the reference frame image to obtain a first image after image registration, wherein each pixel in the first image includes a pixel value under an original channel, and the original channel is any one of the three channels of R, G, and B; A fusion module, used for converting the first image into a second image arranged in three channels of R, G, and B through image fusion processing, wherein each pixel point in the second image includes three pixel values ​​under the three channels of R, G, and B; The interpolation module is used to perform pixel interpolation processing of three channels R, G, and B on each pixel point in the second image, and determine the corrected image corresponding to the image to be corrected according to the obtained pixel interpolation result.

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

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

11. A chip, characterized in that: The invention comprises one or more interface circuits and one or more processors; the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory; when the processor executes the computer instruction, the electronic device executes the method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image zooming method and device, computer equipment and storage medium

    CN109903224A

  • Image noise reduction method and device, storage medium and electronic equipment

    CN110602467A

  • Image processing method and device, storage medium and electronic equipment

    CN110728705A

  • Image processing method and device, storage medium and electronic equipment

    CN110930301A

  • Image model processing method and device, storage medium and electronic device

    CN111292413A