CN109995970A - Utilize the method for front camera control rear camera focusing - Google Patents

Utilize the method for front camera control rear camera focusing Download PDF

Info

Publication number
CN109995970A
CN109995970A CN201711488945.2A CN201711488945A CN109995970A CN 109995970 A CN109995970 A CN 109995970A CN 201711488945 A CN201711488945 A CN 201711488945A CN 109995970 A CN109995970 A CN 109995970A
Authority
CN
China
Prior art keywords
front camera
camera
value
focusing
pixels
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711488945.2A
Other languages
Chinese (zh)
Inventor
陈啸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201711488945.2A priority Critical patent/CN109995970A/en
Publication of CN109995970A publication Critical patent/CN109995970A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The purpose of the present invention is to provide the methods using front camera control rear camera focusing, it is intended to solve the problems, such as existing mobile terminal rear camera focusing and take pictures to need lock out operation.

Description

Utilize the method for front camera control rear camera focusing
Technical field
The present invention relates to mobile terminal field of photography more particularly to a kind of utilization front camera to control rear camera pair Burnt method and system.
Background technique
Currently, camera is widely used in the terminal, and most of mobile terminal all has double camera shootings Head, i.e. front camera and rear camera.But since the conditions such as cost and structure limit, although many mobile terminals all have It takes pictures button, but the button is unable to complete the focusing half-press as mm professional camera special, presses the function of taking pictures entirely, that is, cannot achieve utilization The function that same button realizes focusing and takes pictures.For example, the focus function of existing partial movement terminal rear camera is logical The preview area touched on touch screen is crossed to complete, and camera function is then by pressing take pictures button or membrane keyboard of taking pictures come complete At;This way of realization will focus and take pictures separation, make user that need to be divided to two operations: the first step when taking pictures, and touch touching The preview area touched in screen is focused;Second step is pressed and takes pictures button or membrane keyboard of taking pictures is taken pictures;Obviously, this bat According to mode, that there are steps is more, speed is slow, volatile the defects of going focus.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide imaged using front camera control postposition The method of head focusing, it is intended to solve the problems, such as existing mobile terminal rear camera focusing and take pictures to need lock out operation.
Technical scheme is as follows:
A method of it is focused using front camera control rear camera, wherein comprising steps of
A, when user opens the camera function of mobile terminal, front camera and rear camera are opened simultaneously;
B, the light luminance around front camera is obtained by the image that front camera incudes, and is judged according to light luminance Whether there is object close to front camera, when being, control rear camera is focused;
C, judge whether front camera is covered by object according to the light luminance around front camera, when being, after control Camera is set to be taken pictures or imaged.
The method using front camera control rear camera focusing, wherein the front camera is felt The transformat for the image answered is yuv format.
The method using front camera control rear camera focusing, wherein the step B is specifically included:
B1, the image data for obtaining front camera induction;
B2, to the Y value averaged of all pixels in each frame image;
B3, judge whether the average value of Y value gradually becomes smaller, it is close to front camera that object is then determined with when being.
The method using front camera control rear camera focusing, wherein the step B3 is specifically included:
Judge whether the average value of the Y value of all pixels in previous frame image is greater than the Y value of all pixels in next frame image It is close to front camera to be then determined with object when being for the+the first threshold values of average value.
The method using front camera control rear camera focusing, wherein the step B3 further include:
Judge that the average value of the Y value of all pixels in each frame image whether less than the second threshold values, when being, is then determined with object It is close to front camera.
The method using front camera control rear camera focusing, wherein the step C is specifically included:
C1, the image data for obtaining front camera induction;
C2, judge whether the Y value of all pixels in image is respectively less than a third threshold values, front camera quilt is then determined when being Object covering.
The utility model has the advantages that the present invention is by the light luminance around detection front camera, by the variation of light luminance and Size come judge to carry out rear camera focusing and photographing operation, that is, the function of the sensed image of front camera is utilized The unified operation for realizing focusing and taking pictures, facilitates use of the user to rear camera, simplifies operating procedure, improve Service speed, focus are easy to control, and increase new function, improve the usage experience of user.
Specific embodiment
The present invention provides the method using front camera control rear camera focusing, to make the purpose of the present invention, skill Art scheme and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that tool described herein Body embodiment is only used to explain the present invention, is not intended to limit the present invention.
The invention includes the following steps:
S101, when user open mobile terminal camera function when, open simultaneously front camera and rear camera;
S102, the light luminance around front camera is obtained by the image that front camera incudes, and according to light luminance It is close to front camera to judge whether there is object, when being, control rear camera is focused;
S103, judge whether front camera is covered by object according to light luminance, when being, control rear camera is clapped According to or camera shooting.
In step s101, it when user opens the camera function of mobile terminal, opens simultaneously front camera and postposition is taken the photograph It as head, needs that the two cameras are arranged in mobile terminal of the invention certainly, this is all real on most of smart phone It is existing, that is, it include front camera and rear camera.The present invention is controlled rear camera using front camera and carried out pair Coke and take pictures (or camera shooting).
In step s 102, rear camera can need to only be controlled using front camera to realize, this hair The bright light luminance by front camera detects, i.e., is controlled by judging whether there is object proximity front camera Focusing, specifically includes the following steps:
S201, the image data for obtaining front camera induction;Front camera can obtain its sense using the camera function of oneself The image data answered, in the present invention, the transformat for the image that front camera is incuded are yuv format.Yuv format is one Kind color coded format, wherein the Y value in yuv format image data represents the brightness of pixel, passes through and analyzes Y value size Know the light luminance around front camera.So only need to be according to the Y of all pixels in frame image each in image data Value judges the light luminance around front camera.
S202, to the Y value averaged of all pixels in each frame image;Referred to herein as calculate each frame image institute There is the Y value of pixel to carry out average value processing, average value herein is preferably arithmetic mean of instantaneous value, and calculating process is relatively easy, calculates Measure that small, processing speed is fast.There can be a theoretical data to the brightness of each frame image in this way.
S203, judge whether the average value of Y value gradually becomes smaller, it is close to front camera to be then determined with object when being, Control rear camera is focused.It is to judge whether the average value of Y value gradually becomes smaller herein, that is, judges whether brightness gradually becomes It is small, when being, illustrate there is object, such as manpower is close to front camera, then rear camera can control to carry out pair at this time Coke operation, such user only need to can be realized focus operation close to front camera with hand, other objects can also be used certainly and lean on Nearly front camera keeps front camera ambient light brightness dimmed.
Further, step S203 further include:
Judge whether the average value of the Y value of all pixels in previous frame image is greater than the Y value of all pixels in next frame image It is close to front camera to be then determined with object when being for the+the first threshold values of average value.Such as all pixels in previous frame image The average value of Y value be A, the average value of the Y value of all pixels is B in next frame image, and the first threshold values is C, then when A is greater than When B+C, i.e. A need to be C bigger than B, and it is close to front camera to be just determined with object.Assuming that previous frame image is first frame, next frame Image (present frame) be the second frame, then present frame need to the first threshold values smaller than the Y value of all pixels of previous frame size.I.e. The average value of the Y value of all pixels needs smaller than the average value of the Y value of all pixels in previous frame image by current frame image It is close to front camera to be just determined with object for the size of one threshold values.
Such a first threshold values is set herein, be in order to allow brightness change only when meeting certain condition, just judgement It is close by object, i.e., the difference of the average value of consecutive frame pixel Y value is greater than the first threshold values (obvious all pictures of current frame image The Y value average value of element need to be less than the Y value average value of previous frame image all pixels), just carry out focusing control.
Meanwhile before executing step S203, it is also necessary to judge whether the average value of Y value is greater than a reservation threshold, this Reservation threshold is the minimum brightness for starting focus function of the present invention, i.e., if environment is too dark, so that all pixels Y in a frame image The average value of value does not reach minimum brightness or more, then can not start focus function.
In addition, also settable second threshold values, the average value of the Y value of all pixels is less than only in judging image Two threshold values, at the same meet difference above-mentioned be greater than the first threshold values condition when, then it is close to front camera to be determined with object.This A second threshold values is that the initiation value of focusing could focus when only meeting less than this second threshold values.
In step s 103, it need to judge whether front camera is covered by object according to light luminance, then according to judgement As a result control rear camera is taken pictures or is imaged, specifically comprising step:
S301, the image data for obtaining front camera induction;
S302, judge whether the Y value of all pixels in image is respectively less than a third threshold values, front camera is then determined when being It is covered by object;
In this step, be judge Y value average value whether be respectively less than a third threshold values, such as judge Y value average value whether It is equal to 0, that is, judges whether the light luminance around front camera is dark enough, only when meeting condition, is just determined with object Body covers front camera, and in such a situa-tion, controllable rear camera is taken pictures or imaged.
In the present invention, the focusing of rear camera and movement of taking pictures all only are needed to control front camera, example As close to front camera or covering front camera, without as traditional method: click screen is focused to control, with And to press camera button the same the methods of take pictures, so operation of the invention is very simple, it can be achieved that with mm professional camera special one Sample rapid focus is taken pictures, and the experience of user is improved.

