Image processing method and device, computer readable storage medium and electronic device

By meshing, reducing, optimizing and enlarging the zoom image, the problem of inconsistent distortion correction effects of zoom image is solved, and the visual consistency and resource saving effects are achieved during the zoom process.

CN114119404BActive Publication Date: 2025-02-11GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111394669.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2025-02-11
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

The prior art has inconsistent effects when performing distortion correction on zoom images, resulting in poor visual coherence during zooming.

Method used

By acquiring the zoom image, determining the face image, and meshing the image, grid optimization is performed for the face area, and finally enlarging according to the zoom ratio to generate the processed zoom image.

Benefits of technology

The consistency of the zoom image distortion correction process is achieved, visual consistency during the zoom process is ensured, and resource consumption is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119404B_ABST
    Figure CN114119404B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image processing method, an image processing device, a computer-readable storage medium and an electronic device, and relates to the field of image processing technology. The image processing method includes: obtaining a zoom image generated based on a zoom operation, determining a face image in the zoom image; gridding the zoom image to obtain a first grid map; reducing the first grid map according to the zoom multiple of the zoom image to obtain a second grid map; optimizing the grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map; enlarging the third grid map according to the zoom multiple to obtain a fourth grid map, and generating a processed zoom image based on the fourth grid map. The present disclosure can ensure the consistency of zoom image distortion correction processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of image processing, and in particular to an image processing method, an image processing device, a computer-readable storage medium, and an electronic device. Background Art

[0002] With the popularization of terminal devices and the increase in user shooting needs, imaging technology is also developing rapidly. However, due to the use of wide-angle camera modules and other reasons, the captured images may be distorted.

[0003] Currently, there are some distortion correction solutions. However, for images generated by zoom, there is a common problem of inconsistent distortion correction effects. Summary of the invention

[0004] The present disclosure provides an image processing method, an image processing device, a computer-readable storage medium and an electronic device, thereby overcoming the problem of inconsistent distortion correction processing effects on zoom images at least to a certain extent.

[0005] According to a first aspect of the present disclosure, there is provided an image processing method, comprising: acquiring a zoom image generated based on a zoom operation, and determining a face image in the zoom image; gridding the zoom image to obtain a first grid map; reducing the first grid map according to a zoom factor of the zoom image to obtain a second grid map; optimizing a grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map; enlarging the third grid map according to the zoom factor to obtain a fourth grid map, and generating a processed zoom image based on the fourth grid map.

[0006] According to a second aspect of the present disclosure, there is provided an image processing device, comprising: an image acquisition module, for acquiring a zoom image generated during a zooming process, and determining a face image in the zoom image; a grid division module, for performing grid division on the zoom image to obtain a first grid map; a grid reduction module, for reducing the first grid map according to a zoom factor of the zoom image to obtain a second grid map; a grid optimization module, for optimizing a grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map; and an image generation module, for enlarging the third grid map according to the zoom factor to obtain a fourth grid map, and generating a processed zoom image based on the fourth grid map.

[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned image processing method is implemented.

[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising a processor; and a memory for storing one or more programs, wherein when the one or more programs are executed by the processor, the processor implements the above-mentioned image processing method.

[0009] In the technical solutions provided by some embodiments of the present disclosure, the grid map of the zoomed image is reduced according to the zoom multiple, and then the grid is optimized. The grid map of the zoomed image can be unified to the original image scale to avoid different scale processing methods or parameters for different zoomed images during the zooming process. Therefore, the consistency of the zoomed image distortion correction processing can be ensured, and the visual coherence during the zooming process can be achieved. In addition, when performing distortion correction, the disclosed solution mainly processes the grid map, and the resource consumption is low.

[0010] 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

[0011] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0012] Figure 1 A schematic diagram showing the system architecture of the image processing solution of an embodiment of the present disclosure;

[0013] Figure 2 A schematic diagram of the structure of an electronic device suitable for implementing an embodiment of the present disclosure is shown;

[0014] Figure 3 A flowchart schematically shows an image processing method according to an exemplary embodiment of the present disclosure;

[0015] Figure 4 A schematic diagram showing a process from a first grid map to a fourth grid map;

[0016] Figure 5 A schematic diagram showing a selection interface displayed on a terminal device according to an embodiment of the present disclosure is shown;

[0017] Figure 6 A flowchart schematically shows the entire process of processing a zoom image according to an embodiment of the present disclosure;

[0018] Figure 7 A block diagram schematically shows an image processing apparatus according to an exemplary embodiment of the present disclosure;

[0019] Figure 8 A block diagram schematically shows an image processing apparatus according to another exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0021] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0022] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first", "second", "third", "fourth", etc. below are only for the purpose of distinction and should not be used as limitations of the present disclosure.

