CN-115205106-B - Image processing method, device, electronic equipment and storage medium
Abstract
The disclosure relates to an image processing method, an image processing device, an electronic device and a storage medium, which comprise the steps of acquiring a plurality of images acquired by a plurality of image acquisition modules in the electronic device, determining a first image from the plurality of images according to editing operation on a display screen of the electronic device in an image preview process, cutting out a part, which is not overlapped with the editing range acted by the editing operation, of the first image to obtain a first image area, displaying the first image area, determining a second image from the plurality of images according to the editing operation on the display screen of the electronic device in an image storage process after the image preview is finished, wherein the image acquisition modules of the second image are different from the image acquisition modules of the first image area, cutting out the part, which is not overlapped with the editing range, of the second image to obtain a second image area, and fusing the first image area and the second image area to obtain a cut target image.
Inventors
- ZHAO SIQI
Assignees
- 北京小米移动软件有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20210409
Claims (18)
- 1. An image processing method, comprising: Acquiring a plurality of images acquired by a plurality of image acquisition modules in the electronic equipment, wherein the view fields of different image acquisition modules are different in size; Determining a first image from the plurality of images according to editing operation acted on a display screen of the electronic equipment in an image preview process, cutting off a part, which is not overlapped with the content of an editing range acted by the editing operation, in the first image to obtain a first image area, and displaying the first image area; And determining a second image from the plurality of images according to the editing operation acted on the display screen of the electronic equipment in the image storage process after the image preview is finished, wherein the image acquisition module of the second image is different from the image acquisition module of the first image area, cutting out the part, which is not overlapped with the content of the editing range, of the second image to obtain a second image area, and fusing the first image area and the second image area to obtain a cut target image.
- 2. The image processing method according to claim 1, wherein the cutting out the portion of the first image that does not overlap with the content of the editing range to which the editing operation is applied, to obtain a first image area, and displaying the first image area, comprises: in the image preview process, when the content display refresh rate of the editing range is greater than or equal to a first preset threshold value, adjusting the image resolution of the first image area to the display resolution of the electronic equipment; displaying the first image area after the image resolution is adjusted to the display resolution.
- 3. The image processing method according to claim 2, characterized in that the method comprises: When the content display refreshing rate of the editing range in the image preview process is smaller than the first preset threshold value, adjusting the image resolution of the first image area and the image resolution of the second image area to the display resolution of the electronic equipment; Fusing the first image area and the second image area after the resolution of the image is adjusted to obtain a fused image; And displaying the fusion image.
- 4. The image processing method according to claim 1, wherein the fusing the first image area and the second image area to obtain the cropped target image includes: And in the image storage process after the image preview is finished, if the resolution of the first image area is the same as that of the second image area, fusing the first image area and the second image area to obtain the cut target image.
- 5. The image processing method according to claim 1, wherein the fusing the first image area and the second image area to obtain the cropped target image includes: In the image storage process after the image preview is finished, if the resolution of the first image area is different from the resolution of the second image area, adjusting the image resolution of the first image area and the image resolution of the second image area to target resolution, wherein the target resolution is larger than the display resolution of the electronic equipment; and merging the first image area and the second image area after the image resolution is adjusted to obtain the target image.
- 6. The method of claim 1, wherein the cropping the portion of the second image that does not overlap the content of the editing range to obtain a second image region, merging the first image region and the second image region to obtain a cropped target image, comprises: And if the percentage of the occupied area of the image content corresponding to the second image area in the content of the editing range reaches a second preset threshold value, cutting off the part, which is not overlapped with the content of the editing range, of the second image to obtain the second image area, and fusing the first image area and the second image area to obtain the cut target image.
- 7. The image processing method of claim 1, wherein a field of view of the image acquisition module of the second image region is smaller than a field of view of the image acquisition module of the first image region.
- 8. The image processing method according to claim 7, wherein the order of the image capturing modules of the second image area is located at a position subsequent to the order of the image capturing modules of the first image area when the image capturing modules of the electronic device are arranged in descending order of the field of view.
- 9. An image processing apparatus, comprising: the acquisition module is used for acquiring a plurality of images acquired by a plurality of image acquisition modules in the electronic equipment, wherein the focal length values of the different image acquisition modules are different; The preview module is used for determining a first image from the plurality of images according to editing operation acted on a display screen of the electronic equipment in the image preview process, cutting off a part, which is not overlapped with the content of the editing range acted by the editing operation, of the first image to obtain a first image area, and displaying the first image area; The fusion module is used for determining a second image from the images according to the editing operation acted on the display screen of the electronic equipment in the image storage process after the image preview is finished, wherein the image acquisition module of the second image is different from the image acquisition module of the first image area, a part, which is not overlapped with the content of the editing range, in the second image is cut off to obtain a second image area, and the first image area and the second image area are fused to obtain a cut target image.
- 10. The image processing apparatus of claim 9, wherein the preview module is configured to: in the image preview process, when the content display refresh rate of the editing range is greater than or equal to a first preset threshold value, adjusting the image resolution of the first image area to the display resolution of the electronic equipment; And displaying the first image area after the image resolution is adjusted to the display resolution.
- 11. The image processing apparatus of claim 10, wherein the fusing module comprises: when the content display refreshing rate of the editing range in the image preview process is smaller than the first preset threshold value, adjusting the image resolution of the first image area and the image resolution of the second image area to the display resolution of the electronic equipment; Fusing the first image area and the second image area after the resolution of the image is adjusted to obtain a fused image; And displaying the fusion image.
- 12. The image processing apparatus of claim 9, wherein the fusing module is configured to: And in the image storage process after the image preview is finished, if the resolution of the first image area is the same as that of the second image area, fusing the first image area and the second image area to obtain the cut target image.
- 13. The image processing apparatus of claim 9, wherein the fusing module is configured to: In the image storage process after the image preview is finished, if the resolution of the first image area is different from the resolution of the second image area, adjusting the image resolution of the first image area and the image resolution of the second image area to target resolution, wherein the target resolution is larger than the display resolution of the electronic equipment; and merging the first image area and the second image area after the image resolution is adjusted to obtain the target image.
- 14. The image processing apparatus of claim 9, wherein the fusing module is configured to: And if the percentage of the occupied area of the image content corresponding to the second image area in the content of the editing range reaches a second preset threshold value, cutting off the part, which is not overlapped with the content of the editing range, of the second image to obtain the second image area, and fusing the first image area and the second image area to obtain the cut target image.
- 15. The image processing device of claim 9, wherein a field of view of the image acquisition module of the second image region is smaller than a field of view of the image acquisition module of the first image region.
- 16. The image processing apparatus according to claim 14, wherein the order of the image capturing modules of the second image area is located after the order of the image capturing modules of the first image area when the image capturing modules of the electronic device are arranged in descending order of field of view.
- 17. An electronic device comprising a processor, a memory and an executable program stored on the memory and capable of being executed by the processor, characterized in that the processor executes the steps of the image processing method according to any one of claims 1 to 8 when the executable program is executed by the processor.
- 18. A storage medium having stored thereon an executable program which when executed by a processor performs the steps of the image processing method according to any one of claims 1 to 8.
Description
Image processing method, device, electronic equipment and storage medium Technical Field The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, an image processing device, an electronic device, and a storage medium. Background The camera of the mobile phone is generally configured with a plurality of cameras and has different focal segments to achieve the best photographing effect under different FOV (Field of view). In general, a middle-low-end mobile phone is provided with a wide-angle lens and a UW (ultra wide-angle lens), and a high-end mobile phone is provided with a tele (tele lens), wherein the magnification of the tele relative to the wide is different from 2x to 10 x. Generally, when a user takes a photograph, the user actively zooms the preview screen in the preview interface to obtain the expected fov, and the mobile phone automatically switches to the matched lens according to fov required by the user. And when photographing, saving the picture under the corresponding fov. Such photos, in album, have poor editability for post-processing. For example, if the zoom-in is large enough, the zoom-out cannot be performed to obtain a larger fov, and if the zoom-in is large enough, a lens with better image quality cannot be called. When the current prior art scheme achieves the zoom-out operation, a larger fov is obtained. However, in the amplifying operation realized by the related technical scheme, the image of the camera with better image quality is called, and the main reason is the resolution problem. For example, a mobile phone is provided with 3 cameras of 12M, and focal length values of the 3 cameras are respectively 0.5x, 1.0x and 2.0x. As shown in fig. 1, when the image of the 2x camera is called during the zoom-in operation, and the image quality of the 1x camera is ensured not to be lost, when the image of the 1x camera is spliced into the image of the 0.5x camera, the image of the 12M 0.5x camera needs to be up-sampled to the up-sampled 0.5x image of 48M (12 m×4), and then the image can be spliced with the image resolution of the 1.0x camera of 12M. And (3) zooming on the 48M images which are spliced by the user, and downsampling the images into 12M images according to the image area selected by the user when the images are stored. To align fov and resolution of a 2x camera, 1x up-samples to 48M (12M x 4), 0.5x up-samples to 192M (12M x 4), then the images of 192M are combined and the images of 192M are manipulated. Processing the pictures in this way tends to cause problems with the slowness of the electronic device. Disclosure of Invention The present disclosure provides an image processing method, an image processing apparatus, an electronic device, and a storage medium. According to a first aspect of an embodiment of the present disclosure, there is provided an image processing method including: Acquiring a plurality of images acquired by a plurality of image acquisition modules in the electronic equipment, wherein the view fields of different image acquisition modules are different in size; Determining a first image from the plurality of images according to editing operation acted on a display screen of the electronic equipment in an image preview process, cutting off a part, which is not overlapped with the content of an editing range acted by the editing operation, in the first image to obtain a first image area, and displaying the first image area; And determining a second image from the plurality of images according to the editing operation acted on the display screen of the electronic equipment in the image storage process after the image preview is finished, wherein the image acquisition module of the second image is different from the image acquisition module of the first image area, cutting out the part, which is not overlapped with the content of the editing range, of the second image to obtain a second image area, and fusing the first image area and the second image area to obtain a cut target image. In some embodiments, the cropping out of the portion of the first image that does not overlap with the content of the editing range acted by the editing operation, to obtain a first image area, and displaying the first image area includes: in the image preview process, when the content display refresh rate of the editing range is greater than or equal to a first preset threshold value, adjusting the image resolution of the first image area to the display resolution of the electronic equipment; displaying the first image area after the image resolution is adjusted to the display resolution. In some embodiments, the method comprises: When the content display refreshing rate of the editing range in the image preview process is smaller than the first preset threshold value, adjusting the image resolution of the first image area and the image resolution of the second image area to the display resolution of the ele