WO2020010964A1 - 变焦处理方法、装置、可读存储介质及移动终端 - Google Patents

变焦处理方法、装置、可读存储介质及移动终端 Download PDF

Info

Publication number
WO2020010964A1
WO2020010964A1 PCT/CN2019/089660 CN2019089660W WO2020010964A1 WO 2020010964 A1 WO2020010964 A1 WO 2020010964A1 CN 2019089660 W CN2019089660 W CN 2019089660W WO 2020010964 A1 WO2020010964 A1 WO 2020010964A1
Authority
WO
WIPO (PCT)
Prior art keywords
preview image
zoom
pixel matrix
original
image
Prior art date
Application number
PCT/CN2019/089660
Other languages
English (en)
French (fr)
Inventor
邱情
Original Assignee
奇酷互联网络科技(深圳)有限公司
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 奇酷互联网络科技(深圳)有限公司 filed Critical 奇酷互联网络科技(深圳)有限公司
Publication of WO2020010964A1 publication Critical patent/WO2020010964A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • 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

Definitions

  • the present invention relates to the field of photographing technology, and in particular, to a zoom processing method, device, readable storage medium, and mobile terminal.
  • a digital zoom function is provided when taking pictures, which meets the needs of users to zoom in on pictures.
  • the current digital zoom is to directly enlarge the center area of the preview image, so that the subject is zoomed in to achieve the purpose of zooming. After this image is enlarged, the picture quality is getting worse and worse, especially after the 4x zoom. Falling, details are lost, and noise particles are enlarged, affecting the user's photographing experience.
  • an embodiment of the present invention proposes a zoom processing method to solve the problem of image quality degradation caused by zooming.
  • An image of a preset size is captured from the second preview image as a preview image after zooming.
  • the zoom processing method when a user needs to perform zooming, the pixel matrix of the original preview image can be first increased according to the zoom factor, thereby obtaining a first preview image, and then the size of the first preview image is adjusted according to the zoom factor Zoom in to obtain a second preview image, and finally capture an image of a preset size from the second preview image as the zoomed preview image.
  • the number of pixels is increased first. Therefore, when the image is subsequently enlarged, It can effectively avoid the degradation of image quality, ensure higher image quality after zooming, and improve the user's photographing experience.
  • the present invention does not require too many algorithms, has a small amount of data processing, and takes a short time, so it is more practical Sex.
  • zoom processing method according to the foregoing embodiment of the present invention may also have the following additional technical features:
  • the step of increasing a pixel matrix of the original preview image to obtain a first preview image includes:
  • T is the zoom factor
  • P1 is a pixel matrix of the original preview image
  • P2 is the enlarged pixel matrix
  • the step of adjusting a pixel matrix of the original preview image according to the enlarged pixel matrix to obtain the first preview image includes:
  • the pixel matrix of the original preview image is adjusted to P2 to obtain the first preview image.
  • the step of adjusting the pixel matrix of the original preview image to P2 includes:
  • the step of adjusting a pixel matrix of the original preview image according to the enlarged pixel matrix to obtain the first preview image includes:
  • the pixel matrix of the original preview image is adjusted to be larger than P1 and smaller than P2 to obtain the first preview image.
  • the step of capturing an image of a preset size from the second preview image as the preview image after zooming includes:
  • An image of 1 / T size is captured from the second preview image as a zoomed preview image, where T is the zoom factor.
  • the captured 1 / T size image is located at a center position in the second preview image.
  • the method further includes:
  • Another embodiment of the present invention provides a zoom processing device to solve the problem of image quality degradation caused by zooming.
  • the device includes:
  • An obtaining module configured to obtain a zoom factor in the zoom instruction when a zoom instruction for a camera original preview image is received
  • a pixel increasing module configured to increase the pixels of the original preview image to obtain a first preview image
  • a size enlargement module configured to enlarge the size of the first preview image according to the zoom factor to obtain a second preview image
  • a cropping module is configured to crop an image of a preset size from the second preview image as a zoomed preview image.
  • the pixel increasing module can first increase the pixels of the original preview image according to the zoom factor, thereby obtaining a first preview image, and then the size enlarging module further changes the zoom factor according to the zoom factor.
  • the size of the first preview image is enlarged to obtain a second preview image, and the final interception module intercepts an image of a preset size from the second preview image as a zoomed preview image.
  • the zoom process pixels are added first, so When the image is subsequently enlarged, it can effectively avoid the degradation of the image quality, ensure the higher image quality after zooming, and improve the user's photographing experience.
  • the invention does not need too many algorithms, the data processing amount is small, and the consumption The time is short and therefore more practical.
  • Another embodiment of the present invention also provides a readable storage medium having stored thereon a computer program that implements the steps of the foregoing method when the program is executed by a processor.
  • Another embodiment of the present invention further provides a mobile terminal including a camera, a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the foregoing method when the program is executed.
  • FIG. 1 is a flowchart of a zoom processing method according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a zoom processing method according to a second embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a zoom processing apparatus according to a third embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a zoom processing apparatus according to a fourth embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present invention.
  • a zoom processing method provided by a first embodiment of the present invention includes:
  • the method provided in this embodiment is applied to a mobile terminal having a photographing function.
  • the mobile terminal may be a mobile terminal device such as a mobile phone or a tablet computer.
  • the mobile terminal may have a front camera and / or a rear camera.
  • this implementation In the example, the mobile terminal is described by taking a mobile phone with a rear camera as an example.
  • a preview image is generated in the mobile phone.
  • this embodiment is defined as the original preview image, and the user can issue a zoom instruction to the original preview image.
  • a zoom instruction may be issued by performing a gesture operation on a touch screen of a mobile phone or by operating a shortcut key on the mobile phone.
  • the zoom instruction generated when the user operates the mobile phone mainly refers to the zoom magnification, such as 2x zoom instruction, 4x Zoom command or 8x zoom command. Therefore, when the mobile phone receives a zoom instruction for the original preview image, it can obtain the zoom factor in the zoom instruction.
  • the pixel matrix of the original preview image is preset by the mobile phone. For example, if the pixel matrix of the original preview image is the default 1440 pixels * 1080 pixels, therefore, the pixel matrix of the original preview image needs to be increased in this step. That is, increasing the number of pixels. For example, the long and wide pixels in the pixel matrix of the original preview image are both doubled. Therefore, the enlarged pixel matrix is 2880 pixels * 2160 pixels, and the first preview image is obtained accordingly.
  • the pixel matrix of the first preview image may be 2880 pixels * 2160 pixels, or may be a value greater than 1440 pixels * 1080 pixels and less than 2880 pixels * 2160 pixels. Compared with the original preview image, the content and size of the first preview image are the same, but the number of pixels is increased, that is, the definition is higher.
  • increasing the pixel matrix of the original preview image can provide a magnification through the system default, such as 1.2x or 1.5x by default, or an interactive interface for users to choose settings How many times the pixel matrix of the original preview image is increased is not limited here, as long as the number of pixels of the first preview image is greater than the number of pixels of the original preview image.
  • the size of the first preview image needs to be enlarged according to the zoom factor obtained in step S101.
  • the zoom factor obtained in step S101 is 4 times zoom. Therefore, in this step, the The size is enlarged 4 times to obtain a second preview image, that is, the area of the second preview image is 4 times the area of the first preview image.
  • An image of a preset size is captured from the second preview image as a zoomed preview image.
  • an image of a preset size needs to be intercepted in the second preview image.
  • the preset size needs to be smaller than the size of the second preview image. For example, half of the size of the second preview image can be intercepted.
  • an image of a preset size can be captured from any position in the second preview image.
  • the image of the second preview image is located at the center position in the second preview image, which can provide users with more Excellent zoom effect.
  • the zoom processing method when a user needs to perform zooming, the pixel matrix of the original preview image can be first increased according to the zoom factor, thereby obtaining a first preview image, and then the size of the first preview image is adjusted according to the zoom factor. Zoom in to obtain a second preview image, and finally capture an image of a preset size from the second preview image as the zoomed preview image.
  • the number of pixels is increased first. Therefore, when the image is subsequently enlarged, It can effectively avoid the degradation of image quality, ensure higher image quality after zooming, and improve the user's photographing experience.
  • the present invention does not require too many algorithms, has a small amount of data processing, and takes a short time, so it is more practical Sex.
  • a zoom processing method includes:
  • the method provided in this embodiment starts the process only when a zoom instruction for the camera's original preview image is received.
  • T is the zoom factor
  • P1 is the pixel matrix of the original preview image
  • P2 is the enlarged pixel matrix, that is, the enlarged pixel matrix is T times the pixel matrix of the original preview image.
  • T 4 and P1 is 1440 pixels * 1080 pixels
  • P2 is 4 * (1440 * 1080)
  • P2 can be (4 * 1440 pixels) * 1080 pixels or 1440 pixels * (4 * 1080 pixels)
  • P2 can be specifically (2 * 1440 pixels) * (2 * 1080 pixels), that is, At the same time, double the long or wide pixels in the original preview image.
  • the pixel matrix of the original preview image is adjusted to be larger than P1 and smaller than P2 to obtain the first preview image.
  • the pixel matrix of the first preview image is larger than P1 and smaller than P2.
  • Both of the above methods can increase the pixel matrix of the original preview image, that is, increase the number of pixels, and ensure that the sharpness of the first preview image is higher than that of the original preview image.
  • S206 Capture an image of a preset size from the second preview image as a zoomed preview image.
  • step S204 the pixel matrix of the original preview image is adjusted to P2, and the pixel matrix of the first preview image is P2,
  • step S206 1 / T of the size of the second preview image is captured as the preview image after zooming, then the pixel matrix of the zoom preview image finally obtained is equal to the pixel matrix of the original preview image, for example, the The pixel matrix is 1440 pixels * 1080 pixels.
  • the pixel matrix of the preview image after zooming is still 1440 pixels * 1080 pixels. Therefore, after zooming, the pixel matrix of the image is not reduced, ensuring the image quality of the zoomed image.
  • the method provided by this embodiment can increase the pixel matrix of the original preview image according to the zoom factor generated when the user performs a zoom operation, and here Finally, the preview image obtained after zooming can provide users with a better zooming experience.
  • a zoom processing apparatus including:
  • An obtaining module 11 configured to obtain a zoom factor in the zoom instruction when a zoom instruction for a camera original preview image is received
  • a pixel increasing module 12 configured to increase a pixel matrix of the original preview image to obtain a first preview image
  • a size enlargement module 13 configured to enlarge the size of the first preview image according to the zoom factor to obtain a second preview image
  • the cropping module 14 is configured to crop an image of a preset size from the second preview image as a zoomed preview image.
  • the pixel increasing module can first increase the pixel matrix of the original preview image according to the zoom factor, thereby obtaining a first preview image, and then the size enlarging module according to the zoom factor
  • the size of the first preview image is enlarged to obtain a second preview image
  • the final interception module intercepts a preset size image from the second preview image as a zoomed preview image.
  • the number of pixels is increased first. Therefore, when the image is subsequently enlarged, the degradation of the image quality can be effectively avoided, a higher image quality can be ensured after the zooming, and the photographing experience of the user is improved.
  • the present invention does not require excessive algorithms and has a small amount of data processing. , Time-consuming, and therefore more practical.
  • a zoom processing apparatus including:
  • a judging module 21 configured to judge whether a zoom instruction for an original preview image of a camera is received when a photographing function of a mobile terminal is turned on;
  • An obtaining module 22 configured to obtain a zoom factor in the zoom instruction when a zoom instruction for a camera original preview image is received;
  • a pixel increasing module 23 configured to increase a pixel matrix of the original preview image according to the zoom factor to obtain an enlarged pixel matrix
  • a pixel adjustment module 24 configured to adjust a pixel matrix of the original preview image according to the enlarged pixel matrix to obtain the first preview image
  • a size enlargement module 25 configured to enlarge the size of the first preview image according to the zoom factor to obtain a second preview image
  • the cropping module 26 is configured to crop an image of a preset size from the second preview image as a zoomed preview image.
  • the pixel increasing module 23 specifically adopts the following formula:
  • T is the zoom factor
  • P1 is a pixel matrix of the original preview image
  • P2 is the enlarged pixel matrix
  • the pixel adjustment module 24 is configured to adjust the pixel matrix of the original preview image to P2 to obtain the first preview image. Specifically used to adjust the width and length pixel values m and n in the original preview image to with Make
  • the pixel adjustment module 24 is configured to adjust a pixel matrix of the original preview image to be larger than P1 and smaller than P2 to obtain the first preview image.
  • the intercepting module 26 is specifically configured to intercept an image of 1 / T size from the second preview image as a zoomed preview image, where T is the zoom factor.
  • the captured 1 / T size image may be located at a center position in the second preview image.
  • a fifth embodiment of the present invention provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the foregoing method embodiments are implemented.
  • a sixth embodiment of the present invention provides a mobile terminal.
  • the mobile terminal includes a memory and a processor.
  • the memory is configured to store a program that supports the processor to execute the zoom processing method provided by the foregoing embodiment.
  • the processor is configured to execute Program stored in memory.
  • the mobile terminal may further include a communication interface for communicating with other devices or a communication network.
  • the mobile terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), and a vehicle-mounted computer.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to a tenth embodiment of the present invention.
  • the mobile terminal includes a camera, a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, and a wireless fidelity (WiFi) module 1270. , Processor 1280, and power supply 1290.
  • RF radio frequency
  • the RF circuit 1210 can be used for receiving and sending signals during the process of transmitting and receiving information.
  • the downlink information of the base station is received and processed by the processor 1280; in addition, the uplink data of the design is transmitted to the base station.
  • the RF circuit 1210 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • the RF circuit 1210 can also communicate with a network and other devices through wireless communication.
  • the above wireless communication can use any communication standard or protocol, including, but not limited to, Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • E-mail Short Messaging Service
  • the memory 1220 can be used to store software programs and modules.
  • the processor 1280 executes various functional applications and data processing of the mobile terminal by running the software programs and modules stored in the memory 1220.
  • the memory 1220 may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, at least one application required by a function (such as a sound playback function, an image playback function, etc.), etc .; the storage data area may store data according to Data (such as audio data, phone book, etc.) created by the use of mobile phones.
  • the memory 1220 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 1230 may be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the mobile terminal.
  • the input unit 1230 may include a touch panel 1231 and other input devices 1232.
  • the touch panel 1231 also known as a touch screen, can collect user's touch operations on or near it (such as the user using a finger, stylus, etc. any suitable object or accessory on the touch panel 1231 or near the touch panel 1231 Operation), and drive the corresponding connection device according to a preset program.
  • the touch panel 1231 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into contact coordinates, and sends it To the processor 1280, and can receive the command sent by the processor 1280 and execute it.
  • various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel 1231.
  • the input unit 1230 may also include other input devices 1232.
  • the other input devices 1232 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, an operation lever, and the like.
  • the display unit 1240 may be used to display information input by the user or information provided to the user and various menus of the mobile terminal.
  • the display unit 1240 may include a display panel 1241.
  • the display panel 1241 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1231 may cover the display panel 1241. After the touch panel 1231 detects a touch operation on or near the touch panel 1231, the touch panel 1231 transmits the touch operation to the processor 1280 to determine the type of the touch event. The type provides corresponding visual output on the display panel 1241.
  • the touch panel 1231 and the display panel 1241 are implemented as two independent components to implement the input and input functions of the mobile phone, in some embodiments, the touch panel 1231 and the display panel 1241 can be integrated and Realize the input and output functions of mobile phones.
  • the mobile terminal may further include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1241 according to the brightness of the ambient light.
  • the audio circuit 1260, the speaker 1261, and the microphone 1262 can provide an audio interface between the user and the mobile terminal.
  • the audio circuit 1260 may transmit the received electrical data converted electrical signals to the speaker 1261, which is converted into a sound signal output by the speaker 1261; on the other hand, the microphone 1262 converts the collected sound signal into an electrical signal, and the audio circuit 1260 After receiving, it is converted into audio data, and then the audio data output processor 1280 is processed and then sent to, for example, another mobile terminal via the RF circuit 1210, or the audio data is output to the memory 1220 for further processing.
  • WiFi is a short-range wireless transmission technology.
  • the mobile terminal can provide users with wireless broadband Internet access through the WiFi module 1270.
  • FIG. 5 shows the WiFi module 1270, it can be understood that it does not belong to the necessary configuration of the mobile terminal, and can be omitted as needed without changing the essence of the invention.
  • the processor 1280 is a control center of the mobile terminal, and uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 1220, and calling data stored in the memory 1220, Perform various functions of the mobile terminal and process data to perform overall monitoring of the mobile terminal.
  • the processor 1280 may include one or more processing units; preferably, the processor 1280 may integrate an application processor, and the application processor mainly processes an operating system, a user interface, and an application program.
  • the processor 1280 may be integrated with a modem processor, or the modem processor may not be integrated into the processor 1280.
  • the mobile terminal also includes a power source 1290 (such as a battery) for supplying power to various components.
  • a power source 1290 such as a battery
  • the power source can be logically connected to the processor 1280 through the power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system.
  • the mobile terminal may further include a first camera, a Bluetooth module, and the like, and details are not described herein again.
  • the zoom processing method, device, readable storage medium, and mobile terminal provided in the embodiments of the present invention include a computer-readable storage medium that stores program code, and the program code includes instructions that can be used to execute the foregoing method embodiments.
  • the program code includes instructions that can be used to execute the foregoing method embodiments.
  • the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium.
  • the technical solution of the present invention is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in various embodiments of the present invention.
  • the foregoing storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