[0023] Figure 1 A schematic diagram showing the system architecture of the image processing solution of an embodiment of the present disclosure.

[0024] like Figure 1 As shown, the system architecture may include a terminal device 11 and a server 12. The terminal device 11 and the server 12 may be connected via a network, and the connection type of the network may include, for example, wired or wireless communication links or optical fiber cables.

[0025] It should be understood that the number of terminal devices 11 and servers 12 is only illustrative. According to the implementation requirements, there can be any number of terminal devices and servers. For example, the server 12 can be a server cluster composed of multiple servers. The server 12 can also be called a cloud or cloud server.

[0026] The terminal device 11 can interact with the server 12 through the network to receive or send messages, etc. The terminal device 11 may include but is not limited to a smart phone, a tablet computer, a smart wearable device, a personal computer, etc. In addition, the terminal device 11 may also be referred to as a terminal, a mobile device, a mobile terminal, a mobile terminal, a smart terminal, etc.

[0027] In the case where the image processing process of the exemplary embodiment of the present disclosure is performed by the terminal device 11, first, the terminal device 11 can obtain a zoom image generated based on a zoom operation, and determine a face image in the zoom image. Next, the terminal device 11 can reduce the first grid map according to the zoom factor of the zoom image to obtain a second grid map, and optimize the grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map. Then, the terminal device 11 can enlarge the third grid map according to the zoom factor to obtain a fourth grid map, and generate a processed zoom image based on the fourth grid map.

[0028] In the case where the image processing process of the exemplary embodiment of the present disclosure is performed by the server 12, first, the server 12 can obtain a zoom image generated based on a zoom operation from the terminal device 11, and determine the face image in the zoom image. Next, the server 12 can reduce the first grid map according to the zoom factor of the zoom image to obtain a second grid map, and optimize the grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map. Then, the server 12 can enlarge the third grid map according to the zoom factor to obtain a fourth grid map, and generate a processed zoom image based on the fourth grid map. In addition, the server 12 can also feed back the processed zoom image to the terminal device 11.

[0029] It should be noted that any of the above steps of processing the image can be executed by the terminal device 11 or the server 12, and the present disclosure does not impose any limitation on this.

[0030] Figure 2 Schematic diagram of an electronic device suitable for implementing the exemplary embodiment of the present disclosure is shown. The terminal device of the exemplary embodiment of the present disclosure may be configured as follows Figure 2 It should be noted that Figure 2 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0031] The electronic device of the present disclosure includes at least a processor and a memory, wherein the memory is used to store one or more programs. When the one or more programs are executed by the processor, the processor can implement the image processing method of the exemplary embodiment of the present disclosure.

[0032] Specifically, Figure 2 As shown, the electronic device 200 may include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a receiver 272, a microphone 273, an earphone interface 274, a sensor module 280, a display screen 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identification Module (SIM) card interface 295, etc. The sensor module 280 may include a depth sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.

[0033] It is to be understood that the structure illustrated in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 200. In other embodiments of the present disclosure, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0034] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor and / or a neural network processor (NPU). Different processing units may be independent devices or integrated into one or more processors. In addition, a memory may be provided in the processor 210 for storing instructions and data.

[0035] The electronic device 200 can realize the shooting function through the ISP, the camera module 291, the video codec, the GPU, the display screen 290 and the application processor. In some embodiments, the electronic device 200 may include 1 or N camera modules 291, where N is a positive integer greater than 1. If the electronic device 200 includes N cameras, one of the N cameras is a main camera.

[0036] It should be noted that in some example scenarios of the present disclosure, the electronic device 200 includes at least a wide-angle camera module. For example, the original image and / or zoom image described in the present disclosure can be captured based on the wide-angle camera module.

[0037] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 can include a program storage area and a data storage area. The external memory interface 222 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.

[0038] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.

[0039] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0040] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0041] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the following embodiments.

[0042] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0043] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.

[0044] The following description will be made by taking a terminal device executing the image processing method of the embodiment of the present disclosure as an example. In this case, the image processing apparatus may be configured in the terminal device.

