CN111654627B - Digital zooming method, device, equipment and storage medium - Google Patents

Digital zooming method, device, equipment and storage medium Download PDF

Info

Publication number
CN111654627B
CN111654627B CN202010518721.7A CN202010518721A CN111654627B CN 111654627 B CN111654627 B CN 111654627B CN 202010518721 A CN202010518721 A CN 202010518721A CN 111654627 B CN111654627 B CN 111654627B
Authority
CN
China
Prior art keywords
image
zooming
scaling
image processor
zoom
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010518721.7A
Other languages
Chinese (zh)
Other versions
CN111654627A (en
Inventor
任伟
刘阳
韩向利
魏健
李海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202010518721.7A priority Critical patent/CN111654627B/en
Publication of CN111654627A publication Critical patent/CN111654627A/en
Application granted granted Critical
Publication of CN111654627B publication Critical patent/CN111654627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/63Control of cameras or camera modules by using electronic viewfinders
    • H04N23/631Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters
    • H04N23/632Graphical user interfaces [GUI] specially adapted for controlling image capture or setting capture parameters for displaying or modifying preview images prior to image capturing, e.g. variety of image resolutions or capturing parameters

Abstract

The embodiment of the application discloses a digital zooming method, a digital zooming device, digital zooming equipment and a storage medium, wherein the method comprises the following steps: acquiring the zoom ratio of an input image; determining a scaling parameter for scaling the input image according to the scaling factor and the scaling capability of the image processor; and circularly zooming the input image by the image processor according to the zooming times included in the zooming parameters to obtain a display image. By implementing the method and the device, the image processor is used for circularly zooming the input image, so that the digital zooming capability can be improved.

Description

Digital zooming method, device, equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a digital zoom method, apparatus, device, and storage medium.
Background
Zooming is to zoom in or out a photographed subject by changing a focal length and an angle of view to photograph subjects of different distances. The digital zooming realizes zooming by an interpolation algorithm on the image, and the image quality gradually deteriorates along with the increase of zooming times; optical zooming is the purpose of zooming by changing the distance between optical lenses to change the focal length and the field angle.
At present, most of mobile equipment with cameras enter digital zooming after the focal length of the mobile equipment exceeds 2-3 times of the normal focal length (optical zooming) due to the characteristics of the devices of the mobile equipment, and the times of the digital zooming are determined according to the capacity of an image processor in the cameras. The digital zoom capability of the image processor is determined according to the capability of the chip, and the image cannot be zoomed without limit. The resulting digital zoom capability is generally not very high.
Disclosure of Invention
The embodiment of the application provides a digital zooming method, a digital zooming device, digital zooming equipment and a digital zooming storage medium, which can improve the digital zooming capability.
The application provides a digital zooming method, which comprises the following steps:
acquiring the zoom ratio of an input image;
determining a zooming parameter for zooming the input image according to the zooming magnification and the zooming capability of the image processor;
and according to the zooming times included in the zooming parameters, circularly zooming the input image by the image processor to obtain a display image.
In one possible approach, the method includes:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor for zooming to obtain an output image after first processing;
if the image size of the output image after the first processing is smaller than the target image size of the display image, inputting the output image into an image processor for circularly zooming to obtain the display image;
and if the image size of the output image after the first processing is larger than or equal to the target image size of the display image, stopping the circular scaling processing, and taking the output image after the first processing as the display image.
In one possible approach, the method includes:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor to circularly zoom times to obtain a processed initial zoomed image;
and if the image size of the initial zoomed image is larger than or equal to the target image size of the display image, stopping the circular zooming processing and determining the initial zoomed image as the display image.
In one possible approach, the method includes:
if the ratio of the zooming magnification to the zooming capability of the image processor is an integer, determining the zooming times included in the zooming parameters to be N/M times;
if the ratio of the zooming magnification to the zooming capability of the image processor is not an integer, determining the zooming times included in the zooming parameters to be N/M +1 times;
wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer.
In one possible approach, the method includes:
and configuring the zooming magnification of the zooming module in the image processor to be M times.
In one possible approach, the method includes:
when the input image is zoomed for the first N/M times, the zooming magnification of a zooming module in the image processor is configured to be M times;
when the input image is zoomed for the (N/M + 1) th time, the zooming magnification of the zooming module in the image processor is configured to be X times, wherein X is the remainder of N/M.
In one possible approach, the method includes:
and after the input image is zoomed for the first time, other modules except the zooming module and the receiving module in the configured image processor are closed.
The present application provides a digital zoom apparatus, the apparatus comprising:
the receiving module is used for acquiring the zooming ratio of the input image;
the receiving module is also used for determining a zooming parameter for zooming the input image according to the zooming magnification and the zooming capability of the image processor;
and the zooming module is used for circularly zooming the input image through the image processor according to the zooming times included in the zooming parameters to obtain a display image.
The application provides a terminal device, characterized in that, equipment includes:
a memory comprising computer readable instructions;
a processor coupled to the memory, the processor configured to execute the computer readable instructions, thereby causing the terminal device to perform the digital zoom method described above.
The present application provides a computer-readable storage medium, wherein the computer-readable storage medium has stored therein instructions, which, when run on a computer, cause the computer to execute the above-mentioned digital zoom method.
In the application, terminal equipment acquires the scaling factor of an input image; determining a zooming parameter for zooming the input image according to the zooming magnification and the zooming capability of the image processor; further, circularly zooming the input image according to the zooming times included in the zooming parameters; and realizing the stepless zooming function of the image by circularly utilizing the zooming capability of the image processor. Therefore, by implementing the present application, the capability of digital zooming can be improved.
Drawings
Fig. 1 is a diagram of a possible application scenario architecture provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a digital zooming method provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a possible target area provided by an embodiment of the present application;
FIG. 4 is a flowchart illustrating a possible cyclic scaling process provided by an embodiment of the present application;
FIG. 5 is a flowchart illustrating a possible cyclic scaling process provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram of a digital zoom apparatus provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In addition, the features in the embodiments and the examples described below may be combined with each other without conflict.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, fig. 1 is a diagram of a possible application scenario architecture provided in the embodiment of the present application. As shown in fig. 1, the terminal device according to the embodiment of the present application may include an application display module 101, a camera module 102, and an image processor 103. The application display module 101 is configured to display an image, including displaying an input image and displaying an image. The camera module 102 is used for shooting an image to obtain an input image. The image processor 103 is configured to perform image processing on the input image, including scaling and other image processing (e.g., processing of color, brightness, noise, etc.).
Based on the application scenario shown in fig. 1, in the present application, the application display module 101 obtains a zoom instruction in response to an operation of a user, and sends the zoom instruction to the camera module 102. The image pickup module 102 sends a photographed input image and a zoom instruction to the image processor 103. After the image processor 103 receives the input image and the zoom instruction, the zoom magnification of the input image can be acquired. A scaling parameter for scaling the input image is determined in accordance with the scaling factor and the scaling capability of the image processor. Further, the image processor 103 performs a scaling process on the input image cyclically according to the number of times of scaling included in the scaling parameter, thereby obtaining a display image. In fig. 1, Data1 represents an input image, Data2 represents an image after cropping, color, brightness, noise, and the like, Data3 represents an image after first image processing (including scaling processing), and Data3 is subjected to cyclic scaling processing. Finally, the image processor sends the display image to the application display module 101, and the display module 101 may display the scaled display image in the user interface of the terminal device. In the scheme of the application, images are processed circularly by utilizing the zooming characteristic of the image processor, so that the effect of improving the zooming magnification of the images is achieved.
The terminal device is any device having an image processor and a camera module, and may include but is not limited to: smart phones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, Mobile Internet Devices (MID), etc., which are not limited in the embodiments of the present application.
Referring to fig. 2, fig. 2 is a schematic flow chart of a digital zoom method provided in an embodiment of the present application, where the method includes, but is not limited to, steps S201 to S203:
s201: the terminal device acquires a zoom magnification of an input image.
The input image is any image obtained by the terminal equipment through camera modules such as a camera; the zoom magnification is a magnification for zooming the target area of the input image. Optionally, the zoom ratio corresponding to the target area may be determined by a terminal application on the terminal device; and determining the image size, the coordinate parameters, the scaled target image size and the like corresponding to the target area. Specific embodiments of obtaining the zoom magnification of the input image are not limited, and include but are not limited to the following possible embodiments.
In one possible embodiment, the target area and the zoom factor may be visually determined by a terminal application on the terminal device. For example, the input image is displayed on a user interface of the terminal application, and the user operates the target area needing to be zoomed on the user interface. Please refer to fig. 3, fig. 3 is a schematic diagram of a possible target area provided in the present embodiment, and as shown in fig. 3, it is assumed that the lens display area displays an input image, an elliptical area in the input image is the target area, and the target area needs to be scaled. The terminal application responds to the user operation to obtain the image size, the coordinate parameter, the corresponding zoom magnification and the like corresponding to the target area; or obtaining the image size, the coordinate parameter and the zoomed target image size corresponding to the target area, and then calculating the zooming magnification according to the ratio of the zoomed target image size to the image size corresponding to the target area.
In one possible embodiment, the target area and the zoom factor may be determined in a non-visual manner by a terminal application on the terminal device. Setting the image size, coordinate parameters, corresponding scaling factor and the like of the target area through functions such as setting of terminal application; or setting the image size, the coordinate parameters, the scaled target image size and the like of the target area, and then calculating the scaling factor according to the ratio of the scaled target image size to the image size corresponding to the target area.
Alternatively, the terminal application may send a zoom instruction to an image processor, which receives the zoom instruction. Wherein the zoom instruction carries the image size and coordinate parameters of the target area; and the terminal equipment cuts the input image according to the image size and the coordinate parameters of the target area to obtain the target area of the input image. The scaling processing of the input image described in the embodiments of the present application may be understood as scaling processing of the target region of the input image.
S202: the terminal device determines a zoom parameter for performing zoom processing on the input image according to the zoom magnification and the zoom capability of the image processor.
Wherein the zooming capability of the image processor represents the maximum zoom factor by which the image processor zooms the image; the scaling parameter includes a scaling number indicating the number of times the input image is subjected to scaling processing. The method of determining the number of zooms is not limited, and includes but is not limited to the following several possible embodiments.
In one possible implementation, if the ratio of the zoom magnification to the zoom capability of the image processor is an integer, determining the zoom times included in the zoom parameter to be N/M times; wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer. For example, if the user wants to magnify the input image by 8 times, the zoom magnification is 8 times. Assuming that the zoom capability M of the image processor is 4 times, it can be determined that the number of times of zooming is 2 times.
In one possible implementation, if the ratio of the zoom magnification to the zoom capability of the image processor is not an integer, determining the zoom times included in the zoom parameter to be N/M +1 times; wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer. For example, if the user wants to magnify the input image by 11 times, the zoom magnification is 11 times. Assuming that the zoom capability M of the image processor is 4 times, it can be determined that the number of times of zooming is 3 times.
Optionally, the zoom magnification is compared to the zoom capability of the image processor. And if the zooming magnification is smaller than the zooming capability of the image processor, determining the zooming times to be 1 time. For example, if the user wants to magnify the input image by 3 times, the zoom magnification is 3 times. Assuming that the zoom capability M of the image processor is 4 times, the number of times of zooming may be determined to be 1 time.
S203: and the terminal equipment circularly performs zooming processing on the input image through the image processor according to the zooming times included in the zooming parameters to obtain a display image.
The zooming processing of the input image circulation by the image processor can break through the self-capability limitation of the image processor in the terminal equipment, fully utilize the maximum processing capability of the image processor, realize the function of stepless zooming and present the effect similar to a telephoto lens. The specific implementation of the scaling process performed on the input image loop by the image processor is not limited, and includes but is not limited to the following several possible implementations.
In one possible implementation mode, the terminal device performs parameter configuration on the image processor according to the zooming times. The terminal equipment inputs the input image into the configured image processor to carry out zooming processing so as to obtain an output image after primary processing; if the image size of the output image after the first processing is smaller than the target image size of the display image, inputting the output image into an image processor for circularly zooming to obtain the display image; and if the image size of the output image after the first processing is larger than or equal to the target image size of the display image, stopping the circular scaling processing, and taking the output image after the first processing as the display image. The display image is used for representing an image of which the size of the image after the zooming processing reaches the target image size, and can be displayed on a user interface of the terminal equipment.
In one possible implementation mode, the terminal equipment performs parameter configuration on the image processor according to the zooming times; then the terminal equipment inputs the input image into the configured image processor to circularly zoom times and zoom, and a processed initial zoomed image is obtained; and if the image size of the initial zoomed image is larger than or equal to the target image size of the display image, stopping the circular zooming processing and determining the initial zoomed image as the display image. The display image is used for representing an image of which the size of the image after the zooming processing reaches the target image size, and can be displayed on a user interface of the terminal equipment.
Optionally, the specific implementation of configuring the parameters of the image processor according to the scaling times is not limited, and several implementations may be included.
In one possible implementation, if the scaling times are N/M times, the scaling module in the image processor is configured to scale by M times. Therefore, when the image processor circularly scales the input image, the input image is scaled by M times each time, and the display image can be obtained after the input image is scaled by N/M times. For example, if the user wants to zoom in the input image by 8 times, assuming that the zoom capability M of the image processor is 4 times, it may be determined that the number of times of zooming is 2 times. The zooming magnification of the zooming module in the image processor is configured to be 4 times, so that when the image processor performs cyclic zooming processing on the input image, the input image is zoomed by 4 times each time, and a display image can be obtained after 2 times of zooming processing.
In a possible implementation manner, if the zooming times is N/M +1 times, when the input image is zoomed in the previous N/M times, the zooming magnification of the zooming module in the image processor is configured to be M times; when the input image is zoomed for the (N/M + 1) th time, the zooming magnification of the zooming module in the image processor is configured to be X times, wherein X is the remainder of N/M. Therefore, when the image processor performs the scaling processing on the input image in a loop, the first N/M times are scaled by M times, and the N/M +1 th time is scaled by X times to obtain the display image. For example, if the user wants to enlarge the input image by 11 times, assuming that the zoom capability M of the image processor is 4 times, it may be determined that the number of times of zooming is 3 times. When the input image is subjected to the scaling processing in the first 2 times, the scaling magnification of the scaling module in the image processor is configured to be 4 times. When the input image is subjected to the zooming processing at the 3 rd time, the zooming magnification of the zooming module in the image processor is configured to be 3 times. Therefore, the image processor performs 3 times of scaling processing on the input image to obtain a display image.
Optionally, if the zoom magnification is smaller than the zoom capability of the image processor, the zoom frequency is 1 time, and the zoom magnification of the zoom module in the image processor is configured to be M times, where M is equal to the obtained zoom magnification. For example, if the user wants to magnify the input image by 3 times, the zoom magnification is 3 times. Assuming that the zoom capability M of the image processor is 4 times, the zoom magnification of the zoom module in the image processor is configured to be 3 times.
Optionally, the image processor may further include a color processing module, a brightness processing module, a noise reduction module, and the like. After the input image is scaled for the first time, other modules in the configured image processor except the scaling module and the receiving module are turned off, for example, processing modules such as color, brightness and noise are turned off, and when the input image is scaled in the later cycle, only the input image is scaled, and processing such as color, brightness and noise is not performed any more. In the process of circularly zooming the input image, the closing of other modules irrelevant to the zooming processing can protect the color, brightness, noise and the like of the input image from being processed excessively, and simultaneously, the computing resources of the terminal equipment are saved.
In order to better understand the embodiments of the present application, the embodiments of the present application are further illustrated by way of examples below. It is assumed that the image processor may include a receiving module and a scaling module, etc.
For example, please refer to fig. 4, fig. 4 is a schematic flowchart of a possible cyclic scaling process provided by the embodiment of the present application.
S41: and after receiving the zooming instruction and the input image, the receiving module carries out parameter configuration on the image processor. The parameter configuration comprises the steps of determining a scaling parameter for scaling the input image, and configuring a scaling module in the image processor according to the scaling parameter.
S42: the image processor crops the input image according to the coordinate parameters, the image size, and the like in the zoom instruction.
S43: the zooming module zooms the input image to obtain an output image after the first zooming.
S44: the image size of the processed output image is compared with the target image size of the display image.
S45: and if the image size of the output image after the first processing is smaller than the target image size of the display image, closing other modules except the zooming module and the receiving module in the image processor.
S46: inputting the output image after the first processing into an image processor which closes other modules for zooming processing; then, step S44 is executed.
S47: and if the image size of the processed output image is larger than or equal to the target image size of the display image, stopping the circular scaling process and taking the processed output image as the display image.
For example, please refer to fig. 5, fig. 5 is a flowchart illustrating a possible cyclic scaling process according to an embodiment of the present disclosure.
S51: and after receiving the zooming instruction and the input image, the receiving module carries out parameter configuration on the image processor. The parameter configuration comprises the steps of determining a scaling parameter for scaling the input image, and configuring a scaling module in the image processor according to the scaling parameter.
S52: the image processor crops the input image according to the coordinate parameters, the image size, and the like in the zoom instruction.
S53: the zooming module zooms the input image to obtain an output image after the first zooming.
S54: and after the first zooming processing, other modules except the zooming module and the receiving module in the image processor are closed.
S55: inputting the output image after the first processing into an image processor which closes other modules for cyclic zooming processing; after the scaling process is looped several times, step S56 is then executed.
S56: the image size of the processed output image is compared with the target image size of the display image.
S57: and if the image size of the processed output image is larger than or equal to the target image size of the display image, stopping the circular scaling process and taking the processed output image as the display image.
In the embodiment of the application, the terminal equipment acquires the scaling factor of an input image; determining a zooming parameter for zooming the input image according to the zooming magnification and the zooming capability of the image processor; further, circularly zooming the input image according to the zooming times included in the zooming parameters; and realizing the stepless zooming function of the image by circularly utilizing the zooming capability of the image processor. Therefore, by implementing the present application, the capability of digital zooming can be improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a digital zoom apparatus 60 according to an embodiment of the present application, where the digital zoom apparatus 60 may be mounted on a terminal device in the foregoing method embodiment. The digital zoom apparatus 60 shown in fig. 6 may be used to perform some or all of the functions in the method embodiment described above with respect to fig. 2. Wherein, the detailed description of each module is as follows:
a receiving module 601, configured to obtain a zoom ratio of an input image;
the receiving module 601 is further configured to determine a scaling parameter for performing scaling processing on the input image according to the scaling factor and the scaling capability of the image processor;
and a scaling module 602, configured to perform scaling processing on the input image cyclically through the image processor according to the scaling times included in the scaling parameters to obtain a display image.
In an embodiment, the receiving module 601, when configured to perform scaling processing on the input image loop through the image processor according to the scaling times included in the scaling parameter to obtain the display image, is specifically configured to:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor for zooming to obtain an output image after first processing;
if the image size of the output image after the first processing is smaller than the target image size of the display image, inputting the output image into an image processor for circularly zooming to obtain the display image;
and if the image size of the output image after the first processing is larger than or equal to the target image size of the display image, stopping the circular scaling processing, and taking the output image after the first processing as the display image.
In an embodiment, the scaling module 602, when configured to perform scaling processing on the input image loop through the image processor according to the scaling times included in the scaling parameters to obtain the display image, is specifically configured to:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor to circularly zoom times to obtain a processed initial zoomed image;
and if the image size of the initial zoomed image is larger than or equal to the target image size of the display image, stopping the circular zooming processing and determining the initial zoomed image as the display image.
In one embodiment, the scaling module 602 determines a scaling parameter for scaling the input image according to the scaling factor and the scaling capability of the image processor, and includes:
if the ratio of the zooming magnification to the zooming capability of the image processor is an integer, determining the zooming times included in the zooming parameters to be N/M times;
if the ratio of the zooming magnification to the zooming capability of the image processor is not an integer, determining the zooming times included in the zooming parameters to be N/M +1 times;
wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer.
In an embodiment, if the scaling number is N/M, where N is a scaling factor, and M is a scaling capability of the image processor, the scaling module 602 is specifically configured to:
and configuring the zooming magnification of the zooming module in the image processor to be M times.
In an embodiment, if the scaling frequency is N/M +1, N is a scaling factor, and M is a scaling capability of the image processor, the scaling module 602 is specifically configured to:
when the input image is zoomed for the first N/M times, the zooming magnification of a zooming module in the image processor is configured to be M times;
when the input image is zoomed for the (N/M + 1) th time, the zooming magnification of the zooming module in the image processor is configured to be X times, wherein X is the remainder of N/M.
In an embodiment, the scaling module 602 is further configured to:
and after the input image is zoomed for the first time, other modules except the zooming module and the receiving module in the configured image processor are closed.
According to an embodiment of the present application, some steps involved in the digital zooming method shown in fig. 2 may be performed by various modules in the digital zooming apparatus shown in fig. 6. For example, step S201 shown in fig. 2 may be performed by the receiving module 601 shown in fig. 6, and step S203 may be performed by the scaling module 602 shown in fig. 6. The modules in the digital zoom apparatus shown in fig. 6 may be respectively or entirely combined into one or several other modules to form one or several other modules, or some module(s) may be further split into multiple functionally smaller modules to form one or several other modules, which may achieve the same operation without affecting the achievement of the technical effect of the embodiments of the present application. The modules are divided based on logic functions, and in practical application, the functions of one module can be realized by a plurality of modules, or the functions of a plurality of modules can be realized by one module. In other embodiments of the present application, the digital zoom apparatus may also include other modules, and in practical applications, these functions may also be implemented by the assistance of other modules, and may be implemented by cooperation of a plurality of modules.
According to another embodiment of the present application, the digital zoom apparatus as shown in fig. 6 may be constructed by running a computer program (including program codes) capable of executing the steps involved in the corresponding method as shown in fig. 2 on a general-purpose computing apparatus such as a computer including a Central Processing Unit (CPU), a random access storage medium (RAM), a read-only storage medium (ROM), and the like as well as a storage element, and the digital zoom method of the embodiment of the present application may be implemented. The computer program may be embodied on a computer-readable storage medium, for example, and loaded and executed in the above-described computing apparatus via the computer-readable storage medium.
Based on the same inventive concept, the principle and the advantageous effect of the digital zoom apparatus provided in the embodiment of the present application for solving the problem are similar to those of the digital zoom method in the embodiment of the present application for solving the problem, and for brevity, the principle and the advantageous effect of the implementation of the method can be referred to, and are not described herein again.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application, where the terminal device may be a terminal device in a method embodiment. The terminal device comprises at least a processor 701, a communication interface 702 and a memory 703. The processor 701, the communication interface 702, and the memory 703 may be connected by a bus or in other manners, and in this embodiment of the application, the connection by the bus is taken as an example. The processor 701 (or Central Processing Unit (CPU)) is a computing core and a control core of the device, and can analyze various instructions in the device and various data of the Processing device, for example: the CPU can be used for analyzing a power-on and power-off instruction sent to the equipment by a user and controlling the equipment to carry out power-on and power-off operation; the following steps are repeated: the CPU may transmit various types of interactive data between the internal structures of the device, and so on. The communication interface 702 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI, mobile communication interface, etc.), and may be controlled by the processor 701 to transmit and receive data; the communication interface 702 may also be used for the transmission and interaction of data internal to the device. A Memory 703(Memory) is a Memory device in the device for storing programs and data. It is understood that the memory 703 herein may comprise both the built-in memory of the device and, of course, the expansion memory supported by the device. The memory 703 provides storage space that stores the operating system of the device, which may include, but is not limited to: android system, iOS system, Windows Phone system, etc., which are not limited in this application.
In the embodiment of the present application, the processor 701 executes the executable program code in the memory 703 to perform the following operations:
acquiring the zoom ratio of an input image;
determining a zooming parameter for zooming the input image according to the zooming magnification and the zooming capability of the image processor;
and according to the zooming times included in the zooming parameters, circularly zooming the input image by the image processor to obtain a display image.
As an alternative embodiment, the processor 701 executes the executable program code in the memory 703 to perform the following operations:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor for zooming to obtain an output image after first processing;
if the image size of the output image after the first processing is smaller than the target image size of the display image, inputting the output image into an image processor for circularly zooming to obtain the display image;
and if the image size of the output image after the first processing is larger than or equal to the target image size of the display image, stopping the circular scaling processing, and taking the output image after the first processing as the display image.
As an alternative embodiment, the processor 701 executes the executable program code in the memory 703 to perform the following operations:
carrying out parameter configuration on the image processor according to the zooming times;
inputting an input image into a configured image processor to circularly zoom times to obtain a processed initial zoomed image;
and if the image size of the initial zoomed image is larger than or equal to the target image size of the display image, stopping the circular zooming processing and determining the initial zoomed image as the display image.
As an alternative embodiment, the processor 701 executes the executable program code in the memory 703 to perform the following operations:
if the ratio of the zooming magnification to the zooming capability of the image processor is an integer, determining the zooming times included in the zooming parameters to be N/M times;
if the ratio of the zooming magnification to the zooming capability of the image processor is not an integer, determining the zooming times included in the zooming parameters to be N/M +1 times;
wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer.
As an alternative embodiment, if the scaling times is N/M times, where N is the scaling power, and M is the scaling capability of the image processor, the processor 701 executes the following operations by executing the executable program code in the memory 703:
and configuring the zooming magnification of the zooming module in the image processor to be M times.
As an alternative embodiment, if the scaling times is N/M +1, N is the scaling power, and M is the scaling capability of the image processor, the processor 701 executes the following operations by executing the executable program code in the memory 703:
when the input image is zoomed for the first N/M times, the zooming magnification of a zooming module in the image processor is configured to be M times;
when the input image is zoomed for the (N/M + 1) th time, the zooming magnification of the zooming module in the image processor is configured to be X times, wherein X is the remainder of N/M.
As an alternative embodiment, the processor 701 executes the executable program code in the memory 703 to perform the following operations:
and after the input image is zoomed for the first time, other modules except the zooming module and the receiving module in the configured image processor are closed.
Based on the same inventive concept, the principle and the advantageous effect of the terminal device to solve the problem provided in the embodiment of the present application are similar to the principle and the advantageous effect of the digital zoom method to solve the problem in the embodiment of the present application, and for brevity, the principle and the advantageous effect of the implementation of the method may be referred to, and are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where one or more instructions are stored in the computer-readable storage medium, and the one or more instructions are adapted to be loaded by a processor and to execute the digital zooming method according to the foregoing method embodiments.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the digital zooming method described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device can be merged, divided and deleted according to actual needs.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, which may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A digital zoom method applied to a terminal device having an image processor for performing zoom processing on an image, the method comprising:
acquiring the zoom ratio of an input image;
determining a scaling parameter for scaling the input image according to the scaling factor and the scaling capability of the image processor;
according to the zooming times included in the zooming parameters, circularly zooming the input image through the image processor to obtain a display image;
wherein the determining a zoom parameter for zooming the input image according to the zoom magnification and the zoom capability of the image processor comprises:
and determining the scaling times included in the scaling parameters according to whether the ratio of the scaling magnification to the scaling capability of the image processor is an integer.
2. The method of claim 1, wherein scaling the input image loop by the image processor to obtain the display image according to the number of scales included in the scaling parameter comprises:
performing parameter configuration on the image processor according to the zooming times;
inputting the input image into the configured image processor for zooming processing to obtain an output image after first processing;
if the image size of the output image after the first processing is smaller than the target image size of the display image, inputting the output image into the image processor for circularly zooming to obtain the display image;
and if the image size of the output image after the first processing is larger than or equal to the target image size of the display image, stopping the cyclic zooming processing, and taking the output image after the first processing as the display image.
3. The method of claim 1, wherein scaling the input image loop by the image processor to obtain the display image according to the number of scales included in the scaling parameter comprises:
performing parameter configuration on the image processor according to the zooming times;
inputting the input image into the configured image processor to perform zooming processing of the zooming times in a circulating manner to obtain a processed initial zoomed image;
and if the image size of the initial zooming image is larger than or equal to the target image size of the display image, stopping the circular zooming processing, and determining the initial zooming image as the display image.
4. The method of claim 1, wherein said determining the number of zooms included in the zoom parameter based on whether a ratio of the zoom magnification to the zoom capability of the image processor is an integer comprises:
if the ratio of the scaling magnification to the scaling capability of the image processor is an integer, determining the scaling times included in the scaling parameters to be N/M times;
if the ratio of the scaling factor to the scaling capability of the image processor is not an integer, determining that the scaling times included in the scaling parameters are N/M +1 times;
wherein, N is the zoom magnification, M is the zoom capability of the image processor, and N/M is an integer.
5. The method as claimed in any one of claims 2 or 3, wherein if the number of times of zooming is N/M, where N is the zoom factor and M is the zoom capability of the image processor, the performing parameter configuration on the image processor according to the number of times of zooming comprises:
and configuring the zooming magnification of a zooming module in the image processor to be M times.
6. The method as claimed in any one of claims 2 or 3, wherein if the scaling number is N/M +1, where N is the scaling factor and M is the scaling capability of the image processor, the performing parameter configuration on the image processor according to the scaling number comprises:
when the input image is zoomed for the first N/M times, the zooming magnification of a zooming module in the image processor is configured to be M times;
and when the input image is subjected to scaling processing at the N/M +1 th time, configuring the scaling factor of a scaling module in the image processor to be X times, wherein X is the remainder of N/M.
7. The method of any of claims 2 or 3, further comprising:
and after the input image is zoomed for the first time, other modules except the zooming module and the receiving module in the configured image processor are closed.
8. A digital zoom apparatus, comprising:
the receiving module is used for acquiring the zooming ratio of the input image;
the receiving module is further used for determining a scaling parameter for scaling the input image according to the scaling factor and the scaling capability of the image processor;
the zooming module is used for circularly zooming the input image through the image processor according to the zooming times included in the zooming parameters to obtain a display image;
wherein, when determining the scaling parameter for scaling the input image according to the scaling factor and the scaling capability of the image processor, the receiving module is specifically configured to: and determining the scaling times included in the scaling parameters according to whether the ratio of the scaling magnification to the scaling capability of the image processor is an integer.
9. A terminal device, characterized in that the device comprises:
a memory comprising computer readable instructions;
a processor coupled to the memory, the processor configured to execute the computer-readable instructions to cause the terminal device to perform the digital zoom method of any of claims 1-7.
10. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the digital zoom method of any of claims 1-7.
CN202010518721.7A 2020-06-09 2020-06-09 Digital zooming method, device, equipment and storage medium Active CN111654627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010518721.7A CN111654627B (en) 2020-06-09 2020-06-09 Digital zooming method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010518721.7A CN111654627B (en) 2020-06-09 2020-06-09 Digital zooming method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111654627A CN111654627A (en) 2020-09-11
CN111654627B true CN111654627B (en) 2021-11-26