本发明公开了一种变焦处理方法、装置、可读存储介质及移动终端,所述变焦处理方法包括:当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;增大所述原始预览图像的像素矩阵,以获得第一预览图像;按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。本发明能够保证变焦后仍具有较高的画质,提升了用户的拍照体验,此外,本发明无需过多的算法,数据处理量小,耗时短,因此更具实用性。

Description

变焦处理方法、装置、可读存储介质及移动终端 【技术领域】
本发明涉及拍照技术领域,特别是涉及一种变焦处理方法、装置、可读存储介质及移动终端。
【背景技术】
随着移动通信技术的发展,移动终端,尤其是手机,越来越得到发展和普及。目前,摄像头已经成为大多移动终端的标准配置,随着摄像头性能的不断提升,移动终端中的拍照功能也越来越强大,为喜欢拍照的用户带来了便利。
现有技术中,拍照时都提供了数码变焦功能,满足用户拉近拍照物的需求。但目前的数码变焦都是直接放大预览图像的中心区域,从而拉近拍摄主体,达到变焦的目的,这种方案在图像放大之后,画质越来越差,尤其是变焦4倍之后画质剧烈下降,细节丢失,噪点颗粒放大,影响了用户的拍照体验。
【发明内容】
为此,本发明的一个实施例提出一种变焦处理方法,以解决变焦导致的画质降低的问题。
根据本发明一实施例的变焦处理方法,包括:
当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
增大所述原始预览图像的像素矩阵,以获得第一预览图像;
按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
根据本发明实施例的变焦处理方法,当用户需要进行变焦时,能够首先根据变焦倍数增大原始预览图像的像素矩阵,从而获得第一预览图像,然后再按照变焦倍数将第一预览图像的尺寸放大,从而获得第二预览图像,最后从第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像,由于在变焦处理中,首先增加了像素数量,因此,在后续放大图像时,能够有效避免画质的下降,保证了变焦后仍具有较高的画质,提升了用户的拍照体验,此外,本发明 无需过多的算法,数据处理量小,耗时短,因此更具实用性。
另外,根据本发明上述实施例的变焦处理方法,还可以具有如下附加的技术特征:
进一步地,在本发明的一个实施例中,所述增大所述原始预览图像的像素矩阵,以获得第一预览图像的步骤包括:
根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵;
根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像。
进一步地,在本发明的一个实施例中,所述根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵的步骤中,采用以下公式:
P2=T*P1;
其中,T为所述变焦倍数,P1为所述原始预览图像的像素矩阵,P2为所述增大后的像素矩阵。
进一步地,在本发明的一个实施例中,所述根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像的步骤包括:
将所述原始预览图像的像素矩阵调整为P2,以获得所述第一预览图像。
进一步地,在本发明的一个实施例中,所述将所述原始预览图像的像素矩阵调整为P2的步骤包括:
将所述原始预览图像中宽和长的像素值m和n,分别调整为
Figure PCTCN2019089660-appb-000001
Figure PCTCN2019089660-appb-000002
使
Figure PCTCN2019089660-appb-000003
进一步地,在本发明的一个实施例中,所述根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像的步骤包括:
将所述原始预览图像的像素矩阵调整为大于P1同时小于P2,以获得所述第一预览图像。
进一步地,在本发明的一个实施例中,在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像的步骤包括;
在所述第二预览图像中截取1/T尺寸的图像作为变焦后的预览图像,其中,T为所述变焦倍数。
进一步地,在本发明的一个实施例中,截取的所述1/T尺寸的图像位于所述第二预览图像中的中心位置。
进一步地,在本发明的一个实施例中,所述方法还包括:
当移动终端的拍照功能开启时,判断是否接收到针对相机原始预览图像的变焦指令;
若是,获取所述变焦指令中的变焦倍数。
本发明的另一个实施例提出一种变焦处理装置,以解决变焦导致的画质降低的问题,所述装置包括:
获取模块,用于当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
像素增大模块,用于增大所述原始预览图像的像素,以获得第一预览图像;
尺寸放大模块,用于按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
截取模块,用于在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
根据本发明实施例的变焦处理装置,当用户需要进行变焦时,像素增大模块能够首先根据变焦倍数增大原始预览图像的像素,从而获得第一预览图像,然后尺寸放大模块再按照变焦倍数将第一预览图像的尺寸放大,从而获得第二预览图像,最后截取模块从第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像,由于在变焦处理中,首先增加了像素,因此,在后续放大图像时,能够有效避免画质的下降,保证了变焦后仍具有较高的画质,提升了用户的拍照体验,此外,本发明无需过多的算法,数据处理量小,耗时短,因此更具实用性。
本发明的另一个实施例还提出一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述方法的步骤。
本发明的另一个实施例还提出一种移动终端,包括摄像头、存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法。
本发明的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实施例了解到。
【附图说明】
本发明实施例的上述和/或附加的方面和优点从结合下面附图对实施例的描 述中将变得明显和容易理解,其中:
图1是根据本发明第一实施例的变焦处理方法的流程图;
图2是根据本发明第二实施例的变焦处理方法的流程图;
图3是根据本发明第三实施例的变焦处理装置的结构示意图;
图4是根据本发明第四实施例的变焦处理装置的结构示意图;
图5是根据本发明第五实施例的移动终端的结构示意图。
【具体实施方式】
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
请参阅图1,本发明第一实施例提供的变焦处理方法,包括:
S101,当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
其中,本实施例提供的方法应用于具有拍照功能的移动终端中,移动终端可以是手机或平板电脑等移动终端设备,移动终端可以具有前置摄像头和/或后置摄像头,具体的,本实施例中,移动终端以具有后置摄像头的手机为例进行说明。当用户打开手机上后置摄像头的拍照功能时,手机中会产生预览图像,对于未经任何图像处理的预览图像,本实施例中定义为原始预览图像,用户可以向该原始预览图像发出变焦指令,具体可以通过在手机的触摸屏中进行手势操作或者操作手机上的快捷按键发出变焦指令。需要指出的是,由于用户对原始预览图像进行变焦操作时,主要是希望能够拉近被拍摄物,因此,用户操作手机时产生的变焦指令主要指放大变焦倍数,例如2倍变焦指令、4倍变焦指令或者8倍变焦指令等。因此,当手机接收到针对该原始预览图像的变焦指令时,就能够获取所述变焦指令中的变焦倍数。
S102,增大所述原始预览图像的像素矩阵,以获得第一预览图像;
其中,原始预览图像的像素矩阵是手机预先设置好的,举例来讲,若原始预览图像的像素矩阵为默认的1440像素*1080像素,因此,该步骤中,需要增大原始预览图像的像素矩阵,也即增多像素数量,例如,将原始预览图像的像 素矩阵中的长像素和宽像素都扩大2倍,因此,增大后像素矩阵为2880像素*2160像素,据此获得第一预览图像,该第一预览图像的像素矩阵可以是2880像素*2160像素,也可以是大于1440像素*1080像素、且小于2880像素*2160像素中的某个值。第一预览图像与原始预览图像相比,图像的内容和大小相同,只是像素数量增多了,也即清晰度更高了。
需要指出的,具体实施时,增大所述原始预览图像的像素矩阵可以通过系统默认提供一个增大倍数,例如默认增大1.2倍或1.5倍等,也可以提供一个交互界面,供用户选择设置将原始预览图像的像素矩阵增大多少倍,在此不做限制,只要保证第一预览图像的像素数量多余原始预览图像的像素数量即可。
S103,按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
其中,需要根据步骤S101中获取的变焦倍数对所述第一预览图像的尺寸进行放大,例如,步骤S101中获取的变焦倍数为4倍变焦,因此,该步骤中,就将第一预览图像的尺寸放大4倍,从而获得第二预览图像,即第二预览图像的面积是第一预览图像的面积的4倍。
S104,在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
其中,需要在第二预览图像中截取预设大小尺寸的图像,为了给用户提供变焦效果,预设大小尺寸需要小于第二预览图像的尺寸,例如,可以从第二预览图像中截取一半尺寸的图像,作为变焦后的预览图像。具体实施时,为了提供与步骤S101中获取的变焦倍数相匹配的变焦效果,本步骤中,优选的截取(1/T)S尺寸的图像作为变焦后的预览图像,其中,T为变焦倍数,S为第二预览图像的面积。举例来讲,若步骤S101中获取的变焦倍数为4倍,则在第二预览图像中截取(1/4)S尺寸的图像作为变焦后的预览图像,同理,若步骤S101中获取的变焦倍数为8倍,则在第二预览图像中截取(1/8)S尺寸的图像作为变焦后的预览图像。
其中,需要指出的是,可以从第二预览图像中的任意位置截取预设大小尺寸的图像,作为优选的,第二预览图像的图像位于第二预览图像中的中心位置,能够为用户提供更优的变焦效果。
根据本发明实施例的变焦处理方法,当用户需要进行变焦时,能够首先根据变焦倍数增大原始预览图像的像素矩阵,从而获得第一预览图像,然后再按 照变焦倍数将第一预览图像的尺寸放大,从而获得第二预览图像,最后从第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像,由于在变焦处理中,首先增加了像素数量,因此,在后续放大图像时,能够有效避免画质的下降,保证了变焦后仍具有较高的画质,提升了用户的拍照体验,此外,本发明无需过多的算法,数据处理量小,耗时短,因此更具实用性。
请参阅图2,本发明第二实施例提出的变焦处理方法,所述方法包括:
S201,当移动终端的拍照功能开启时,判断是否接收到针对相机原始预览图像的变焦指令;
S202,若是,获取所述变焦指令中的变焦倍数;
其中,只有接收到针对相机原始预览图像的变焦指令时,本实施例提供的方法才开始流程。
S203,根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵;
本实施例中,根据所述变焦倍数增大所述原始预览图像的像素矩阵具体采用以下公式计算:
P2=T*P1;
其中,T为所述变焦倍数,P1为所述原始预览图像的像素矩阵,P2为所述增大后的像素矩阵,也即增大后的像素矩阵是原始预览图像的像素矩阵的T倍。举例来讲,变焦倍数T=4,P1为1440像素*1080像素,则P2为4*(1440*1080),其中,P2可以为(4*1440像素)*1080像素或者,1440像素*(4*1080像素),也即只对原始预览图像中的长像素或者宽像素增大,当然为了保证图像整体的效果,P2具体可以为(2*1440像素)*(2*1080像素),也即同时将原始预览图像中的长像素或者宽像素增大两倍。
S204,根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像;
其中,具体可以采用两种方式进行:
第一种,将所述原始预览图像的像素矩阵调整为P2,以获得所述第一预览图像;
具体的,可以将所述原始预览图像中宽和长的像素值m和n,分别调整为
Figure PCTCN2019089660-appb-000004
Figure PCTCN2019089660-appb-000005
从而使
Figure PCTCN2019089660-appb-000006
也即第一预览图像的像素矩阵为P2=T*P1。
第二种,将所述原始预览图像的像素矩阵调整为大于P1同时小于P2,以获 得所述第一预览图像。
其中,即第一预览图像的像素矩阵大于P1同时小于P2。
以上两种方式都能够增大原始预览图像的像素矩阵,即增多像素数量,保证第一预览图像的清晰度高于原始预览图像的清晰度。
S205,按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
S206,在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
其中,若步骤S204中,采用的是第一种方式,将原始预览图像的像素矩阵调整为P2,使第一预览图像的像素矩阵为P2,
Figure PCTCN2019089660-appb-000007
且步骤S206中,截取第二预览图像的尺寸的1/T作为变焦后的预览图像,则,最终获得变焦后的预览图像的像素矩阵就等于原始预览图像的像素矩阵,例如,原始预览图像的像素矩阵为1440像素*1080像素,变焦后的预览图像的像素矩阵仍为1440像素*1080像素,因此,在变焦后,图像的像素矩阵没有降低,保证了变焦后图像的画质。
本实施例提供的方法在第一实施例的基础上,除了具备第一实施例的效果外,能够根据用户进行变焦操作时产生的变焦倍数对原始预览图像的像素矩阵进行增大,并在此基础上最终获取变焦后的预览图像,能够给用户提供更佳的变焦体验。
需要说明是,本实施例重点说明的是与上一实施例的不同之处,各个实施例之间相同相似的部分未重复描述,可以相互参见。
请参阅图3,基于同一发明构思,本发明第三实施例提出一种变焦处理装置,包括:
获取模块11,用于当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
像素增大模块12,用于增大所述原始预览图像的像素矩阵,以获得第一预览图像;
尺寸放大模块13,用于按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
截取模块14,用于在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
根据本发明实施例的变焦处理装置,当用户需要进行变焦时,像素增大模块能够首先根据变焦倍数增大原始预览图像的像素矩阵,从而获得第一预览图像,然后尺寸放大模块再按照变焦倍数将第一预览图像的尺寸放大,从而获得第二预览图像,最后截取模块从第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像,由于在变焦处理中,首先增多了像素数量,因此,在后续放大图像时,能够有效避免画质的下降,保证了变焦后仍具有较高的画质,提升了用户的拍照体验,此外,本发明无需过多的算法,数据处理量小,耗时短,因此更具实用性。
本发明实施例提出的变焦处理装置的其他技术特征和技术效果与本发明第一实施例提出的方法相同,在此不予赘述。
请参阅图4,基于同一发明构思,本发明第四实施例提出一种变焦处理装置,包括:
判断模块21,用于当移动终端的拍照功能开启时,判断是否接收到针对相机原始预览图像的变焦指令;
获取模块22,用于当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
像素增大模块23,用于根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵;
像素调整模块24,用于根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像;
尺寸放大模块25,用于按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
截取模块26,用于在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
其中,所述像素增大模块23,具体采用以下公式:
用以下公式:
P2=T*P1;
其中,T为所述变焦倍数,P1为所述原始预览图像的像素矩阵,P2为所述增大后的像素矩阵。
其中,所述像素调整模块24用于将所述原始预览图像的像素矩阵调整为P2,以获得所述第一预览图像。具体用于将所述原始预览图像中宽和长的像素值m 和n,分别调整为
Figure PCTCN2019089660-appb-000008
Figure PCTCN2019089660-appb-000009
使
Figure PCTCN2019089660-appb-000010
或者,所述像素调整模块24用于将所述原始预览图像的像素矩阵调整为大于P1同时小于P2,以获得所述第一预览图像。
其中,所述截取模块26具体用于在所述第二预览图像中截取1/T尺寸的图像作为变焦后的预览图像,其中,T为所述变焦倍数。
其中,截取的所述1/T尺寸的图像可以位于所述第二预览图像中的中心位置。
本发明实施例提出的变焦处理装置的技术特征和技术效果与本发明第二实施例提出的方法相同,在此不予赘述。
本发明第五实施例提供了一种可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述各方法实施例的步骤。
本发明第六实施例提供了一种移动终端,该移动终端包括存储器以及处理器,存储器用于存储支持处理器执行前述实施例所提供的变焦处理方法的程序,处理器被配置为用于执行存储器中存储的程序。该移动终端还可以包括通信接口,用于与其他设备或通信网络通信。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、车载电脑等任意终端设备。
如图5所示的本发明第十实施例提供的移动终端的结构示意图。参考图5,该移动终端包括:摄像头、射频(Radio Frequency,RF)电路1210、存储器1220、输入单元1230、显示单元1240、传感器1250、音频电路1260、无线保真(Wireless Fidelity,WiFi)模块1270、处理器1280、以及电源1290等部件。本领域技术人员可以理解,图5中示出的移动终端结构并不构成对移动终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。下面结合图5对本实施例的移动终端的各个构成部件进行具体的介绍:
RF电路1210可用于收发信息过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器1280处理;另外,将设计上行的数据发送给基站。通常,RF电路1210包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路1210还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、 电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器1220可用于存储软件程序以及模块,处理器1280通过运行存储在存储器1220的软件程序以及模块,从而执行移动终端的各种功能应用以及数据处理。存储器1220可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器1220可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元1230可用于接收输入的数字或字符信息,以及产生与移动终端的用户设置以及功能控制有关的键信号输入。具体地,输入单元1230可包括触控面板1231以及其他输入设备1232。触控面板1231,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1231上或在触控面板1231附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1231可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器1280,并能接收处理器1280发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1231。除了触控面板1231,输入单元1230还可以包括其他输入设备1232。具体地,其他输入设备1232可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元1240可用于显示由用户输入的信息或提供给用户的信息以及移动终端的各种菜单。显示单元1240可包括显示面板1241,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1241。进一步的,触控面板1231可覆盖显示面板1241,当触控面板1231检测到在其上或附近的触摸操作后,传送给处理器1280以确定触摸事件的类型,随后处理器1280根据触摸事件的类型在显示面板1241上提供相应的视觉输出。虽然在图5中,触控面板1231与显示面板1241是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施 例中,可以将触控面板1231与显示面板1241集成而实现手机的输入和输出功能。
移动终端还可包括至少一种传感器1250,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板1241的亮度。音频电路1260、扬声器1261,传声器1262可提供用户与移动终端之间的音频接口。音频电路1260可将接收到的音频数据转换后的电信号,传输到扬声器1261,由扬声器1261转换为声音信号输出;另一方面,传声器1262将收集的声音信号转换为电信号,由音频电路1260接收后转换为音频数据,再将音频数据输出处理器1280处理后,经RF电路1210以发送给比如另一移动终端,或者将音频数据输出至存储器1220以便进一步处理。
WiFi属于短距离无线传输技术,移动终端通过WiFi模块1270可以为用户提供了无线的宽带互联网访问。虽然图5示出了WiFi模块1270,但是可以理解的是,其并不属于移动终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器1280是移动终端的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器1220内的软件程序和/或模块,以及调用存储在存储器1220内的数据,执行移动终端的各种功能和处理数据,从而对移动终端进行整体监控。可选的,处理器1280可包括一个或多个处理单元;优选的,处理器1280可集成应用处理器,应用处理器主要处理操作系统、用户界面和应用程序等。处理器1280可以集成调制解调处理器,调制解调处理器也可以不集成到处理器1280中。
移动终端还包括给各个部件供电的电源1290(比如电池),优选的,电源可以通过电源管理系统与处理器1280逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。尽管未示出,移动终端还可以包括第一摄像头、蓝牙模块等,在此不再赘述。
本发明实施例所提供的变焦处理方法、装置、可读存储介质及移动终端,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行前面方法实施例中所述的方法,具体实现可参见方法实施例,在此不再赘述。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时, 可以存储在一个计算机可读存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种变焦处理方法,其中,所述方法包括:
    当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
    增大所述原始预览图像的像素矩阵,以获得第一预览图像;
    按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
    在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
  2. 根据权利要求1所述的变焦处理方法,其中,所述增大所述原始预览图像的像素矩阵,以获得第一预览图像的步骤包括:
    根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵;
    根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像。
  3. 根据权利要求2所述的变焦处理方法,其中,所述根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵的步骤中,采用以下公式:
    P2=T*P1;
    其中,T为所述变焦倍数,P1为所述原始预览图像的像素矩阵,P2为所述增大后的像素矩阵。
  4. 根据权利要求3所述的变焦处理方法,其中,所述根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像的步骤包括:
    将所述原始预览图像的像素矩阵调整为P2,以获得所述第一预览图像。
  5. 根据权利要求4所述的变焦处理方法,其中,所述将所述原始预览图像的像素矩阵调整为P2的步骤包括:
    将所述原始预览图像中宽和长的像素值m和n,分别调整为
    Figure PCTCN2019089660-appb-100001
    Figure PCTCN2019089660-appb-100002
    使
    Figure PCTCN2019089660-appb-100003
  6. 根据权利要求3所述的变焦处理方法,其中,所述根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像的步骤包括:
    将所述原始预览图像的像素矩阵调整为大于P1同时小于P2,以获得所述第一预览图像。
  7. 根据权利要求1所述的变焦处理方法,其中,在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像的步骤包括;
    在所述第二预览图像中截取1/T尺寸的图像作为变焦后的预览图像,其中,T为所述变焦倍数。
  8. 根据权利要求7所述的变焦处理方法,其中,截取的所述1/T尺寸的图像位于所述第二预览图像中的中心位置。
  9. 根据权利要求1所述的变焦处理方法,其中,所述方法还包括:
    当移动终端的拍照功能开启时,判断是否接收到针对相机原始预览图像的变焦指令;
    若是,获取所述变焦指令中的变焦倍数。
  10. 一种变焦处理装置,其中,所述装置包括:
    获取模块,用于当接收到针对相机原始预览图像的变焦指令时,获取所述变焦指令中的变焦倍数;
    像素增大模块,用于增大所述原始预览图像的像素矩阵,以获得第一预览图像;
    尺寸放大模块,用于按照所述变焦倍数将所述第一预览图像的尺寸放大,以获得第二预览图像;
    截取模块,用于在所述第二预览图像中截取预设大小尺寸的图像作为变焦后的预览图像。
  11. 根据权利要求10所述的装置,其中,
    所述像素增大模块还用于根据所述变焦倍数增大所述原始预览图像的像素矩阵,以获得增大后的像素矩阵;
    所述装置还包括:像素调整模块,用于根据所述增大后的像素矩阵对所述原始预览图像的像素矩阵进行调整,以获得所述第一预览图像。
  12. 根据权利要求11所述的装置,其中,
    所述像素增大模块采用以下公式:
    P2=T*P1;
    其中,T为所述变焦倍数,P1为所述原始预览图像的像素矩阵,P2为所述增大后的像素矩阵。
  13. 根据权利要求12所述的装置,其中,
    所述像素调整模块用于将所述原始预览图像的像素矩阵调整为P2,以获得所述第一预览图像。
  14. 根据权利要求13所述的装置,其中,
    所述像素调整模块用于将所述原始预览图像中宽和长的像素值m和n,分别调整为
    Figure PCTCN2019089660-appb-100004
    Figure PCTCN2019089660-appb-100005
    使
    Figure PCTCN2019089660-appb-100006
  15. 根据权利要求12所述的装置,其中,
    所述像素调整模块用于将所述原始预览图像的像素矩阵调整为大于P1同时小于P2,以获得所述第一预览图像。
  16. 根据权利要求10所述的装置,其中,
    所述截取模块用于在所述第二预览图像中截取1/T尺寸的图像作为变焦后的预览图像,其中,T为所述变焦倍数。
  17. 根据权利要求16所述的装置,其中,截取的所述1/T尺寸的图像位于所述第二预览图像中的中心位置。
  18. 根据权利要求10所述的装置,其中,所述装置包括:
    判断模块,用于当移动终端的拍照功能开启时,判断是否接收到针对相机原始预览图像的变焦指令。
  19. 一种可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如权利要求1-9任意一项所述的方法。
  20. 一种移动终端,包括摄像头、存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述程序时实现如权利要求1至9任意一项所述的方法。