[0045] Figure 3 The flowchart of the image processing method according to the exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the image processing method may include the following steps:

[0046] S30. Acquire a zoom image generated based on the zoom operation, and determine a face image in the zoom image.

[0047] In an exemplary embodiment of the present disclosure, the zoom image may be an image generated based on a zoom operation and to be subjected to face distortion correction. The zoom image may be a preview image or an image captured in response to a user's shooting operation. The camera module used for shooting may be a wide-angle camera module or an ultra-wide-angle camera module.

[0048] According to some embodiments of the present disclosure, an original image is captured in advance, and the terminal device can generate a zoomed image in response to a zoom operation on the original image. The original image can be an image captured in advance using a wide-angle camera module or an ultra-wide-angle camera module.

[0049] After the terminal device obtains the zoomed image, it can use a face detection algorithm to determine the face area in the zoomed image. In the embodiment of the present disclosure, the face area is referred to as a face image.

[0050] S32. Grid the zoomed image to obtain a first grid map.

[0051] The first grid map may be an original grid map of the zoomed image, which may be configured as a sparse grid map to reduce the amount of calculation in subsequent processing.

[0052] Specifically, the zoomed image can be evenly divided to obtain a first grid map. For example, if the pixel resolution of the zoomed image is 3000*4000, the zoomed image is evenly divided into 31*41 grid points to obtain a grid map, and the size of each grid in the grid map is 10*10. The present disclosure does not limit the number of grid points contained in the first grid map and the division method.

[0053] S34. According to the zoom factor of the zoomed image, the first grid image is reduced to obtain a second grid image.

[0054] It should be noted that the zoomed image of the embodiment of the present disclosure is determined after zooming compared to the original image scale, and the degree of zooming can be characterized by the zoom factor. For example, if the zoom factor of the zoomed image is 2.5, it can be said that the zoomed image is an image obtained by magnifying the original image by 2.5 times with the center point. It can be understood that the resolution of the zoomed image is the same as that of the original image.

[0055] The terminal device may reduce the first grid image according to the zoom factor of the zoomed image to obtain the second grid image.

[0056] S36. Optimize the grid area in the second grid map corresponding to the face image to generate a third grid map corresponding to the second grid map.

[0057] First, the terminal device may fuse the second grid map with the grid map corresponding to the scale of the original image to obtain a first intermediate grid map corresponding to the scale of the original image.

[0058] Specifically, the terminal device can determine the position of the second grid map in the grid map corresponding to the original image scale, and then use the second grid map to replace the grid area corresponding to the position in the grid map corresponding to the original image scale to obtain a first intermediate grid map corresponding to the original image scale.

[0059] In the embodiment of the present disclosure, the above position may be represented by, for example, top, bottom, left, and right information.

[0060] Next, the terminal device may optimize the first intermediate grid map to obtain the second intermediate grid map. For example, the first intermediate grid map may be globally optimized, or only the grid area corresponding to the face image in the first intermediate grid map may be optimized.

[0061] Then, the terminal device may extract a third grid map corresponding to the second grid map from the second intermediate grid map.

[0062] Specifically, when the position of the second grid map in the grid map corresponding to the original image scale is determined, the grid area corresponding to the position can be extracted from the second intermediate grid map as the third grid map corresponding to the second grid map. For example, the position of the area to be extracted can be determined using the above-mentioned up, down, left, and right information.

[0063] In some embodiments of the present disclosure, optimizing the grid area may include optimizing the grid area corresponding to the face image and optimizing the grid area other than the grid area corresponding to the face image.

[0064] First, on the one hand, the terminal device can optimize the grid area corresponding to the face image in the second grid map to obtain a first optimization result. On the other hand, the terminal device can optimize the grid area other than the grid area corresponding to the face image in the second grid map to obtain a second optimization result.

[0065] Next, the first optimization result and the second optimization result may be fused to generate a third grid map corresponding to the second grid map.

[0066] The above-mentioned optimization process may include a linear optimization process and / or a nonlinear optimization process, and may be combined with affine projection or similarity projection and other means to construct optimization items and solve the optimization problem, which is not limited in the present disclosure.

[0067] S38. Enlarge the third grid image according to the zoom factor to obtain a fourth grid image, and generate a processed zoom image based on the fourth grid image.

[0068] After determining the third grid image, the terminal device may enlarge the third grid image according to the zoom factor of the zoomed image to obtain a fourth grid image.

[0069] Figure 4The process of generating the fourth grid map from the first grid map is schematically shown. First, the first grid map can be reduced based on the zoom factor to obtain the second grid map; next, the second grid map can be optimized to obtain the third grid map; then, the third grid map can be enlarged based on the zoom factor to obtain the fourth grid map.

[0070] After determining the fourth grid map, the terminal device may generate a processed zoom image based on the fourth grid map.

[0071] According to some embodiments of the present disclosure, first, the terminal device may determine the pixel points corresponding to the fourth grid image. Next, the terminal device may perform interpolation processing on the pixel points corresponding to the fourth grid image to generate a processed zoom image.

[0072] According to some other embodiments of the present disclosure, first, the terminal device can determine the original pixel point information in the zoomed image and the fourth grid map; next, the terminal device can generate a processed face image based on the original pixel point information in the zoomed image and the second grid map.

[0073] The present disclosure does not limit the interpolation algorithm, for example, including any one of the nearest neighbor interpolation algorithm, the bilinear interpolation algorithm, and the cubic polynomial interpolation algorithm.

[0074] After generating the processed zoomed image, the terminal device may display a selection interface for whether to replace the original image with the processed zoomed image. The selection interface may be displayed in the form of a pop-up window. Figure 5 .

[0075] The terminal device may respond to the replacement selection operation on the selection interface, replace the original image with the processed zoomed image, and save it.

[0076] Figure 6 The flowchart of the whole process of processing the zoom image according to the embodiment of the present disclosure is schematically shown.

[0077] In step S602, the terminal device may acquire the zoomed image, perform grid division, and obtain a first grid map.

[0078] In step S604, the terminal device may reduce the first grid image according to the zoom factor of the zoomed image to obtain a second grid image.

[0079] In step S606, the terminal device may determine the position of the second grid map in the grid map corresponding to the original image scale, and replace it to obtain the first intermediate grid map.

[0080] In step S608, the terminal device may optimize the first intermediate grid map to obtain a second intermediate grid map.

[0081] In step S610, the terminal device may extract a third grid map corresponding to the position from the second intermediate grid map.

[0082] In step S612, the terminal device may enlarge the third grid image according to the zoom factor to obtain a fourth grid image.

[0083] In step S614, the terminal device may perform image interpolation based on the fourth grid image to generate a processed zoom image.

[0084] In summary, the disclosed embodiment reduces the grid map of the zoomed image according to the zoom factor and then performs grid optimization. The grid map of the zoomed image can be unified to the original image scale to avoid using different scale processing methods or parameters for different zoomed images during the zooming process. Thus, the consistency of the zoomed image distortion correction processing can be ensured to achieve visual continuity during the zooming process. In addition, when performing distortion correction, the disclosed solution mainly processes the grid map, which has low resource consumption.

[0085] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0086] Furthermore, this exemplary embodiment also provides an image processing device.

[0087] Figure 7 FIG. 1 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure. Figure 7 The image processing device 7 according to an exemplary embodiment of the present disclosure may include an image acquisition module 71 , a grid division module 73 , a grid reduction module 75 , a grid optimization module 77 and an image generation module 79 .

[0088] Specifically, the image acquisition module 71 can be used to acquire the zoom image generated during the zooming process and determine the face image in the zoom image; the grid division module 73 can be used to grid the zoom image to obtain a first grid map; the grid reduction module 75 can be used to reduce the first grid map according to the zoom factor of the zoom image to obtain a second grid map; the grid optimization module 77 can be used to optimize the grid area corresponding to the face image in the second grid map to generate a third grid map corresponding to the second grid map; the image generation module 79 can be used to enlarge the third grid map according to the zoom factor to obtain a fourth grid map, and generate a processed zoom image based on the fourth grid map.

[0089] According to an exemplary embodiment of the present disclosure, the grid optimization module 77 can be configured to perform: fusing the second grid map with the grid map corresponding to the original image scale to obtain a first intermediate grid map corresponding to the original image scale; optimizing the first intermediate grid map to obtain a second intermediate grid map; and extracting a third grid map corresponding to the second grid map from the second intermediate grid map.

[0090] According to an exemplary embodiment of the present disclosure, the process of the grid optimization module 77 obtaining the first intermediate grid map can be configured to perform: determining the position of the second grid map in the grid map corresponding to the original image scale; replacing the grid area corresponding to the position in the grid map corresponding to the original image scale with the second grid map, to obtain a first intermediate grid map corresponding to the original image scale.