Claims (6)

1. a kind of method using front camera control rear camera focusing, which is characterized in that comprising steps of
A, when user opens the camera function of mobile terminal, front camera and rear camera are opened simultaneously;
B, the light luminance around front camera is obtained by the image that front camera incudes, and is judged according to light luminance Whether there is object close to front camera, when being, control rear camera is focused;
C, judge whether front camera is covered by object according to the light luminance around front camera, when being, after control Camera is set to be taken pictures or imaged.
2. the method according to claim 1 using front camera control rear camera focusing, which is characterized in that institute The transformat for stating the image that front camera is incuded is yuv format.
3. the method according to claim 2 using front camera control rear camera focusing, which is characterized in that institute Step B is stated to specifically include:
B1, the image data for obtaining front camera induction;
B2, to the Y value averaged of all pixels in each frame image;
B3, judge whether the average value of Y value gradually becomes smaller, it is close to front camera that object is then determined with when being.
4. the method according to claim 3 using front camera control rear camera focusing, which is characterized in that institute Step B3 is stated to specifically include:
Judge whether the average value of the Y value of all pixels in previous frame image is greater than the Y value of all pixels in next frame image It is close to front camera to be then determined with object when being for the+the first threshold values of average value.
5. the method according to claim 4 using front camera control rear camera focusing, which is characterized in that institute State step B3 further include:
Judge that the average value of the Y value of all pixels in each frame image whether less than the second threshold values, when being, is then determined with object It is close to front camera.
6. the method according to claim 2 using front camera control rear camera focusing, which is characterized in that institute Step C is stated to specifically include:
C1, the image data for obtaining front camera induction;
C2, judge whether the Y value of all pixels in image is respectively less than a third threshold values, front camera quilt is then determined when being Object covering.
CN201711488945.2A 2017-12-30 2017-12-30 Utilize the method for front camera control rear camera focusing Pending CN109995970A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711488945.2A CN109995970A (en) 2017-12-30 2017-12-30 Utilize the method for front camera control rear camera focusing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711488945.2A CN109995970A (en) 2017-12-30 2017-12-30 Utilize the method for front camera control rear camera focusing

Publications (1)

Publication Number Publication Date
CN109995970A true CN109995970A (en) 2019-07-09

Family

ID=67111368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711488945.2A Pending CN109995970A (en) 2017-12-30 2017-12-30 Utilize the method for front camera control rear camera focusing

Country Status (1)

Country Link
CN (1) CN109995970A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501413A (en) * 2013-10-14 2014-01-08 Tcl通讯(宁波)有限公司 Method and system for controlling post camera to focus and take pictures with front camera
CN104902190A (en) * 2015-06-24 2015-09-09 联想(北京)有限公司 Control method, photographic device and electronic device
CN105847693A (en) * 2016-04-27 2016-08-10 乐视控股(北京)有限公司 Shooting method and system based on two-camera focusing
CN107277355A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 camera switching method, device and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103501413A (en) * 2013-10-14 2014-01-08 Tcl通讯(宁波)有限公司 Method and system for controlling post camera to focus and take pictures with front camera
CN104902190A (en) * 2015-06-24 2015-09-09 联想(北京)有限公司 Control method, photographic device and electronic device
CN105847693A (en) * 2016-04-27 2016-08-10 乐视控股(北京)有限公司 Shooting method and system based on two-camera focusing
CN107277355A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 camera switching method, device and terminal

Similar Documents

Publication Publication Date Title
JP6834056B2 (en) Shooting mobile terminal
CN103501413B (en) Method and system for controlling post camera to focus and take pictures with front camera
TWI433531B (en) Method of starting snapping static screen and system therof
CN101334578B (en) Image photographing apparatus, image photographing method, and computer program
CN107395898B (en) Shooting method and mobile terminal
CN105744175B (en) A kind of screen light compensation method, device and mobile terminal
CN107438163B (en) Photographing method, terminal and computer readable storage medium
CN107079083A (en) A kind of photographic method, camera arrangement and terminal
CN103716547A (en) Smart mode photographing method
KR20080109666A (en) Imaging device, imaging method and computer program
CN105744174A (en) Selfie method and device and mobile terminal
US20170220102A1 (en) Method and device for implementing virtual button through camera, and computer-readable recording medium
WO2023077939A1 (en) Camera switching method and apparatus, and electronic device and storage medium
JP2013106284A (en) Light source estimation device, light source estimation method, light source estimation program, and imaging apparatus
CN111881862B (en) Gesture recognition method and related device
CN106204743A (en) Control method, device and the mobile terminal of a kind of augmented reality function
CN106126066A (en) Control method, device and the mobile terminal of a kind of augmented reality function
CN106851099B (en) A kind of method and mobile terminal of shooting
WO2019052449A1 (en) Skin color recognition method and apparatus, and storage medium
CN109995970A (en) Utilize the method for front camera control rear camera focusing
CN108737736A (en) A kind of mobile terminal focal control method, mobile terminal and storage medium
CN108495044A (en) A kind of image pickup method of multi-cam, camera terminal and readable storage medium storing program for executing
CN108900762A (en) A kind of image pickup method of multi-cam, camera terminal and readable storage medium storing program for executing
CN109120856A (en) Camera shooting method and device
WO2017071560A1 (en) Picture processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190709

WD01 Invention patent application deemed withdrawn after publication