PCT/CN2019/089660 2018-07-09 2019-05-31 变焦处理方法、装置、可读存储介质及移动终端 WO2020010964A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810745843.2 2018-07-09
CN201810745843.2A CN109089036A (zh) 2018-07-09 2018-07-09 变焦处理方法、装置、可读存储介质及移动终端

Publications (1)

Publication Number Publication Date
WO2020010964A1 true WO2020010964A1 (zh) 2020-01-16

Family

ID=64837335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089660 WO2020010964A1 (zh) 2018-07-09 2019-05-31 变焦处理方法、装置、可读存储介质及移动终端

Country Status (2)

Country Link
CN (1) CN109089036A (zh)
WO (1) WO2020010964A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019738A (zh) * 2020-07-31 2020-12-01 广东小天才科技有限公司 一种拍照方法及终端设备

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109089036A (zh) * 2018-07-09 2018-12-25 奇酷互联网络科技(深圳)有限公司 变焦处理方法、装置、可读存储介质及移动终端
CN110855896A (zh) * 2019-12-13 2020-02-28 惠州Tcl移动通信有限公司 拍摄方法及装置、存储介质、终端设备
CN111131714A (zh) * 2019-12-31 2020-05-08 联想(北京)有限公司 图像采集控制方法、装置及电子设备
CN113132614B (zh) 2019-12-31 2023-09-01 中兴通讯股份有限公司 一种摄像头光学变焦电子装置、方法、单元及存储器
CN114095644B (zh) * 2020-08-24 2023-08-04 武汉Tcl集团工业研究院有限公司 一种图像校正的方法和计算机设备
CN115706850B (zh) * 2021-08-12 2024-04-05 荣耀终端有限公司 图像拍摄的方法、设备和存储介质
CN114554081A (zh) * 2022-01-17 2022-05-27 读书郎教育科技有限公司 一种智能手表实现相机预览放大的方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780828A (zh) * 2012-10-22 2014-05-07 联想(北京)有限公司 一种图像采集方法及电子设备
CN104702846A (zh) * 2015-03-20 2015-06-10 惠州Tcl移动通信有限公司 移动终端相机预览图像处理方法及系统
CN106657780A (zh) * 2016-12-16 2017-05-10 北京小米移动软件有限公司 图像预览方法和装置
CN106993131A (zh) * 2017-03-13 2017-07-28 联想(北京)有限公司 信息处理方法及电子设备
CN109089036A (zh) * 2018-07-09 2018-12-25 奇酷互联网络科技(深圳)有限公司 变焦处理方法、装置、可读存储介质及移动终端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101527037B1 (ko) * 2009-06-23 2015-06-16 엘지전자 주식회사 이동 단말기 및 그 제어방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103780828A (zh) * 2012-10-22 2014-05-07 联想(北京)有限公司 一种图像采集方法及电子设备
CN104702846A (zh) * 2015-03-20 2015-06-10 惠州Tcl移动通信有限公司 移动终端相机预览图像处理方法及系统
CN106657780A (zh) * 2016-12-16 2017-05-10 北京小米移动软件有限公司 图像预览方法和装置
CN106993131A (zh) * 2017-03-13 2017-07-28 联想(北京)有限公司 信息处理方法及电子设备
CN109089036A (zh) * 2018-07-09 2018-12-25 奇酷互联网络科技(深圳)有限公司 变焦处理方法、装置、可读存储介质及移动终端

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019738A (zh) * 2020-07-31 2020-12-01 广东小天才科技有限公司 一种拍照方法及终端设备