[0091] According to an exemplary embodiment of the present disclosure, the process of extracting the third grid map by the grid optimization module 77 may be configured to perform: extracting a grid area corresponding to a position from the second intermediate grid map as a third grid map corresponding to the second grid map.

[0092] According to an exemplary embodiment of the present disclosure, the grid optimization module 77 can also be configured to perform: optimizing the grid area corresponding to the face image in the second grid map to obtain a first optimization result; optimizing the grid area other than the grid area corresponding to the face image in the second grid map to obtain a second optimization result; fusing the first optimization result and the second optimization result to generate a third grid map corresponding to the second grid map.

[0093] According to an exemplary embodiment of the present disclosure, the image acquisition module 71 may also be configured to perform: generating a zoomed image in response to a zoom operation on the original image. Figure 8 Compared with the image processing device 7 , the image processing device 8 may further include a replacement interaction module 81 .

[0094] Specifically, the replacement interaction module 81 can be configured to execute: after generating a processed zoom image, display a selection interface for whether to replace the original image with the processed zoom image; wherein, in response to a replacement selection operation on the selection interface, the original image is replaced with the processed zoom image.

[0095] According to an exemplary embodiment of the present disclosure, the image generation module 79 may be configured to execute: determining pixel points corresponding to the fourth grid image; and performing interpolation processing on the pixel points corresponding to the fourth grid image to generate a processed zoom image.

[0096] Since the functional modules of the image processing device in the embodiment of the present disclosure are the same as those in the above-mentioned method embodiment, they will not be described in detail here.

[0097] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure 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, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0098] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0099] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0100] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.

[0101] 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, characterized in that: include: Acquire a zoom image generated based on a zoom operation, and determine a face image in the zoom image; Performing grid division on the zoomed image to obtain a first grid map; Zooming down the first grid image according to the zoom factor of the zoomed image to obtain a second grid image; Determine a position of the second grid map in the grid map corresponding to the scale of the original image; Using the second grid map to replace the grid area corresponding to the position in the grid map corresponding to the original image scale, to obtain a first intermediate grid map corresponding to the original image scale; optimizing the first intermediate grid map to obtain a second intermediate grid map; Extracting a third grid map corresponding to the second grid map from the second intermediate grid map; The third grid image is enlarged according to the zoom factor to obtain a fourth grid image, and a processed zoom image is generated based on the fourth grid image.

2. The image processing method according to claim 1, characterized in that: Extracting a third grid map corresponding to the second grid map from the second intermediate grid map includes: A grid area corresponding to the position is extracted from the second intermediate grid map as a third grid map corresponding to the second grid map.

3. The image processing method according to claim 1, characterized in that: The image processing method further comprises: generating the zoomed image in response to a zoom operation on the original image; and After generating the processed zoomed image, displaying a selection interface for whether to replace the original image with the processed zoomed image; Wherein, in response to a replacement selection operation on the selection interface, the original image is replaced by the processed zoomed image.

4. The image processing method according to any one of claims 1 to 3, characterized in that: Generating a processed zoom image based on the fourth grid image includes: Determine the pixel points corresponding to the fourth grid image; Interpolation processing is performed on pixel points corresponding to the fourth grid image to generate a processed zoom image.

5. An image processing device, characterized in that: include: An image acquisition module, used to acquire a zoomed image generated during the zooming process, and determine a face image in the zoomed image; A grid division module, used for performing grid division on the zoomed image to obtain a first grid map; A grid reduction module, configured to reduce the first grid image according to the zoom factor of the zoomed image to obtain a second grid image; A grid optimization module, used to determine the position of the second grid map in the grid map corresponding to the original image scale; Using the second grid map to replace the grid area corresponding to the position in the grid map corresponding to the original image scale, to obtain a first intermediate grid map corresponding to the original image scale; optimizing the first intermediate grid map to obtain a second intermediate grid map; Extracting a third grid map corresponding to the second grid map from the second intermediate grid map; The image generation module is used to enlarge the third grid image according to the zoom factor to obtain a fourth grid image, and generate a processed zoom image based on the fourth grid image.

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

7. An electronic device, characterized in that: include: processor; A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the image processing method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Image correction method, device, electronic equipment and computer readable medium

    CN112686824A

  • Apparatus and method for providing digital zoom

    KR1020090078933A