Image processing method and device, terminal and storage medium
By super-segmenting the original images acquired by the array lens, high-resolution target images are generated, which solves the problem of poor imaging effects of the array lens, improves the user experience and improves the aesthetics of the camera module.
Patent Information
- Application Number
- CN202310269803.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2024-09-20
AI Technical Summary
Existing array lenses cannot directly obtain high-resolution images when shooting, resulting in poor imaging effects and the hardware structure of the camera module is not beautiful and inconvenient to use.
By acquiring the original image acquired by the array lens, the to-process images corresponding to each lens are determined and processed using a super-segment model, including encoding, alignment, fusion and decoding processing, and finally generating a high-resolution target image.
Improves the imaging effect of array lenses, obtains high-resolution images, improves user experience, and reduces the height of the camera module and improves aesthetic effects.
Smart Images

Figure CN118678237A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to an image processing method, device, terminal and storage medium. Background Art
[0002] The current conventional solution for mobile phone and other terminal cameras is to use a lens to form an image on an image sensor, and then enhance the image through conventional image signal processing methods to achieve good photo taking. However, as the market's requirements for image resolution and other quality are getting higher and higher, mobile phone manufacturers have launched large-size imaging sensors, and the corresponding optical lenses will also be increased, resulting in a camera with a very obvious protruding lens, which is inconvenient to use and has a poor aesthetic effect.
[0003] An array lens generally refers to an image sensor equipped with multiple lenses, thereby reducing the height of the camera module. The array lens modifies the hardware structure of the camera module. A single exposure can obtain an image composed of four low-resolution images, but it is impossible to directly obtain a high-resolution, high-quality image, resulting in poor final imaging effects. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image processing method, device, terminal and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method, which is applied to a terminal. The image processing method includes:
[0006] Obtaining the original image captured by the array lens;
[0007] Determine, according to the original image, a plurality of images to be processed corresponding to the array lens; wherein the plurality of images to be processed correspond one-to-one to the plurality of lenses included in the array lens;
[0008] The plurality of images to be processed are input into a super-resolution model to determine a target image corresponding to the array lens.
[0009] Optionally, inputting the plurality of images to be processed into a super-resolution model to determine a target image corresponding to the array lens includes:
[0010] Performing encoding processing on the plurality of images to be processed to determine a plurality of deep feature images; wherein the plurality of deep feature images correspond one to one to the plurality of images to be processed;
[0011] Performing alignment processing on the plurality of deep feature images to determine a plurality of aligned feature images; wherein the plurality of aligned feature images correspond one-to-one to the plurality of deep feature images;
[0012] Performing fusion processing on the plurality of aligned feature images to determine a fused feature image;
[0013] Decoding the fused feature image to determine a fused image;
[0014] The target image is determined according to the fused image.
[0015] Optionally, the aligning the plurality of deep feature images to determine a plurality of aligned feature images comprises:
[0016] Performing optical flow calculation on the plurality of deep feature images to determine offset information;
[0017] Alignment processing is performed on the plurality of deep feature images according to the offset information to determine a plurality of aligned feature images.
[0018] Optionally, performing optical flow calculation on the plurality of deep feature images to determine the offset information includes:
[0019] Determining a reference feature image from the plurality of deep feature images;
[0020] Perform optical flow calculation on the images other than the reference feature image in the multiple deep feature images respectively with the reference feature image to determine the offset information; wherein the offset information includes the offset between the images other than the reference feature image in the multiple deep feature images and the reference feature image respectively.
[0021] Optionally, the super-resolution model includes an optical flow network, and the optical flow network is used to perform the optical flow calculation, and the optical flow network includes a RAFT optical flow network.
[0022] Optionally, determining the target image according to the fused image includes:
[0023] The fused image is up-sampled to determine the target image.
[0024] Optionally, the super-resolution model includes a coding module and a decoding module corresponding to each other, the coding module is used to perform the coding process, the decoding module is used to perform the decoding process, and the coding module and / or the decoding and coding respectively include a neural network based on a streamlined architecture.
[0025] Optionally, the super-resolution model is determined by:
[0026] Acquire a training sample set; wherein the training sample set includes a plurality of training sample pairs, and the training sample pairs include input samples and output samples; the input samples include a plurality of to-be-processed image samples corresponding to a set acquisition target of the array lens; the output samples include a target image sample corresponding to the set acquisition target of the reference lens; the array lens and the reference lens have the same image sensor;
[0027] The original model is trained according to the training sample set to determine the super-resolution model.
[0028] Optionally, determining, according to the original image, a plurality of images to be processed corresponding to the array lens includes:
[0029] Determine a plurality of original sub-images according to the original image; wherein the plurality of original sub-images correspond one-to-one to the plurality of shots;
[0030] The lens shading correction process is performed on the plurality of original sub-images to determine the plurality of images to be processed.
[0031] According to a second aspect of an embodiment of the present disclosure, there is provided an image processing device, applied to a terminal, the image processing device comprising:
[0032] An acquisition module is used to acquire the original image captured by the array lens;
[0033] A determination module, used to determine a plurality of images to be processed corresponding to the array lens according to the original image; wherein the plurality of images to be processed correspond one-to-one to the plurality of lenses included in the array lens;
[0034] It is also used to input the plurality of images to be processed into a super-resolution model to determine a target image corresponding to the array lens.
[0035] Optionally, the determining module is used to:
[0036] Performing encoding processing on the plurality of images to be processed to determine a plurality of deep feature images; wherein the plurality of deep feature images correspond one to one to the plurality of images to be processed;
[0037] Performing alignment processing on the plurality of deep feature images to determine a plurality of aligned feature images; wherein the plurality of aligned feature images correspond one-to-one to the plurality of deep feature images;
[0038] Performing fusion processing on the plurality of aligned feature images to determine a fused feature image;
[0039] Decoding the fused feature image to determine a fused image;
[0040] The target image is determined according to the fused image.
[0041] Optionally, the determining module is used to:
[0042] Determine a plurality of original sub-images according to the original image; wherein the plurality of original sub-images correspond one-to-one to the plurality of shots;
[0043] The lens shading correction process is performed on the plurality of original sub-images to determine the plurality of images to be processed.
[0044] According to a third aspect of an embodiment of the present disclosure, a terminal is provided, the terminal including:
[0045] processor;
[0046] a memory for storing instructions executable by the processor;
[0047] Wherein, the processor is configured to execute the image processing method as described in the first aspect.
[0048] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the image processing method as described in the first aspect.
[0049] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: In the present disclosure, a plurality of images to be processed corresponding one-to-one to a plurality of lenses in the array lens can be determined based on the original image captured by the array lens, and then the plurality of images to be processed can be processed based on the super-resolution model to obtain a target image corresponding to the array lens, so that a high-resolution image can be obtained well, the final imaging effect of the array lens can be improved, and the user experience can be further improved.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0052] Figure 1 is a flowchart of an image processing method according to an exemplary embodiment.
[0053] Figure 2 is a flowchart of an image processing method according to an exemplary embodiment.
[0054] Figure 3is a flowchart of an image processing method according to an exemplary embodiment.
[0055] Figure 4 is a flowchart of an image processing method according to an exemplary embodiment.
[0056] Figure 5 is a block diagram of an image processing apparatus according to an exemplary embodiment.
[0057] Figure 6 is a block diagram of a terminal according to an exemplary embodiment. DETAILED DESCRIPTION
[0058] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods of some embodiments of the present disclosure.
[0059] The disclosed embodiment provides an image processing method, which is applied to a terminal. In the method, a plurality of images to be processed corresponding to a plurality of lenses in the array lens can be determined based on the original image captured by the array lens, and then the plurality of images to be processed can be processed based on the super-resolution model to obtain a target image corresponding to the array lens, so that a high-resolution image can be obtained well, the final imaging effect of the array lens can be improved, and the user experience can be further improved.
[0060] In an exemplary embodiment, an image processing method is provided, which is applied to a terminal. Figure 1 As shown, the method may include:
[0061] S110, acquiring the original image captured by the array lens;
[0062] S120, determining a plurality of images to be processed corresponding to the array lens according to the original image; wherein the plurality of images to be processed correspond one-to-one to the plurality of lenses included in the array lens;
[0063] S130: Input a plurality of images to be processed into a super-resolution model to determine a target image corresponding to the array lens.
[0064] In step S110, the image captured and output by the array lens is generally a RAW format image. The original image in this step can be the above-mentioned RAW format image. The RAW format image generally contains the camera sensor data image necessary to create a visible image.
[0065] In this step, the array lens of the terminal can collect and output the image in RAW format, and can transmit the image in RAW format to the processor of the terminal so that the terminal obtains the image in RAW format. The image in RAW format can be used as the original image obtained by the terminal.
[0066] It should be noted that the array lens may include four lenses or other numbers of lenses, and this is not limited.
[0067] In step S120, after the terminal obtains the original image, it can perform preliminary processing on the original image to obtain a to-be-processed image that can be applied to the super-resolution model. The processing may include analysis and correction of the original image, which is not limited.
[0068] The image to be processed may be an image in RAW format. When the image to be processed is an image in RAW format, since it still contains the original high dynamic range image and a part of the high frequency image, the terminal can better obtain a high-quality target image based on the image to be processed.
[0069] In some embodiments,
[0070] The array lens may include four lenses, which may be respectively recorded as a first lens, a second lens, a third lens, and a fourth lens. In this embodiment, four images to be processed may be obtained based on the original image captured by the array lens, which may be respectively recorded as a first image to be processed, a second image to be processed, a third image to be processed, and a fourth image to be processed. Among them, the first image to be processed may correspond to the first lens, the second image to be processed may correspond to the second lens, the third image to be processed may correspond to the third lens, and the fourth image to be processed may correspond to the fourth lens.
[0071] In step S130, after the terminal obtains multiple images to be processed corresponding to the array lens, it can input them into the super-resolution model, and the super-resolution model can process the above multiple images to be processed to obtain a target image with higher resolution, so as to improve the final imaging effect of the array lens.
[0072] Among them, the super-resolution model can be trained in a combined way:
[0073] S131, obtaining a training sample set; wherein the training sample set includes a plurality of training sample pairs, and the training sample pairs include input samples and output samples; the input samples include a plurality of to-be-processed image samples corresponding to a set acquisition target of the array lens; the output samples include a target image sample corresponding to the set acquisition target of the reference lens; the array lens and the reference lens have the same image sensor;
[0074] S132: Train the original model according to the training sample set to determine the super-resolution model.
[0075] In step S131, the image sensor in the reference lens may be the same as the image sensor in the array lens, and the reference lens includes only one lens, that is, the reference lens is configured with only one lens for the image sensor.
[0076] In this step, the array lens and the reference lens can be used to take pictures of the same set acquisition target, so as to obtain the original image samples collected by the array lens and the reference image samples collected by the reference lens. Then, the original image samples can be processed as in step S120 to obtain multiple image samples to be processed, and then the multiple image samples to be processed can be used as an input sample. In addition, the reference image sample can be used as a target image sample, and then the target image sample can be used as an output sample. In this way, corresponding input samples and output samples can be obtained, that is, a training sample pair can be obtained.
[0077] By referring to the above method, a training sample set consisting of multiple training sample pairs can be obtained. It should be noted that the richer the training sample pairs included in the training sample set, the better the reliability of the super-resolution model finally obtained by training.
[0078] In step S132, after obtaining the training sample set, the original model can be trained using the training sample set to obtain the final super-resolution model, so as to facilitate the subsequent use of the super-resolution model to process the image to be processed, thereby obtaining a target image with better image quality.
[0079] It should be noted that the super-resolution model can be obtained by other methods besides the above methods, and there is no limitation to this.
[0080] In this method, a plurality of images to be processed corresponding to a plurality of lenses in the array lens can be determined based on the original image captured by the array lens, and then the plurality of images to be processed can be processed based on the super-resolution model to obtain the target image corresponding to the array lens. This method can well obtain a high-resolution image, improve the final imaging effect of the array lens, and further enhance the user experience.
[0081] In an exemplary embodiment, an image processing method is provided, which is applied to a terminal. Figure 2 As shown, in this method, a plurality of images to be processed are input into a super-resolution model to determine a target image corresponding to the array lens, which may include:
[0082] S210, performing encoding processing on a plurality of images to be processed to determine a plurality of deep feature images; wherein the plurality of deep feature images correspond one to one to the plurality of images to be processed;
[0083] S220, performing alignment processing on the multiple deep feature images to determine multiple aligned feature images; wherein the multiple aligned feature images correspond one-to-one to the multiple deep feature images;
[0084] S230, performing fusion processing on the multiple aligned feature images to determine a fused feature image;
[0085] S240, processing the fused feature image to determine a fused image;
[0086] S250: Determine a target image according to the fused image.
[0087] In step S210, the super-resolution model may include a coding module. The coding module may be a network based on a streamlined architecture (mobilenet) or other types of networks, which are not limited. It should be noted that due to the small parameterization of mobilenet, the computational complexity of the coding module can be more reasonable, and the coding module can be more effectively deployed on the mobile terminal side to achieve stable image streaming output.
[0088] After the multiple images to be processed are input into the super-resolution model, they can be first input into the encoding module, and the encoding module can encode the multiple images to be processed respectively, and then the encoding module can output multiple deep feature images obtained after the encoding process. The multiple deep feature images correspond to the multiple images to be processed one by one.
[0089] In some embodiments,
[0090] The terminal can obtain four images to be processed, which can be recorded as the first image to be processed, the second image to be processed, the third image to be processed and the fourth image to be processed. In this embodiment, after the four images to be processed are input into the super-resolution model, the four images to be processed can first enter the encoding module, and the encoding module can encode the four images to be processed, thereby outputting four deep feature images, which can be recorded as the first deep feature image, the second deep feature image, the third deep feature image and the fourth deep feature image. Among them, the first deep feature image can correspond to the first image to be processed, the second deep feature image can correspond to the second image to be processed, the third deep feature image can correspond to the third image to be processed, and the fourth deep feature image can correspond to the fourth image to be processed.
[0091] It should be noted that in this step, in addition to obtaining the deep feature image based on the image to be processed in the above manner, the deep feature image can also be obtained in other ways, which are not limited to this.
[0092] In step S220, the super-resolution model may include an alignment module. After the super-resolution model obtains multiple deep feature images, it may input them into the alignment module, which may first determine the offset information of the pixels between the multiple deep feature images, and then use the offset information to align the coordinates of the pixels between the multiple deep images, thereby obtaining multiple aligned feature images.
[0093] In some embodiments,
[0094] The super-resolution model can first obtain four deep feature images, which can be recorded as the first deep feature image, the second deep feature image, the third deep feature image and the fourth deep feature image. In this embodiment, after the four deep feature images are input into the alignment module of the super-resolution model, the alignment module can align the four deep feature images, thereby outputting four aligned feature images, which can be recorded as the first aligned feature image, the second aligned feature image, the third aligned feature image and the fourth aligned feature image. Among them, the first deep feature image can correspond to the first aligned feature image, the second deep feature image can correspond to the second aligned feature image, the third deep feature image can correspond to the third aligned feature image, and the fourth deep feature image can correspond to the fourth aligned feature image.
[0095] It should be noted that, in this step, in addition to obtaining the alignment feature image in the above manner, the alignment feature image may also be obtained in other manners, which are not limited thereto.
[0096] In step S230, the super-resolution model may include a fusion module. After the super-resolution model obtains multiple aligned feature images, it may input them into the fusion module, which may perform feature aggregation on the multiple aligned feature images to achieve fusion processing and output a fused feature image.
[0097] In some embodiments,
[0098] The super-resolution model can first obtain four aligned feature images, which can be recorded as a first aligned feature image, a second aligned feature image, a third aligned feature image, and a fourth aligned feature image. In this embodiment, after the four aligned feature images are input into the fusion module of the super-resolution model, the fusion module can fuse the four aligned feature images to output a fused feature image.
[0099] It should be noted that, in this step, in addition to obtaining the fused feature image by the above-mentioned method, the fused feature image may also be obtained by other methods, which are not limited to this.
[0100] In step S240, the super-resolution model may include a decoding module. The decoding module may correspond to the encoding module. The decoding module may be a network based on a streamlined architecture (mobilenet) or other types of networks, which are not limited.
[0101] In some embodiments,
[0102] After the super-resolution model obtains the fused feature image, the fused feature image can be input into the decoding module, and the decoding module can decode the fused feature image to output the fused image.
[0103] It should be noted that in this step, in addition to obtaining the deep feature image based on the image to be processed in the above manner, the deep feature image can also be obtained in other ways, which are not limited to this.
[0104] In step S250, after the super-resolution model obtains the fused image, the fused image can be upsampled to determine the target image. The resolution of the target image can be higher than that of the original image, thereby improving the image resolution, achieving super-resolution processing, and improving the image quality.
[0105] In some embodiments,
[0106] After the super-resolution model obtains the fused image, the PixelShuffle (Sub-Pixel Convolutional Neural Network) method can be used for up-sampling to obtain a high-resolution target image.
[0107] It should be noted that, in addition to the above-mentioned method, upsampling processing can also be performed in other ways, which are not limited to this.
[0108] In this method, multiple images to be processed can be encoded, aligned, fused, up-sampled, etc. in sequence through a super-resolution model, and image demosaicing, denoising, and super-resolution can be completed to obtain a target image corresponding to the array lens, and a high-resolution image can be obtained well, thereby improving the final imaging effect of the array lens and further enhancing the user experience.
[0109] In an exemplary embodiment, an image processing method is provided, which is applied to a terminal. Figure 3 As shown, in the method, aligning multiple deep feature images to determine multiple aligned feature images may include:
[0110] S310, performing optical flow calculation on a plurality of deep feature images to determine offset information;
[0111] S320 , aligning the multiple deep feature images according to the offset information to determine a plurality of aligned feature images.
[0112] In step S310, a reference feature image may be first determined from a plurality of deep feature images. The reference feature image may be determined according to actual conditions and is not limited thereto. For example, the array lens may include four lenses arranged in a 2*2 form, wherein the deep feature image corresponding to the lens in the upper left corner may be determined as the reference image.
[0113] After the reference feature image is determined, the images other than the reference feature image in the multiple deep feature images can be recorded as feature images to be aligned. Then, the feature images to be aligned can be paired with the reference feature images in pairs, and optical flow calculation can be performed to determine the offset between the corresponding feature images to be aligned and the reference feature images. This offset can characterize the offset of all pixels between the feature images to be aligned and the reference feature images.
[0114] The information formed by the offset of the pixels between the multiple feature images to be aligned and the reference feature image can be determined as the offset information. That is, the offset information can include the offset between the images other than the reference feature image in the multiple deep feature images and the reference feature image.
[0115] The alignment module may include an optical flow network for performing optical flow calculation. The optical flow network may include a RAFT optical flow network or other optical flow networks, which are not limited. It should be noted that the RAFT optical flow network has less calculation amount and better optical flow calculation effect.
[0116] In this step, after the feature image to be aligned and the reference feature image are input into the optical flow network, the optical flow network can calculate them, thereby outputting the offset between the pixels in the feature image to be aligned and the reference feature image. In this way, the offset information composed of multiple offsets can be determined.
[0117] It should be noted that, in addition to determining the offset information in the above manner, the offset information may also be determined in other manners, which are not limited thereto.
[0118] In step S320, after the optical flow network of the alignment module outputs the offset information, the alignment module can perform alignment processing on the corresponding deep feature image based on the offset information, thereby obtaining an aligned feature image. Among them, the alignment module can perform alignment processing on the corresponding feature image to be aligned based on the offset in the offset information, thereby obtaining a corresponding aligned feature image. In addition, the alignment module can directly determine the reference feature image as the corresponding aligned feature image.
[0119] In some embodiments,
[0120] The super-resolution model can obtain four deep feature images, which can be recorded as the first deep feature image, the second deep feature image, the third deep feature image and the fourth deep feature image. Among them, the first deep feature image corresponding to the upper left corner lens in the 2*2 array lens arrangement can be determined as the reference feature image, and then the other three deep feature images are determined as the feature images to be aligned.
[0121] In this implementation, the first deep feature image and the second deep feature image can be used as a pair of images and input into the RAFT optical flow network of the alignment module, and the RAFT optical flow network can perform optical flow calculation on the first deep feature image and the second deep feature image, thereby outputting the offset corresponding to the second deep feature image. In this way, the offset corresponding to the third deep feature image and the offset corresponding to the fourth deep feature image can be determined. The above three offsets can constitute the offset information.
[0122] After determining the above-mentioned offset information, the alignment module can align the second deep feature image based on the offset corresponding to the second deep feature image, thereby obtaining an alignment feature image corresponding to the second deep feature image, and this alignment feature image can be recorded as the second alignment feature image. Similarly, the third alignment feature image corresponding to the third deep feature image and the fourth alignment feature image corresponding to the fourth deep feature image can be obtained. In addition, the alignment module can directly use the reference feature image as the first alignment feature image corresponding to the first deep feature image. Thus, the alignment module determines four alignment feature images.
[0123] It should be noted that, in this step, in addition to determining the alignment feature image in the above manner, the alignment feature image may also be determined in other manners, which are not limited thereto.
[0124] In this method, alignment processing can be performed based on optical flow calculation, so as to obtain multiple aligned feature images after pixel point alignment, so as to better ensure that a target image with better image quality is obtained, so as to better improve the user experience.
[0125] In an exemplary embodiment, an image processing method is provided, which is applied to a terminal. Figure 4 As shown, in the method, a plurality of to-be-processed images corresponding to the array lens are determined according to the original image, including:
[0126] S410, determining a plurality of original sub-images according to the original image; wherein the plurality of original sub-images correspond one-to-one to the plurality of shots;
[0127] S420: Perform lens shading correction processing on the multiple original sub-images to determine a plurality of images to be processed.
[0128] In step S410, the array lens can generally output an image in RAW format, which can be used as an original image. In this step, the original image can be analyzed and segmented to obtain an original sub-image corresponding to each lens in the array lens, that is, to obtain multiple original sub-images.
[0129] In some embodiments,
[0130] The array lens may include four lenses, which may be respectively recorded as a first lens, a second lens, a third lens, and a fourth lens. After the array lens outputs an image in RAW format, the terminal may use the image in RAW format as the original image and parse the image to obtain four sub-images in RAW format, which may be recorded as original sub-images. Among them, the four original sub-images may be respectively recorded as a first sub-image, a second sub-image, a third sub-image, and a fourth sub-image. In this embodiment, the first sub-image may be used as an image captured by the first lens, the second sub-image may be used as an image captured by the second lens, the third sub-image may be used as an image captured by the third lens, and the fourth sub-image may be used as an image captured by the fourth lens.
[0131] It should be noted that, in addition to obtaining a plurality of original sub-images through the above-mentioned method, a plurality of original sub-images may also be obtained through other methods, which are not limited thereto.
[0132] In step S420, after the terminal obtains multiple original sub-images, it can perform lens shading correction (LSC) on them. It should be noted that due to the change in lens transmittance, there is generally a problem of bright center and dark surroundings, so lens shading correction is required. Here, the array lens may include multiple lenses, so multiple lens shading corrections are required, that is, lens shading correction needs to be performed on the original sub-image captured by each lens.
[0133] In some embodiments,
[0134] The array lens may include four lenses, which may be respectively recorded as a first lens, a second lens, a third lens, and a fourth lens. The terminal may obtain four original sub-images, namely, a first sub-image captured by the first lens, a second sub-image captured by the second lens, a third sub-image captured by the third lens, and a fourth sub-image captured by the fourth lens.
[0135] In this embodiment, the first sub-image can be subjected to lens shading correction processing to obtain a first image to be processed. The first image to be processed corresponds to the first lens. Similarly, a second image to be processed corresponding to the second lens, a third image to be processed corresponding to the third lens, and a fourth image to be processed corresponding to the fourth lens can be obtained. Thus, the image to be processed corresponding to each lens in the array lens can be obtained.
[0136] It should be noted that, in this step, in addition to obtaining the image to be processed by the above-mentioned method, the image to be processed can also be obtained by other methods, which are not limited to this.
[0137] In this method, multiple images to be processed can be obtained by analyzing the original image and performing lens shading correction processing, so as to obtain a target image with better image quality based on the image to be processed, further improve the quality of the target image, and enhance the user experience.
[0138] In an exemplary embodiment, an image processing device is provided, which is applied to a terminal. The device can be used to implement the above-mentioned image processing method. For example, referring to Figure 5 As shown, the device may include an acquisition module 101 and a determination module 102. In the process of implementing the above method, the device
[0139] An acquisition module 101 is used to acquire an original image captured by the array lens;
[0140] A determination module 102 is used to determine a plurality of images to be processed corresponding to the array lens according to the original image; wherein the plurality of images to be processed correspond to the plurality of lenses included in the array lens in a one-to-one manner;
[0141] It is also used to input multiple images to be processed into a super-resolution model to determine the target image corresponding to the array lens.
[0142] In an exemplary embodiment, an image processing device is provided, which is applied to a terminal. Figure 5 As shown, in the device, the determination module 102 is used to:
[0143] Performing encoding processing on the multiple images to be processed to determine a plurality of deep feature images; wherein the multiple deep feature images correspond one to one to the multiple images to be processed;
[0144] Performing alignment processing on the multiple deep feature images to determine multiple aligned feature images; wherein the multiple aligned feature images correspond one-to-one to the multiple deep feature images;
[0145] Performing fusion processing on the multiple aligned feature images to determine a fused feature image;
[0146] Decoding the fused feature image to determine a fused image;
[0147] According to the fused image, the target image is determined.
[0148] In an exemplary embodiment, an image processing device is provided, which is applied to a terminal. Figure 5 As shown, in the device, the determination module 102 is used to:
[0149] Determine a plurality of original sub-images according to the original image, wherein the plurality of original sub-images correspond one-to-one to the plurality of shots;
[0150] A lens shading correction process is performed on a plurality of original sub-images to determine a plurality of images to be processed.
[0151] In an exemplary embodiment, a terminal is provided, for example, a mobile phone, a wearable device, a computer, a video camera, a camera, etc., which is provided with an array lens, but is not limited to this.
[0152] refer to Figure 6 As shown, terminal 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .
[0153] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0154] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0155] The power component 406 provides power to the various components of the device 400. The power component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 400.
[0156] The multimedia component 408 includes a screen that provides an output interface between the device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input instructions from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the terminal 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0157] The audio component 410 is configured to output and / or input audio instructions. For example, the audio component 410 includes a microphone (MIC), and when the device 400 is in an operating mode, such as a call mode, a recording mode, and a speech understanding mode, the microphone is configured to receive external audio instructions. The received audio instructions can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio instructions.
[0158] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a run button, and a lock button.
[0159] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the terminal 400. For example, the sensor assembly 414 can receive the open / closed state of the terminal 400, the relative positioning of the components, such as the display and keypad of the terminal 400, and the sensor assembly 414 can also detect the position change of the device 400 or a component of the terminal 400, the presence or absence of contact between the user and the device 400, the orientation or acceleration / deceleration of the device 400 and the temperature change of the device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0160] The communication component 416 is configured to facilitate wired or wireless communication between the device 400 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast instruction or broadcast-related image from an external broadcast management system via a broadcast setting channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0161] In an exemplary embodiment, the device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital instruction processors (DSPs), digital instruction processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.
[0162] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of the device 400 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a tape, a floppy disk, and an optical data storage device. When the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to perform the method in the above embodiment.
[0163] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0164] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, applied to a terminal, characterized in that: The image processing method comprises: Obtaining the original image captured by the array lens; Determine, according to the original image, a plurality of images to be processed corresponding to the array lens; wherein the plurality of images to be processed correspond one-to-one to the plurality of lenses included in the array lens; The plurality of images to be processed are input into a super-resolution model to determine a target image corresponding to the array lens.
2. The image processing method according to claim 1, characterized in that: The step of inputting the plurality of images to be processed into a super-resolution model to determine a target image corresponding to the array lens includes: Performing encoding processing on the plurality of images to be processed to determine a plurality of deep feature images; wherein the plurality of deep feature images correspond one to one to the plurality of images to be processed; Performing alignment processing on the plurality of deep feature images to determine a plurality of aligned feature images; wherein the plurality of aligned feature images correspond one-to-one to the plurality of deep feature images; Performing fusion processing on the plurality of aligned feature images to determine a fused feature image; Decoding the fused feature image to determine a fused image; The target image is determined according to the fused image.
3. The image processing method according to claim 2, characterized in that: The step of performing alignment processing on the plurality of deep feature images to determine a plurality of aligned feature images comprises: Performing optical flow calculation on the plurality of deep feature images to determine offset information; Alignment processing is performed on the plurality of deep feature images according to the offset information to determine a plurality of aligned feature images.
4. The image processing method according to claim 3, characterized in that: The performing optical flow calculation on the plurality of deep feature images to determine the offset information includes: Determining a reference feature image from the plurality of deep feature images; Perform optical flow calculation on the images other than the reference feature image in the multiple deep feature images respectively with the reference feature image to determine the offset information; wherein the offset information includes the offset between the images other than the reference feature image in the multiple deep feature images and the reference feature image respectively.
5. The image processing method according to claim 3, characterized in that: The super-resolution model includes an optical flow network, which is used to perform the optical flow calculation, and the optical flow network includes a RAFT optical flow network.
6. The image processing method according to claim 2, characterized in that: Determining the target image according to the fused image includes: The fused image is up-sampled to determine the target image.
7. The image processing method according to claim 2, characterized in that: The super-resolution model includes a coding module and a decoding module corresponding to each other, the coding module is used to perform the coding process, the decoding module is used to perform the decoding process, and the coding module and / or the decoding and coding respectively include a neural network based on a streamlined architecture.
8. The image processing method according to any one of claims 1 to 7, characterized in that: The super-resolution model is determined by: Acquire a training sample set; wherein the training sample set includes a plurality of training sample pairs, and the training sample pairs include input samples and output samples; the input samples include a plurality of to-be-processed image samples corresponding to a set acquisition target of the array lens; the output samples include a target image sample corresponding to the set acquisition target of the reference lens; the array lens and the reference lens have the same image sensor; The original model is trained according to the training sample set to determine the super-resolution model.
9. The image processing method according to any one of claims 1 to 7, characterized in that: The step of determining, according to the original image, a plurality of images to be processed corresponding to the array lens comprises: Determine a plurality of original sub-images according to the original image; wherein the plurality of original sub-images correspond one-to-one to the plurality of shots; The lens shading correction process is performed on the plurality of original sub-images to determine the plurality of images to be processed.
10. An image processing device, applied to a terminal, characterized in that: The image processing device comprises: An acquisition module is used to acquire the original image captured by the array lens; A determination module, used to determine a plurality of images to be processed corresponding to the array lens according to the original image; wherein the plurality of images to be processed correspond one-to-one to the plurality of lenses included in the array lens; It is also used to input the plurality of images to be processed into a super-resolution model to determine a target image corresponding to the array lens.
11. The image processing device according to claim 10, characterized in that: The determining module is used to: Performing encoding processing on the plurality of images to be processed to determine a plurality of deep feature images; wherein the plurality of deep feature images correspond one to one to the plurality of images to be processed; Performing alignment processing on the plurality of deep feature images to determine a plurality of aligned feature images; wherein the plurality of aligned feature images correspond one-to-one to the plurality of deep feature images; Performing fusion processing on the plurality of aligned feature images to determine a fused feature image; Decoding the fused feature image to determine a fused image; The target image is determined according to the fused image.
12. The image processing device according to claim 10 or 11, characterized in that: The determining module is used to: Determine a plurality of original sub-images according to the original image; wherein the plurality of original sub-images correspond one-to-one to the plurality of shots; The lens shading correction process is performed on the plurality of original sub-images to determine the plurality of images to be processed.
13. A terminal, characterized in that: The terminal comprises: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the image processing method as described in any one of claims 1-9.
14. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the image processing method as described in any one of claims 1 to 9.