Also Published As

Publication number Publication date
CN109089036A (zh) 2018-12-25

Similar Documents

Publication Publication Date Title
WO2020010964A1 (zh) 变焦处理方法、装置、可读存储介质及移动终端
CN107093418B (zh) 一种屏幕显示方法、计算机设备及存储介质
US10810720B2 (en) Optical imaging method and apparatus
CN110784898B (zh) 网络切换方法、移动终端及计算机可读存储介质
CN112308806B (zh) 图像处理方法、装置、电子设备以及可读存储介质
US11843715B2 (en) Photographing method and terminal
WO2019129020A1 (zh) 一种摄像头自动调焦方法、存储设备及移动终端
EP3432588B1 (en) Method and system for processing image information
US20220408020A1 (en) Image Processing Method, Electronic Device, and Cloud Server
WO2018120955A1 (zh) 直播编码的方法、装置、终端、联动编码服务器及系统
WO2015100913A1 (zh) 图像缩略图的生成方法、装置和终端
WO2019129092A1 (zh) 一种降帧率拍照方法、移动终端及存储介质
CN112822538A (zh) 投屏显示方法、投屏方法、投屏设备、终端及存储介质
CN112000410B (zh) 一种投屏控制方法、设备及计算机可读存储介质
CN113132644B (zh) 一种高动态范围图像生成的方法、设备
WO2022267506A1 (zh) 图像融合方法、电子设备、存储介质及计算机程序产品
CN110278481B (zh) 画中画实现方法、终端及计算机可读存储介质
CN109739414B (zh) 一种图片处理方法、移动终端、计算机可读存储介质
CN109389394B (zh) 一种多屏支付控制方法、设备及计算机可读存储介质
CN112437472B (zh) 一种网络切换方法、设备及计算机可读存储介质
WO2021104162A1 (zh) 显示方法及电子设备
CN106454083B (zh) 一种移动终端的图像采集方法、装置及移动终端
CN109918015B (zh) 终端响应方法、终端及计算机可读存储介质
CN109684020B (zh) 一种主题切换方法、设备及计算机可读存储介质
CN110855896A (zh) 拍摄方法及装置、存储介质、终端设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19834525

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19834525

Country of ref document: EP

Kind code of ref document: A1