Family

ID=72351368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010518721.7A Active CN111654627B (en) 2020-06-09 2020-06-09 Digital zooming method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111654627B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465954A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Method and device for zooming image
CN103137008A (en) * 2011-11-30 2013-06-05 上海博泰悦臻电子设备制造有限公司 Display method and device for map and vehicle-mounted system
CN105260986A (en) * 2015-10-13 2016-01-20 武汉大学 Anti-fuzzy image amplification method
CN106548452A (en) * 2016-11-25 2017-03-29 阿依瓦(北京)技术有限公司 A kind of image-enhancing equipment and method
CN108710525A (en) * 2018-05-18 2018-10-26 腾讯科技(深圳)有限公司 Map methods of exhibiting, device, equipment and storage medium in virtual scene
CN110363709A (en) * 2019-07-23 2019-10-22 腾讯科技(深圳)有限公司 A kind of image processing method, image presentation method, model training method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6548437B2 (en) * 2015-04-06 2019-07-24 キヤノン株式会社 Focusing apparatus, control method therefor, control program, and imaging apparatus

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101465954A (en) * 2009-01-08 2009-06-24 杭州华三通信技术有限公司 Method and device for zooming image
CN103137008A (en) * 2011-11-30 2013-06-05 上海博泰悦臻电子设备制造有限公司 Display method and device for map and vehicle-mounted system
CN105260986A (en) * 2015-10-13 2016-01-20 武汉大学 Anti-fuzzy image amplification method
CN106548452A (en) * 2016-11-25 2017-03-29 阿依瓦(北京)技术有限公司 A kind of image-enhancing equipment and method
CN108710525A (en) * 2018-05-18 2018-10-26 腾讯科技(深圳)有限公司 Map methods of exhibiting, device, equipment and storage medium in virtual scene
CN110363709A (en) * 2019-07-23 2019-10-22 腾讯科技(深圳)有限公司 A kind of image processing method, image presentation method, model training method and device

