WO2019129020A1 - Automatic focusing method of camera, storage device and mobile terminal - Google Patents

Automatic focusing method of camera, storage device and mobile terminal Download PDF

Info

Publication number
WO2019129020A1
WO2019129020A1 PCT/CN2018/123725 CN2018123725W WO2019129020A1 WO 2019129020 A1 WO2019129020 A1 WO 2019129020A1 CN 2018123725 W CN2018123725 W CN 2018123725W WO 2019129020 A1 WO2019129020 A1 WO 2019129020A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
face
ratio
screen
preset value
Prior art date
Application number
PCT/CN2018/123725
Other languages
French (fr)
Chinese (zh)
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 WO2019129020A1 publication Critical patent/WO2019129020A1/en

Links

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/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • 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 mobile terminal technologies, and in particular, to a camera automatic focusing method, a storage device, and a mobile terminal.
  • the embodiment of the invention provides a camera automatic focusing method, a storage device and a mobile terminal, which can solve the problem that the existing mobile terminal cannot automatically adjust the focus when the person is photographing, so that the size of the captured person is suitable.
  • an embodiment of the present invention provides a camera automatic focusing method, which includes the steps of:
  • control the camera to focus to the proportion of the face on the screen as a preset value.
  • the camera auto-focusing method wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • the camera auto-focusing method wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value
  • the camera focal length is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  • the camera auto-focusing method after the step of calculating the ratio of the frame selection area to the screen area, further includes:
  • the camera automatic focusing method wherein the frame used for the frame selection is a rectangular frame.
  • the camera auto-focusing method wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • the control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
  • the camera auto-focusing method wherein the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame-selected area to the screen area is a preset value, including:
  • the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
  • the camera auto-focusing method wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
  • the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
  • an embodiment of the present invention provides a storage device, where a plurality of instructions are stored, where the instructions are suitable for being loaded by a processor and performing the following steps:
  • control the camera to focus to the proportion of the face on the screen as a preset value.
  • the storage device wherein the instructions are adapted to be loaded by a processor and executed specifically:
  • the face in the current picture is selected, and the ratio of the camera to the area of the screen to the screen area is preset.
  • the storage device wherein the instructions are adapted to be loaded by a processor and executed specifically:
  • the face of the current picture is framed, and the face in the current picture is selected, and the ratio of the frame selection area to the screen area is calculated;
  • controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value
  • the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  • the storage device wherein the instructions are adapted to be loaded by a processor and continue to execute:
  • the camera is controlled to maintain the current focal length.
  • an embodiment of the present invention provides a mobile terminal, where the mobile terminal includes:
  • a storage device having stored thereon a plurality of instructions adapted to be loaded by the processor and to perform the following steps:
  • control the camera to focus to the proportion of the face on the screen as a preset value.
  • the mobile terminal wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • the mobile terminal wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value
  • the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  • the mobile terminal after the step of calculating a ratio of a frame selection area to a screen area, further includes:
  • the camera is controlled to maintain the current focal length.
  • the mobile terminal wherein the frame used for the frame selection is a rectangular frame.
  • the mobile terminal wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
  • the control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
  • the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame selection area to the screen area is a preset value, including:
  • the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
  • the mobile terminal wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
  • the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
  • the camera automatically adjusts the focus method, when the camera is turned on, by acquiring the current picture in the camera whether there is a human face, if the face is face, the camera automatically controls the focus to the proportion of the face to the screen as a preset value, thereby controlling the person
  • the size of the face in the picture is fixed, so that the size of the captured person in the captured picture is appropriate and remains unchanged, so that no matter whether the character moves or not, the size of the character in the picture is not affected, thereby solving the prior art movement.
  • the terminal cannot automatically adjust the focus when shooting a character to make the size of the captured person suitable.
  • FIG. 1 is a schematic flow chart of a method for automatically focusing a camera according to the present invention.
  • FIG. 2 is a structural block diagram of a preferred embodiment of a mobile terminal provided by the present invention.
  • FIG. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
  • the present invention provides a camera automatic focusing method, a storage device, and a mobile terminal.
  • the present invention will be further described in detail below in order to make the objects, technical solutions and effects of the present invention more clear and clear. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
  • the invention provides a camera automatic focusing method, wherein, as shown in FIG. 1, the steps include:
  • the camera automatic focusing method is suitable for mobile terminals such as smart phones and tablet computers.
  • the camera auto-focusing method when the camera is turned on, it is detected whether a face exists in the current picture of the camera, and if a human face exists, the camera is automatically adjusted to adjust the focal length to control the distance between the lens and the object.
  • the proportion of the face in the screen is a preset value, so that the proportion of the face in the camera in the screen is always fixed, that is, the size of the captured person in the screen is kept constant, the user There is no need to manually adjust the focal length of the camera repeatedly, which can bring great convenience to the user.
  • the preset value is an empirical value. When the proportion of the face on the screen is the preset value, the size of the character is suitable, which can satisfy the better subject viewing and the overall proportion of the screen is coordinated.
  • step S1 whether the camera is turned on in real time is detected.
  • the face recognition technology can be used to determine whether the current picture in the camera exists. Thereby, the mobile terminal automatically enters the steps of face capture and size adjustment.
  • an auto focus function opening step can also be set.
  • Turning on the auto focus function means that the user is going to use the mobile terminal for person shooting and needs to ensure that the proportion of the captured face in the screen is a preset value, then the mobile terminal is only after the auto focus function is turned on. It is required to detect whether the camera is turned on and when detecting that the camera is turned on, determine whether there is a face in the current picture and adjust the focal length of the camera to achieve a predetermined shooting effect (ie, the face occupies the screen ratio to a preset value); and if the automatic adjustment If the focus function is not turned on, it means that the user needs to perform only regular shooting. Therefore, when the camera is turned on, there is no need to detect whether the current picture in the camera has a human face, but only conventional photography or imaging is required.
  • the step of controlling the camera to adjust the ratio of the face to the screen as a preset value includes:
  • the face pattern can be selected by using the regular pattern frame, and the camera can be adjusted to focus on the face selection.
  • the area of the regular pattern ie, the selected area of the frame
  • the regular pattern is displayed in a transparent line manner so as not to affect the user's shooting and real-time observation of the shooting effect.
  • the ratio of the pixel point in the frame selection area to the total pixel point of the screen is controlled to be a preset value, and the face is adjusted during the camera focusing process. As the size changes, the frame selection area also becomes larger or smaller.
  • the regular pattern is rectangular, the area calculation is convenient and the human face is relatively close.
  • the sides of the rectangle are tangent to the edge of the face.
  • the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
  • controlling a focal length of the camera to be reduced to a ratio of a frame selection area to a screen is a preset value
  • controlling the focal length of the camera to be enlarged to a ratio of the frame selection area to the screen is a preset value.
  • the focal length of the camera is reduced until the ratio of the frame selection area to the screen is a preset value; and if the calculated ratio is less than the preset value, it indicates that the current picture in the camera is in the current picture. If the face is too small and the camera is too far away from the character, the focal length of the camera is controlled until the ratio of the frame selection area to the screen is the preset value.
  • the camera when controlling the focus of the camera, the camera increases the focal length or reduces the focal length by a preset step value, and after the current focus adjustment, calculates whether the frame selection area accounts for the preset value of the screen ratio, and if so, ends. Focusing, otherwise continue to focus until the frame selection area is the preset value.
  • the present invention also provides a storage device having stored thereon a plurality of instructions, wherein the instructions are adapted to be loaded by a processor and perform the following steps:
  • control the camera to focus to the proportion of the face on the screen as a preset value.
  • the storage device wherein the instructions are adapted to be loaded by a processor and executed specifically:
  • the face in the current picture is selected, and the ratio of the camera to the area of the screen to the screen area is preset.
  • the storage device wherein the instructions are adapted to be loaded by a processor and executed specifically:
  • the face of the current picture is framed, and the face in the current picture is selected, and the ratio of the frame selection area to the screen area is calculated;
  • controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value
  • the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  • the storage device wherein the instructions are adapted to be loaded by a processor and continue to execute:
  • the present invention further provides a mobile terminal, as shown in FIG. 2, including:
  • the processor 100 is adapted to implement each instruction
  • the storage device 200 is adapted to store a plurality of instructions adapted to be loaded by the processor and to perform the camera autofocus method as described above.
  • FIG. 3 is a block diagram showing a specific structure of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal can be used to implement the camera auto-focusing method provided in the foregoing embodiment.
  • the mobile terminal 1200 can be a smartphone or a tablet.
  • the mobile terminal 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one shown) computer-readable storage medium, an input unit 130, and a display unit. 140, sensor 150, audio circuit 160, transmission module 170, including processor 180 having one or more processing cores (only one shown) and power supply 190 and the like.
  • RF Radio Frequency
  • FIG. 3 does not constitute a limitation of the mobile terminal 1200, and may include more or less components than those illustrated, or combine some components or different components. Arrangement. among them:
  • the RF circuit 110 is configured to receive and transmit electromagnetic waves, and realize mutual conversion between electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices.
  • the RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, a memory, and the like.
  • SIM Subscriber Identity Module
  • the RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices over a wireless network.
  • the wireless network described above may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the above wireless networks may use various communication standards, protocols and technologies, including but not limited to global mobile communication systems (Global System for Mobile Communication, GSM), Enhanced Mobile Communication Technology (Enhanced Data GSM Environment, EDGE), Wideband Code Division Multiple Access (Wideband Code) Division Multiple Access, WCDMA), Code Division Multiple Access (Code Division) Access, CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wireless Fidelity, Wi-Fi) (such as the Institute of Electrical and Electronics Engineers Standard IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n), VoIP (Voice) Over Internet Protocol, VoIP), Worldwide Interoperability for Microwave Access (Worldwide Interoperability for Microwave Access, Wi-Max, other protocols for mail, instant messaging, and short messages, as well as any other suitable communication protocol, may even include protocols that are not currently being developed.
  • GSM Global System for Mobile Communication
  • EDGE Enhanced Mobile Communication Technology
  • WCDMA Wideband Code Division Multiple Access
  • CDMA Code Division Multiple
  • the memory 120 can be used to store software programs and modules, such as program instructions/modules corresponding to the camera autofocus method in the above embodiment, and the processor 180 executes various functional applications by running software programs and modules stored in the memory 120. Data processing, that is, the function of automatic focusing of the camera.
  • Memory 120 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 120 can further include memory remotely located relative to processor 180, which can be connected to mobile terminal 1200 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
  • input unit 130 can include touch-sensitive surface 131 as well as other input devices 132.
  • Touch-sensitive surface 131 also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program.
  • the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 180 is provided and can receive commands from the processor 180 and execute them.
  • the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 130 can also include other input devices 132.
  • other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the mobile terminal 1200, which can be composed of graphics, text, icons, video, and any combination thereof.
  • the display unit 140 may include a display panel 141, and optionally, an LCD (Liquid may be used)
  • the display panel 141 is configured in the form of a Crystal Display (LCD) or an OLED (Organic Light-Emitting Diode).
  • touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141.
  • touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
  • Mobile terminal 1200 may also include at least one type of sensor 150, such as a light sensor, 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 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the mobile terminal 1200 moves to the ear. And / or backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile terminal 1200 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here No longer.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile terminal 1200.
  • the audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the mobile terminal 110 via the RF circuit 110, or outputted to the memory 120 for further processing.
  • the audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the mobile terminal 1200.
  • the mobile terminal 1200 can help the user to send and receive emails, browse web pages, access streaming media, etc. through the transmission module 170 (eg, Wi-Fi module), which provides wireless broadband Internet access to the user.
  • the transmission module 170 eg, Wi-Fi module
  • FIG. 3 shows the transmission module 170, it can be understood that it does not belong to the essential configuration of the mobile terminal 1200, and may be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 180 is a control center of the mobile terminal 1200 that connects various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120.
  • the various functions and processing data of the mobile terminal 1200 are executed to perform overall monitoring of the mobile phone.
  • the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and For applications, etc., the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the mobile terminal 1200 also includes a power source 190 (such as a battery) that powers the various components.
  • the power source can be logically coupled to the processor 180 through a power management system to manage charging, discharging, and power consumption through the power management system. Management and other functions.
  • Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
  • the mobile terminal 1200 may further include a camera (such as a front camera, a rear camera), a Bluetooth module, and the like, and details are not described herein.
  • the display unit of the mobile terminal is a touch screen display
  • the mobile terminal further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one
  • the above processor executes one or more programs that include instructions for performing the following operations:
  • control the camera to focus to the proportion of the face on the screen as a preset value.
  • the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
  • the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
  • controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value
  • the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  • the method further includes:
  • the camera is controlled to maintain the current focal length.
  • the frame used for the frame selection is a rectangular frame.
  • the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
  • the control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
  • the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame selection area to the screen area is a preset value, including:
  • the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
  • the method before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
  • the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
  • the present invention provides a camera auto-focusing method, a storage device, and a mobile terminal.
  • the camera automatically adjusts a focus method according to the present invention.
  • the camera When the camera is turned on, the current picture in the camera is obtained by a face. If there is a human face, the camera automatically controls the focal length to the proportion of the face to the screen as a preset value, thereby controlling the size of the face in the picture to be fixed, so that the size of the captured person in the captured picture is appropriate and remains unchanged. Therefore, no matter whether the character moves or not, the size of the character in the screen is not affected, thereby solving the problem that the mobile terminal in the prior art cannot automatically adjust the focus when shooting the character so that the size of the captured person is appropriate.

Abstract

Disclosed are an automatic focusing method of a camera, a storage device and a mobile terminal. The method comprises the steps of: when detecting that a camera is started, judging whether there is a human face in a current picture in the camera; and if there is a human face in the current picture, then controlling the camera to focus so that a proportion occupied by the human face in a screen is a pre-set value. The present invention solves the problem in the prior art that, when photographing a figure, a mobile terminal cannot automatically focus so the size of the photographed figure is appropriate.

Description

一种摄像头自动调焦方法、存储设备及移动终端Camera automatic focusing method, storage device and mobile terminal
本申请要求于2017年12月26日提交中国专利局、申请号为201711431427.7、发明名称为“一种摄像头自动调焦方法、存储设备及移动终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 26, 2017, the Chinese Patent Office, application number 201711431427.7, the invention titled "a camera automatic focusing method, storage device and mobile terminal", the entire content of which is The citations are incorporated herein by reference.
技术领域Technical field
本发明涉及移动终端技术领域,尤其涉及一种摄像头自动调焦方法、存储设备及移动终端。The present invention relates to the field of mobile terminal technologies, and in particular, to a camera automatic focusing method, a storage device, and a mobile terminal.
背景技术Background technique
随着智能手机的普及,利用智能手机拍照或摄像成为了人们日常生活中的习惯,无论是朋友见面还是亲子互动时刻,拿出智能手机随手一拍,留下一张照片或一段影像,记录美好的记忆。人们最常拿智能手机进行近景的人物拍摄,而在进行近景人物拍摄时,人物在整个画面中所占比例的大小对于形成的画面至关重要,比例太大或太小都不便于观看回忆,因而在进行人物拍摄时,往往需要根据镜头与被拍人物的距离远近,手动反复的调节摄像头的焦距来保持人物在画面中的所占的比例。当在被拍人物不断走动,如小孩在玩耍时的画面时,就得反复进行摄像头的缩放来拍摄期望的人物大小效果,这显然会给拍摄带来很大的不便。With the popularity of smart phones, taking photos or taking pictures with smartphones has become a habit in people's daily lives. Whether it is a friend meeting or a parent-child interaction moment, take out a smart phone and leave a photo or a video to record the beautiful. Memory. People often use smart phones to shoot close-up characters. When shooting close-up characters, the proportion of characters in the whole picture is very important for the formed picture. If the ratio is too big or too small, it is not convenient to watch the memories. Therefore, when performing character shooting, it is often necessary to manually adjust the focal length of the camera according to the distance between the lens and the person being photographed to maintain the proportion of the person in the screen. When the person being photographed keeps moving, such as when the child is playing, the camera has to be repeatedly zoomed to capture the desired character size effect, which obviously causes great inconvenience to the shooting.
因此,现有技术还有待于改进和发展。Therefore, the prior art has yet to be improved and developed.
技术问题technical problem
本发明实施例提供一种摄像头自动调焦方法、存储设备及移动终端,能够解决现有移动终端在进行人物拍摄时无法自动调焦使所拍摄到的人物大小合适的问题。The embodiment of the invention provides a camera automatic focusing method, a storage device and a mobile terminal, which can solve the problem that the existing mobile terminal cannot automatically adjust the focus when the person is photographing, so that the size of the captured person is suitable.
技术解决方案Technical solution
本发明的技术方案如下:The technical solution of the present invention is as follows:
第一方面,本发明实施例提供一种摄像头自动调焦方法,其中,包括步骤:In a first aspect, an embodiment of the present invention provides a camera automatic focusing method, which includes the steps of:
当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;Frame the face in the current picture and calculate the ratio of the frame selection area to the screen area;
当所述比例大于预设值值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
当所述比例小于预设值值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the camera focal length is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
所述的摄像头自动调焦方法,其中,所述计算框选面积占屏幕面积的比例的步骤之后,还包括:The camera auto-focusing method, after the step of calculating the ratio of the frame selection area to the screen area, further includes:
当所述比例等于预设值值时,则无需调整摄像头。When the ratio is equal to the preset value, there is no need to adjust the camera.
所述的摄像头自动调焦方法,其中,所述框选所用的框为矩形框。The camera automatic focusing method, wherein the frame used for the frame selection is a rectangular frame.
所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值。The control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
所述的摄像头自动调焦方法,其中,所述框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值的步骤,包括:The camera auto-focusing method, wherein the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame-selected area to the screen area is a preset value, including:
在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值。After the face of the current picture is selected in the frame, the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
所述的摄像头自动调焦方法,其中,在所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤之前,还包括:The camera auto-focusing method, wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
设置一自动调焦功能;Set an auto focus function;
当自动调焦功能开启后,执行所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤。After the auto focus function is turned on, the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
第二方面,本发明实施例提供一种存储设备,其上存储有多条指令,其中,所述指令适合由处理器加载并执行如下步骤:In a second aspect, an embodiment of the present invention provides a storage device, where a plurality of instructions are stored, where the instructions are suitable for being loaded by a processor and performing the following steps:
当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device, wherein the instructions are adapted to be loaded by a processor and executed specifically:
当前画面中有人脸,框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。In the current picture, there is a face, and the face in the current picture is selected, and the ratio of the camera to the area of the screen to the screen area is preset.
所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device, wherein the instructions are adapted to be loaded by a processor and executed specifically:
当前画面中有人脸,框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;The face of the current picture is framed, and the face in the current picture is selected, and the ratio of the frame selection area to the screen area is calculated;
当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
所述的存储设备,其中,所述指令适合由处理器加载并继续执行:The storage device, wherein the instructions are adapted to be loaded by a processor and continue to execute:
当所述比例等于预设值时,则控制摄像头保持当前焦距。When the ratio is equal to the preset value, the camera is controlled to maintain the current focal length.
第三方面,本发明实施例提供一种移动终端,其中,所述移动终端包括:In a third aspect, an embodiment of the present invention provides a mobile terminal, where the mobile terminal includes:
处理器,适于实现各指令;以及a processor adapted to implement each instruction;
存储设备,其上存储有多条指令,所述指令适合由处理器加载并执行如下步骤:A storage device having stored thereon a plurality of instructions adapted to be loaded by the processor and to perform the following steps:
当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;Frame the face in the current picture and calculate the ratio of the frame selection area to the screen area;
当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
所述的移动终端,其中,所述计算框选面积占屏幕面积的比例的步骤之后,还包括:The mobile terminal, after the step of calculating a ratio of a frame selection area to a screen area, further includes:
当所述比例等于预设值时,则控制摄像头保持当前焦距。When the ratio is equal to the preset value, the camera is controlled to maintain the current focal length.
所述的移动终端,其中,所述框选所用的框为矩形框。The mobile terminal, wherein the frame used for the frame selection is a rectangular frame.
所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值。The control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
所述的移动终端,其中,所述框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值的步骤,包括:In the mobile terminal, the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame selection area to the screen area is a preset value, including:
在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值。After the face of the current picture is selected in the frame, the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
所述的移动终端,其中,在所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤之前,还包括:The mobile terminal, wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
设置一自动调焦功能;Set an auto focus function;
当自动调焦功能开启后,执行所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤。After the auto focus function is turned on, the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
有益效果Beneficial effect
本发明提供的摄像头自动调焦方法,在摄像头开启时,通过获取摄像头中的当前画面是否有人脸,有人脸的话则控制摄像头自动调节焦距至人脸占屏幕的比例为预设值,从而控制人脸在画面中的大小固定,使得拍摄出的人物在所拍摄的画面中的大小合适且一直保持不变,这样无论人物是否移动,都不影响人物在画面中大小,从而解决了现有技术中移动终端在进行人物拍摄时无法自动调焦使所拍摄到的人物大小合适的问题。The camera automatically adjusts the focus method, when the camera is turned on, by acquiring the current picture in the camera whether there is a human face, if the face is face, the camera automatically controls the focus to the proportion of the face to the screen as a preset value, thereby controlling the person The size of the face in the picture is fixed, so that the size of the captured person in the captured picture is appropriate and remains unchanged, so that no matter whether the character moves or not, the size of the character in the picture is not affected, thereby solving the prior art movement. The terminal cannot automatically adjust the focus when shooting a character to make the size of the captured person suitable.
附图说明DRAWINGS
图1为本发明提供的摄像头自动调焦方法的流程示意图。FIG. 1 is a schematic flow chart of a method for automatically focusing a camera according to the present invention.
图2为本发明提供的移动终端的较佳实施例结构框图。2 is a structural block diagram of a preferred embodiment of a mobile terminal provided by the present invention.
图3是本发明实施例提供的移动终端的具体结构示意图。FIG. 3 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
本发明提供一种摄像头自动调焦方法、存储设备及移动终端,为使本发明的目的、技术方案及效果更加清楚、明确,以下对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention provides a camera automatic focusing method, a storage device, and a mobile terminal. The present invention will be further described in detail below in order to make the objects, technical solutions and effects of the present invention more clear and clear. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明提供一种摄像头自动调焦方法,其中,如图1所示,包括步骤:The invention provides a camera automatic focusing method, wherein, as shown in FIG. 1, the steps include:
S1、当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;S1, when detecting that the camera is turned on, determining whether the current picture in the camera has a human face;
S2、若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。S2. If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
本发明所述的摄像头自动调焦方法,适于智能手机、平板电脑等移动终端。所述的摄像头自动调焦方法中,在摄像头处于开启时,时刻检测摄像头的当前画面中是否有人脸存在,若有人脸存在,则控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值,从而使得摄像头中的人脸在屏幕中所占的比例始终固定,也即使得所拍摄到的人物在屏幕当中的大小保持一定,用户根本无需反复手动调节摄像头的焦距,能够给用户带来极大的便利。其中,所述预设值为一经验值,在人脸在屏幕中所占的比例为该预设值时,人物大小较合适,能够满足较好的拍摄对象查看且画面整体比例协调。The camera automatic focusing method according to the present invention is suitable for mobile terminals such as smart phones and tablet computers. In the camera auto-focusing method, when the camera is turned on, it is detected whether a face exists in the current picture of the camera, and if a human face exists, the camera is automatically adjusted to adjust the focal length to control the distance between the lens and the object. , the proportion of the face in the screen is a preset value, so that the proportion of the face in the camera in the screen is always fixed, that is, the size of the captured person in the screen is kept constant, the user There is no need to manually adjust the focal length of the camera repeatedly, which can bring great convenience to the user. The preset value is an empirical value. When the proportion of the face on the screen is the preset value, the size of the character is suitable, which can satisfy the better subject viewing and the overall proportion of the screen is coordinated.
较佳地,所述步骤S1中,实时检测摄像头是否开启,当摄像头开启时,无论此时是处于拍照模式或者摄像模式,均可以利用人脸识别技术判断摄像头中的当前画面是否有人脸存在,从而让移动终端自动进入人脸抓取及大小调节的步骤。Preferably, in the step S1, whether the camera is turned on in real time is detected. When the camera is turned on, whether the camera mode or the camera mode is used at this time, the face recognition technology can be used to determine whether the current picture in the camera exists. Thereby, the mobile terminal automatically enters the steps of face capture and size adjustment.
当然,在步骤S1之前,还可以设置一自动调焦功能开启步骤。开启所述自动调焦功能即表明用户将要使用移动终端进行人物拍摄且需要保证所拍摄的人脸在屏幕中所占的比例为预设值,则在该自动调焦功能开启后,移动终端才需要检测摄像头是否开启并在检测到摄像头开启时,判断当前画面中是否有人脸并调节摄像头的焦距以达到预定的拍摄效果(即人脸占屏幕比例达到预设值);而如果所述自动调焦功能未开启,则说明用户需要进行的只是常规拍摄,因而在摄像头开启时也就无需检测摄像头中的当前画面是否有人脸存在,而仅需进行常规的拍照或摄像即可。Of course, before the step S1, an auto focus function opening step can also be set. Turning on the auto focus function means that the user is going to use the mobile terminal for person shooting and needs to ensure that the proportion of the captured face in the screen is a preset value, then the mobile terminal is only after the auto focus function is turned on. It is required to detect whether the camera is turned on and when detecting that the camera is turned on, determine whether there is a face in the current picture and adjust the focal length of the camera to achieve a predetermined shooting effect (ie, the face occupies the screen ratio to a preset value); and if the automatic adjustment If the focus function is not turned on, it means that the user needs to perform only regular shooting. Therefore, when the camera is turned on, there is no need to detect whether the current picture in the camera has a human face, but only conventional photography or imaging is required.
所述步骤S2中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:In the step S2, the step of controlling the camera to adjust the ratio of the face to the screen as a preset value includes:
框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
因为考虑到人脸的不规则性,计算面积相对困难,可以在检测到当前画面中有人脸存在时,利用规则图案框选出该人脸,并调节摄像头调焦至为框选人脸而使用的规则图案的面积(即框选面积)占屏幕面积的比例至预设值,从而更加快速地实现调整拍摄对象在画面中的大小比例的目的。较佳地,所述规则图案以透明线条的方式显示,以不影响用户进行拍摄及实时观察拍摄效果。Because of the irregularity of the face, it is relatively difficult to calculate the area. When the presence of a human face in the current picture is detected, the face pattern can be selected by using the regular pattern frame, and the camera can be adjusted to focus on the face selection. The area of the regular pattern (ie, the selected area of the frame) occupies the ratio of the screen area to a preset value, thereby achieving the purpose of adjusting the size ratio of the subject in the picture more quickly. Preferably, the regular pattern is displayed in a transparent line manner so as not to affect the user's shooting and real-time observation of the shooting effect.
更佳地,在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值,在摄像头调焦过程中,人脸大小发生变化,框选区域也随之变大或缩小。More preferably, after the face in the current picture is selected in the frame, the ratio of the pixel point in the frame selection area to the total pixel point of the screen is controlled to be a preset value, and the face is adjusted during the camera focusing process. As the size changes, the frame selection area also becomes larger or smaller.
较佳地,所述规则图案为矩形,面积计算方便且能人脸较为接近。在框选时,矩形的四边均有人脸边缘相切。Preferably, the regular pattern is rectangular, the area calculation is convenient and the human face is relatively close. In the frame selection, the sides of the rectangle are tangent to the edge of the face.
具体地,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:Specifically, the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
S201、框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;S201, selecting a face in the current picture, and calculating a ratio of a frame selection area to a screen area;
S202、当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;S202. When the ratio is greater than a preset value, controlling a focal length of the camera to be reduced to a ratio of a frame selection area to a screen is a preset value;
S203、当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。S203. When the ratio is less than a preset value, controlling the focal length of the camera to be enlarged to a ratio of the frame selection area to the screen is a preset value.
在框选出人脸后,将框选区域的面积与整个屏幕的面积进行对比,计算框选区域的面积占整个屏幕的面积的比例,若计算得到比例大于预设值,则表明摄像头中的当前画面中人脸过大,摄像头离人物太近,则控制摄像头焦距缩小直至框选面积占屏幕的比例为预设值;而若计算得到比例小于预设值,则表明摄像头中的当前画面中人脸过小,摄像头离人物太远,则控制摄像头焦距直至框选面积占屏幕的比例为预设值。After selecting a face in the frame, compare the area of the frame selection area with the area of the entire screen, and calculate the ratio of the area of the frame selection area to the area of the entire screen. If the calculated ratio is greater than the preset value, it indicates that the camera is in the camera. If the face is too large in the current picture and the camera is too close to the character, the focal length of the camera is reduced until the ratio of the frame selection area to the screen is a preset value; and if the calculated ratio is less than the preset value, it indicates that the current picture in the camera is in the current picture. If the face is too small and the camera is too far away from the character, the focal length of the camera is controlled until the ratio of the frame selection area to the screen is the preset value.
较佳地,在控制摄像头调焦时,摄像头以预设步进值增大焦距或缩小焦距,并在当次调焦后,计算框选面积占屏幕比例是否为预设值,若时则结束调焦,否则继续调焦直至框选面积占屏幕比例是否为预设值。Preferably, when controlling the focus of the camera, the camera increases the focal length or reduces the focal length by a preset step value, and after the current focus adjustment, calculates whether the frame selection area accounts for the preset value of the screen ratio, and if so, ends. Focusing, otherwise continue to focus until the frame selection area is the preset value.
基于上述方法,本发明还一种存储设备,其上存储有多条指令,其中,所述指令适合由处理器加载并执行如下步骤:Based on the above method, the present invention also provides a storage device having stored thereon a plurality of instructions, wherein the instructions are adapted to be loaded by a processor and perform the following steps:
当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device, wherein the instructions are adapted to be loaded by a processor and executed specifically:
当前画面中有人脸,框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。In the current picture, there is a face, and the face in the current picture is selected, and the ratio of the camera to the area of the screen to the screen area is preset.
所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device, wherein the instructions are adapted to be loaded by a processor and executed specifically:
当前画面中有人脸,框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;The face of the current picture is framed, and the face in the current picture is selected, and the ratio of the frame selection area to the screen area is calculated;
当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
所述的存储设备,其中,所述指令适合由处理器加载并继续执行:The storage device, wherein the instructions are adapted to be loaded by a processor and continue to execute:
当所述比例等于预设值时,则无需调整摄像头。When the ratio is equal to the preset value, there is no need to adjust the camera.
基于上述方法,本发明还提供了一种移动终端,如图2所示,包括:Based on the foregoing method, the present invention further provides a mobile terminal, as shown in FIG. 2, including:
处理器100,适于实现各指令;以及The processor 100 is adapted to implement each instruction;
存储设备200,适于存储多条指令,所述指令适合由处理器加载并执行如上所述的摄像头自动调焦方法。The storage device 200 is adapted to store a plurality of instructions adapted to be loaded by the processor and to perform the camera autofocus method as described above.
关于上述移动终端和存储设备的技术细节和好处已在上述方法中进行了详细阐述,此处不再赘述。The technical details and benefits of the above mobile terminal and storage device have been elaborated in the above methods, and are not described herein again.
图3示出了本发明实施例提供的移动终端的具体结构框图,该移动终端可以用于实施上述实施例中提供的摄像头自动调焦方法。该移动终端1200可以为智能手机或平板电脑。FIG. 3 is a block diagram showing a specific structure of a mobile terminal according to an embodiment of the present invention. The mobile terminal can be used to implement the camera auto-focusing method provided in the foregoing embodiment. The mobile terminal 1200 can be a smartphone or a tablet.
如图3所示,移动终端1200可以包括RF(Radio Frequency,射频)电路110、包括有一个或一个以上(图中仅示出一个)计算机可读存储介质的存储器120、输入单元130、显示单元140、传感器150、音频电路160、传输模块170、包括有一个或者一个以上(图中仅示出一个)处理核心的处理器180以及电源190等部件。本领域技术人员可以理解,图3中示出的移动终端1200结构并不构成对移动终端1200的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:As shown in FIG. 3, the mobile terminal 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one shown) computer-readable storage medium, an input unit 130, and a display unit. 140, sensor 150, audio circuit 160, transmission module 170, including processor 180 having one or more processing cores (only one shown) and power supply 190 and the like. It will be understood by those skilled in the art that the structure of the mobile terminal 1200 shown in FIG. 3 does not constitute a limitation of the mobile terminal 1200, and may include more or less components than those illustrated, or combine some components or different components. Arrangement. among them:
RF电路110用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯。RF电路110可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。RF电路110可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的无线网络可以使用各种通信标准、协议及技术,包括但并不限于全球移动通信系统(Global System for Mobile Communication, GSM)、增强型移动通信技术(Enhanced Data GSM Environment, EDGE),宽带码分多址技术(Wideband Code Division Multiple Access, WCDMA),码分多址技术(Code Division Access, CDMA)、时分多址技术(Time Division Multiple Access, TDMA),无线保真技术(Wireless Fidelity, Wi-Fi)(如美国电气和电子工程师协会标准 IEEE 802.11a, IEEE 802.11b, IEEE802.11g 和/或 IEEE 802.11n)、网络电话(Voice over Internet Protocol, VoIP)、全球微波互联接入(Worldwide Interoperability for Microwave Access, Wi-Max)、其他用于邮件、即时通讯及短消息的协议,以及任何其他合适的通讯协议,甚至可包括那些当前仍未被开发出来的协议。The RF circuit 110 is configured to receive and transmit electromagnetic waves, and realize mutual conversion between electromagnetic waves and electrical signals, thereby communicating with a communication network or other devices. The RF circuit 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, a memory, and the like. The RF circuit 110 can communicate with various networks such as the Internet, an intranet, a wireless network, or communicate with other devices over a wireless network. The wireless network described above may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The above wireless networks may use various communication standards, protocols and technologies, including but not limited to global mobile communication systems (Global System for Mobile Communication, GSM), Enhanced Mobile Communication Technology (Enhanced Data GSM Environment, EDGE), Wideband Code Division Multiple Access (Wideband Code) Division Multiple Access, WCDMA), Code Division Multiple Access (Code Division) Access, CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wireless Fidelity, Wi-Fi) (such as the Institute of Electrical and Electronics Engineers Standard IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and / or IEEE 802.11n), VoIP (Voice) Over Internet Protocol, VoIP), Worldwide Interoperability for Microwave Access (Worldwide Interoperability for Microwave Access, Wi-Max, other protocols for mail, instant messaging, and short messages, as well as any other suitable communication protocol, may even include protocols that are not currently being developed.
存储器120可用于存储软件程序以及模块,如上述实施例中摄像头自动调焦方法对应的程序指令/模块,处理器180通过运行存储在存储器120内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现摄像头自动调焦的功能。存储器120可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器120可进一步包括相对于处理器180远程设置的存储器,这些远程存储器可以通过网络连接至移动终端1200。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 120 can be used to store software programs and modules, such as program instructions/modules corresponding to the camera autofocus method in the above embodiment, and the processor 180 executes various functional applications by running software programs and modules stored in the memory 120. Data processing, that is, the function of automatic focusing of the camera. Memory 120 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 120 can further include memory remotely located relative to processor 180, which can be connected to mobile terminal 1200 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入单元130可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元130可包括触敏表面131以及其他输入设备132。触敏表面131,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面131上或在触敏表面131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面131。除了触敏表面131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 130 can be configured to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls. In particular, input unit 130 can include touch-sensitive surface 131 as well as other input devices 132. Touch-sensitive surface 131, also referred to as a touch display or trackpad, can collect touch operations on or near the user (such as a user using a finger, stylus, etc., on any suitable object or accessory on touch-sensitive surface 131 or The operation near the touch-sensitive surface 131) and driving the corresponding connecting device according to a preset program. Alternatively, the touch-sensitive surface 131 can include two portions of a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information. The processor 180 is provided and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 can also include other input devices 132. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及移动终端1200的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元140可包括显示面板141,可选的,可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。进一步的,触敏表面131可覆盖显示面板141,当触敏表面131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器180根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图3中,触敏表面131与显示面板141是作为两个独立的部件来实现输入和输出功能,但是在某些实施例中,可以将触敏表面131与显示面板141集成而实现输入和输出功能。The display unit 140 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the mobile terminal 1200, which can be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and optionally, an LCD (Liquid may be used) The display panel 141 is configured in the form of a Crystal Display (LCD) or an OLED (Organic Light-Emitting Diode). Further, the touch-sensitive surface 131 may cover the display panel 141, and when the touch-sensitive surface 131 detects a touch operation thereon or nearby, it is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 according to the touch event The type provides a corresponding visual output on display panel 141. Although in FIG. 3, touch-sensitive surface 131 and display panel 141 are implemented as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 can be integrated with display panel 141 for input. And output function.
移动终端1200还可包括至少一种传感器150,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在移动终端1200移动到耳边时,关闭显示面板141和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等; 至于移动终端1200还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。Mobile terminal 1200 may also include at least one type of sensor 150, such as a light sensor, motion sensor, and other sensors. Specifically, 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 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 when the mobile terminal 1200 moves to the ear. And / or backlight. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity. It can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile terminal 1200 can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, here No longer.
音频电路160、扬声器161,传声器162可提供用户与移动终端1200之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理后,经RF电路110以发送给比如另一移动终端,或者将音频数据输出至存储器120以便进一步处理。音频电路160还可能包括耳塞插孔,以提供外设耳机与移动终端1200的通信。The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile terminal 1200. The audio circuit 160 can transmit the converted electrical data of the received audio data to the speaker 161 for conversion to the sound signal output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal by the audio circuit 160. After receiving, it is converted into audio data, and then processed by the audio data output processor 180, transmitted to the mobile terminal 110 via the RF circuit 110, or outputted to the memory 120 for further processing. The audio circuit 160 may also include an earbud jack to provide communication of the peripheral earphones with the mobile terminal 1200.
移动终端1200通过传输模块170(例如Wi-Fi模块)可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图3示出了传输模块170,但是可以理解的是,其并不属于移动终端1200的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。The mobile terminal 1200 can help the user to send and receive emails, browse web pages, access streaming media, etc. through the transmission module 170 (eg, Wi-Fi module), which provides wireless broadband Internet access to the user. Although FIG. 3 shows the transmission module 170, it can be understood that it does not belong to the essential configuration of the mobile terminal 1200, and may be omitted as needed within the scope of not changing the essence of the invention.
处理器180是移动终端1200的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行移动终端1200的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器180可包括一个或多个处理核心;在一些实施例中,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。The processor 180 is a control center of the mobile terminal 1200 that connects various portions of the entire handset with various interfaces and lines, by running or executing software programs and/or modules stored in the memory 120, and recalling data stored in the memory 120. The various functions and processing data of the mobile terminal 1200 are executed to perform overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and For applications, etc., the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
移动终端1200还包括给各个部件供电的电源190(比如电池),在一些实施例中,电源可以通过电源管理系统与处理器180逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源190还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The mobile terminal 1200 also includes a power source 190 (such as a battery) that powers the various components. In some embodiments, the power source can be logically coupled to the processor 180 through a power management system to manage charging, discharging, and power consumption through the power management system. Management and other functions. Power supply 190 may also include any one or more of a DC or AC power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
尽管未示出,移动终端1200还可以包括摄像头(如前置摄像头、后置摄像头)、蓝牙模块等,在此不再赘述。具体在本实施例中,移动终端的显示单元是触摸屏显示器,移动终端还包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行述一个或者一个以上程序包含用于进行以下操作的指令:Although not shown, the mobile terminal 1200 may further include a camera (such as a front camera, a rear camera), a Bluetooth module, and the like, and details are not described herein. Specifically, in this embodiment, the display unit of the mobile terminal is a touch screen display, the mobile terminal further includes a memory, and one or more programs, wherein one or more programs are stored in the memory and configured to be one or one The above processor executes one or more programs that include instructions for performing the following operations:
当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
在一些实施例中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:In some embodiments, the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
在一些实施例中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:In some embodiments, the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;Frame the face in the current picture and calculate the ratio of the frame selection area to the screen area;
当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
在一些实施例中,所述计算框选面积占屏幕面积的比例的步骤之后,还包括:In some embodiments, after the step of calculating the ratio of the area of the screen to the screen area, the method further includes:
当所述比例等于预设值时,则控制摄像头保持当前焦距。When the ratio is equal to the preset value, the camera is controlled to maintain the current focal length.
在一些实施例中,所述框选所用的框为矩形框。In some embodiments, the frame used for the frame selection is a rectangular frame.
在一些实施例中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:In some embodiments, the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, including:
控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值。The control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
在一些实施例中,所述框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值的步骤,包括:In some embodiments, the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame selection area to the screen area is a preset value, including:
在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值。After the face of the current picture is selected in the frame, the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
在一些实施例中,在所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤之前,还包括:In some embodiments, before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
设置一自动调焦功能;Set an auto focus function;
当自动调焦功能开启后,执行所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤。After the auto focus function is turned on, the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
综上所述,本发明提供了一种摄像头自动调焦方法、存储设备及移动终端,本发明所提供的摄像头自动调焦方法,在摄像头开启时,通过获取摄像头中的当前画面是否有人脸,有人脸的话则控制摄像头自动调节焦距至人脸占屏幕的比例为预设值,从而控制人脸在画面中的大小固定,使得拍摄出的人物在所拍摄的画面中的大小合适且一直保持不变,这样无论人物是否移动,都不影响人物在画面中大小,从而解决了现有技术中移动终端在进行人物拍摄时无法自动调焦使所拍摄到的人物大小合适的问题。In summary, the present invention provides a camera auto-focusing method, a storage device, and a mobile terminal. The camera automatically adjusts a focus method according to the present invention. When the camera is turned on, the current picture in the camera is obtained by a face. If there is a human face, the camera automatically controls the focal length to the proportion of the face to the screen as a preset value, thereby controlling the size of the face in the picture to be fixed, so that the size of the captured person in the captured picture is appropriate and remains unchanged. Therefore, no matter whether the character moves or not, the size of the character in the screen is not affected, thereby solving the problem that the mobile terminal in the prior art cannot automatically adjust the focus when shooting the character so that the size of the captured person is appropriate.
应当理解的是,本发明的应用不限于上述的举例,对本领域普通技术人员来说,可以根据上述说明加以改进或变换,所有这些改进和变换都应属于本发明所附权利要求的保护范围。It is to be understood that the application of the present invention is not limited to the above-described examples, and those skilled in the art can make modifications and changes in accordance with the above description, all of which are within the scope of the appended claims.

Claims (20)

  1. 一种摄像头自动调焦方法,其中,包括步骤:A camera automatic focusing method, comprising the steps of:
    当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
    若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
  2. 根据权利要求1所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method according to claim 1, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
    框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
  3. 根据权利要求1所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method according to claim 1, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
    框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;Frame the face in the current picture and calculate the ratio of the frame selection area to the screen area;
    当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
    当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  4. 根据权利要求3所述的摄像头自动调焦方法,其中,所述计算框选面积占屏幕面积的比例的步骤之后,还包括:The camera auto-focusing method according to claim 3, wherein after the step of calculating the ratio of the frame selection area to the screen area, the method further comprises:
    当所述比例等于预设值时,则控制摄像头保持当前焦距。When the ratio is equal to the preset value, the camera is controlled to maintain the current focal length.
  5. 根据权利要求2所述的摄像头自动调焦方法,其中,所述框选所用的框为矩形框。The camera autofocus method according to claim 2, wherein the frame used for the frame selection is a rectangular frame.
  6. 根据权利要求1所述的摄像头自动调焦方法,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The camera auto-focusing method according to claim 1, wherein the step of controlling the camera to focus to a ratio of a face to a screen is a preset value, comprising:
    控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值。The control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
  7. 根据权利要求2所述的摄像头自动调焦方法,其中,所述框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值的步骤,包括:The camera auto-focusing method according to claim 2, wherein the step of selecting a face in the current picture, and controlling the camera to focus to a ratio of the frame-selected area to the screen area is a preset value, comprising:
    在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值。After the face of the current picture is selected in the frame, the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
  8. 根据权利要求1所述的摄像头自动调焦方法,其中,在所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤之前,还包括:The camera auto-focusing method according to claim 1, wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
    设置一自动调焦功能;Set an auto focus function;
    当自动调焦功能开启后,执行所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤。After the auto focus function is turned on, the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
  9. 一种存储设备,其上存储有多条指令,其中,所述指令适合由处理器加载并执行如下步骤:A storage device having stored thereon a plurality of instructions, wherein the instructions are adapted to be loaded by a processor and perform the following steps:
    当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
    若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
  10. 根据权利要求9所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device of claim 9 wherein said instructions are adapted to be loaded by a processor and executed specifically:
    当前画面中有人脸,框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。In the current picture, there is a face, and the face in the current picture is selected, and the ratio of the camera to the area of the screen to the screen area is preset.
  11. 根据权利要求9所述的存储设备,其中,所述指令适合由处理器加载并具体执行:The storage device of claim 9 wherein said instructions are adapted to be loaded by a processor and executed specifically:
    当前画面中有人脸,框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;The face of the current picture is framed, and the face in the current picture is selected, and the ratio of the frame selection area to the screen area is calculated;
    当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
    当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  12. 根据权利要求11所述的存储设备,其中,所述指令适合由处理器加载并继续执行:The storage device of claim 11 wherein the instructions are adapted to be loaded by the processor and continue to execute:
    当所述比例等于预设值时,则无需调整摄像头。When the ratio is equal to the preset value, there is no need to adjust the camera.
  13. 一种移动终端,其中,所述移动终端包括:A mobile terminal, wherein the mobile terminal comprises:
    处理器,适于实现各指令;以及a processor adapted to implement each instruction;
    存储设备,其上存储有多条指令,所述指令适合由处理器加载并执行如下步骤:A storage device having stored thereon a plurality of instructions adapted to be loaded by the processor and to perform the following steps:
    当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸;When it is detected that the camera is turned on, it is determined whether the current picture in the camera has a face;
    若当前画面中有人脸,则控制摄像头调焦至人脸占屏幕的比例为预设值。If there is a face in the current picture, control the camera to focus to the proportion of the face on the screen as a preset value.
  14. 根据权利要求13所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal of claim 13, wherein the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, comprising:
    框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值。Frame the face in the current picture, and control the camera to focus to the frame area to the screen area as the default value.
  15. 根据权利要求13所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal of claim 13, wherein the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, comprising:
    框选当前画面中的人脸,并计算框选面积占屏幕面积的比例;Frame the face in the current picture and calculate the ratio of the frame selection area to the screen area;
    当所述比例大于预设值时,则控制摄像头焦距缩小至框选面积占屏幕的比例为预设值;When the ratio is greater than the preset value, controlling the focal length of the camera to be reduced to a ratio of the frame selection area to the screen is a preset value;
    当所述比例小于预设值时,则控制摄像头焦距放大至框选面积占屏幕的比例为预设值。When the ratio is less than the preset value, the focal length of the camera is controlled to be enlarged until the ratio of the frame selection area to the screen is a preset value.
  16. 根据权利要求15所述的移动终端,其中,所述计算框选面积占屏幕面积的比例的步骤之后,还包括:The mobile terminal of claim 15, wherein the step of calculating a ratio of the area of the screen to the screen area further comprises:
    当所述比例等于预设值时,则控制摄像头保持当前焦距。When the ratio is equal to the preset value, the camera is controlled to maintain the current focal length.
  17. 根据权利要求14所述的移动终端,其中,所述框选所用的框为矩形框。The mobile terminal of claim 14, wherein the frame used for the frame selection is a rectangular frame.
  18. 根据权利要求13所述的移动终端,其中,所述控制摄像头调焦至人脸占屏幕的比例为预设值的步骤,包括:The mobile terminal of claim 13, wherein the step of controlling the camera to focus to a ratio of the face to the screen is a preset value, comprising:
    控制摄像头自动调整焦距,以控制镜头与拍摄对象之间的距离,使人脸在屏幕中所占的比例为预设值。The control camera automatically adjusts the focal length to control the distance between the lens and the subject, so that the proportion of the face in the screen is a preset value.
  19. 根据权利要求14所述的移动终端,其中,所述框选当前画面中的人脸,控制摄像头调焦至框选面积占屏幕面积的比例为预设值的步骤,包括:The mobile terminal of claim 14, wherein the step of selecting a face in the current picture, controlling the camera to focus to a ratio of the frame selection area to the screen area is a preset value, comprising:
    在框选出当前画面中的人脸后,控制摄像头调焦至框选面积区域内的像素点占屏幕总像素点的比例为预设值。After the face of the current picture is selected in the frame, the ratio of the pixel points in the area selected by the control camera to the total pixel of the screen is preset.
  20. 根据权利要求13所述的移动终端,其中,在所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤之前,还包括:The mobile terminal according to claim 13, wherein before the step of determining whether the current picture in the camera is a human face when the camera is detected to be turned on, the method further includes:
    设置一自动调焦功能;Set an auto focus function;
    当自动调焦功能开启后,执行所述当检测到摄像头开启时,判断摄像头中的当前画面是否有人脸的步骤。After the auto focus function is turned on, the step of determining whether the current picture in the camera has a face is detected when the camera is detected to be turned on.
PCT/CN2018/123725 2017-12-26 2018-12-26 Automatic focusing method of camera, storage device and mobile terminal WO2019129020A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711431427.7A CN107911616A (en) 2017-12-26 2017-12-26 A kind of camera automatic focusing method, storage device and mobile terminal
CN201711431427.7 2017-12-26

Publications (1)

Publication Number Publication Date
WO2019129020A1 true WO2019129020A1 (en) 2019-07-04

Family

ID=61871241

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/123725 WO2019129020A1 (en) 2017-12-26 2018-12-26 Automatic focusing method of camera, storage device and mobile terminal

Country Status (2)

Country Link
CN (1) CN107911616A (en)
WO (1) WO2019129020A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669505A (en) * 2020-06-30 2020-09-15 维沃移动通信有限公司 Camera starting method and device
CN112235503A (en) * 2019-07-15 2021-01-15 北京字节跳动网络技术有限公司 Focusing test method and device, computer equipment and storage medium
CN113486834A (en) * 2020-12-09 2021-10-08 上海齐感电子信息科技有限公司 Method for confirming effective face area and verifying living face

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107911616A (en) * 2017-12-26 2018-04-13 Tcl移动通信科技(宁波)有限公司 A kind of camera automatic focusing method, storage device and mobile terminal
CN108600626A (en) * 2018-04-24 2018-09-28 阿里巴巴集团控股有限公司 Filming control method, device and portable electronic device
CN110602401A (en) * 2019-09-17 2019-12-20 维沃移动通信有限公司 Photographing method and terminal
CN113766125B (en) * 2019-09-29 2022-10-25 Oppo广东移动通信有限公司 Focusing method and device, electronic equipment and computer readable storage medium
CN110572558A (en) * 2019-10-15 2019-12-13 国家电网有限公司 super-depth-of-field fine inspection method and device
CN110853563B (en) * 2019-11-18 2023-05-12 深圳传音控股股份有限公司 Mirror-based image processing method, mobile terminal and computer storage medium
CN113079312A (en) * 2020-01-06 2021-07-06 北京小米移动软件有限公司 Method and device for adjusting focal length of camera, electronic equipment and storage medium
CN111263066B (en) * 2020-02-18 2021-07-20 Oppo广东移动通信有限公司 Composition guiding method, composition guiding device, electronic equipment and storage medium
CN113596316B (en) * 2020-04-30 2023-12-08 华为技术有限公司 Photographing method and electronic equipment
CN113778233B (en) * 2021-09-16 2022-04-05 广东魅视科技股份有限公司 Method and device for controlling display equipment and readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984454A (en) * 2012-11-15 2013-03-20 广东欧珀移动通信有限公司 System and method and mobile phone capable of automatically adjusting focal length of camera
CN103391361A (en) * 2013-07-05 2013-11-13 中科创达软件股份有限公司 Automatic reminding method and device for self-timer composition of intelligent terminal
CN104104867A (en) * 2014-04-28 2014-10-15 三星电子(中国)研发中心 Method for controlling image photographing device for photographing and device thereof
CN104125395A (en) * 2014-05-30 2014-10-29 深圳市中兴移动通信有限公司 Method and device for realizing automatic shooting
CN105430281A (en) * 2015-12-24 2016-03-23 广东欧珀移动通信有限公司 Picture taking control method, picture taking control device, selfie stick and camera system
CN107911616A (en) * 2017-12-26 2018-04-13 Tcl移动通信科技(宁波)有限公司 A kind of camera automatic focusing method, storage device and mobile terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102984454A (en) * 2012-11-15 2013-03-20 广东欧珀移动通信有限公司 System and method and mobile phone capable of automatically adjusting focal length of camera
CN103391361A (en) * 2013-07-05 2013-11-13 中科创达软件股份有限公司 Automatic reminding method and device for self-timer composition of intelligent terminal
CN104104867A (en) * 2014-04-28 2014-10-15 三星电子(中国)研发中心 Method for controlling image photographing device for photographing and device thereof
CN104125395A (en) * 2014-05-30 2014-10-29 深圳市中兴移动通信有限公司 Method and device for realizing automatic shooting
CN105430281A (en) * 2015-12-24 2016-03-23 广东欧珀移动通信有限公司 Picture taking control method, picture taking control device, selfie stick and camera system
CN107911616A (en) * 2017-12-26 2018-04-13 Tcl移动通信科技(宁波)有限公司 A kind of camera automatic focusing method, storage device and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112235503A (en) * 2019-07-15 2021-01-15 北京字节跳动网络技术有限公司 Focusing test method and device, computer equipment and storage medium
CN111669505A (en) * 2020-06-30 2020-09-15 维沃移动通信有限公司 Camera starting method and device
CN113486834A (en) * 2020-12-09 2021-10-08 上海齐感电子信息科技有限公司 Method for confirming effective face area and verifying living face
CN113486834B (en) * 2020-12-09 2024-03-19 上海齐感电子信息科技有限公司 Method for verifying effective face area and living face

Also Published As

Publication number Publication date
CN107911616A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
WO2019129020A1 (en) Automatic focusing method of camera, storage device and mobile terminal
CN108513070B (en) Image processing method, mobile terminal and computer readable storage medium
WO2018103525A1 (en) Method and device for tracking facial key point, and storage medium
WO2021051995A1 (en) Photographing method and terminal
WO2019091486A1 (en) Photographing processing method and device, terminal, and storage medium
WO2019174628A1 (en) Photographing method and mobile terminal
WO2021057267A1 (en) Image processing method and terminal device
US20160112632A1 (en) Method and terminal for acquiring panoramic image
WO2018219170A1 (en) Focusing control method, computer device and computer readable storage medium
CN110913139B (en) Photographing method and electronic equipment
WO2016019926A1 (en) Photo shooting method, device, and mobile terminal
WO2018098638A1 (en) Electronic device photographing method and apparatus
US11843715B2 (en) Photographing method and terminal
WO2021013009A1 (en) Photographing method and terminal device
WO2019129092A1 (en) Frame rate-lowered photographing method, mobile terminal and storage medium
WO2018219267A1 (en) Exposure method and device, computer-readable storage medium, and mobile terminal
CN108881721B (en) Display method and terminal
WO2021104226A1 (en) Photographing method and electronic device
WO2019144815A1 (en) Photographing method and mobile terminal
WO2022266907A1 (en) Processing method, terminal device and storage medium
CN107438162B (en) Shooting parameter adjusting method and device
CN109561255B (en) Terminal photographing method and device and storage medium
CN109005337B (en) Photographing method and terminal
CN108243489B (en) Photographing control method and mobile terminal
WO2021104162A1 (en) Display method and electronic device

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: 18896513

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: 18896513

Country of ref document: EP

Kind code of ref document: A1