Also Published As

Publication number Publication date
CN111654627A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
KR102079091B1 (en) Terminal and image processing method thereof
KR20210015951A (en) Image processing method and apparatus, electronic device, and storage medium
KR102126300B1 (en) Method and apparatus for generating an all-in-focus image
US9451173B2 (en) Electronic device and control method of the same
CN105874776B (en) Image processing apparatus and method
JP6924901B2 (en) Photography method and electronic equipment
CN104268040B (en) A kind of disk performance detection method and device
KR20220011207A (en) Image processing method and apparatus, electronic device and storage medium
US20170150026A1 (en) Determination of exposure time for an image frame
CN111523652B (en) Processor, data processing method thereof and image pickup device
CN112954212B (en) Video generation method, device and equipment
CN114096994A (en) Image alignment method and device, electronic equipment and storage medium
CN113411498A (en) Image shooting method, mobile terminal and storage medium
CN104967786A (en) Image selection method and device
KR20160149842A (en) Method for processing an image and electronic device thereof
WO2021185232A1 (en) Barcode identification method, and related device
CN111654627B (en) Digital zooming method, device, equipment and storage medium
CN110855957B (en) Image processing method and device, storage medium and electronic equipment
KR20130134546A (en) Method for create thumbnail images of videos and an electronic device thereof
US10838601B2 (en) Processing method and terminal
CN112714321A (en) Compressed video processing method, device, equipment and computer readable storage medium
KR20210049649A (en) Method, apparatus and electronic device for enhancing face image
US20220301278A1 (en) Image processing method and apparatus, storage medium, and electronic device
CN114429641A (en) Time sequence action detection method and device, storage medium and terminal
CN105469433B (en) Picture compression method and equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant