CN106878616B - Method and system for automatically determining dynamic photo focus based on mobile terminal - Google Patents

Method and system for automatically determining dynamic photo focus based on mobile terminal Download PDF

Info

Publication number
CN106878616B
CN106878616B CN201710100408.XA CN201710100408A CN106878616B CN 106878616 B CN106878616 B CN 106878616B CN 201710100408 A CN201710100408 A CN 201710100408A CN 106878616 B CN106878616 B CN 106878616B
Authority
CN
China
Prior art keywords
axis
coordinate
coordinates
pixels
focus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710100408.XA
Other languages
Chinese (zh)
Other versions
CN106878616A (en
Inventor
俞斌
杨维琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Reliable Intellectual Property Service Co ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201710100408.XA priority Critical patent/CN106878616B/en
Publication of CN106878616A publication Critical patent/CN106878616A/en
Priority to PCT/CN2018/075768 priority patent/WO2018153269A1/en
Application granted granted Critical
Publication of CN106878616B publication Critical patent/CN106878616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals

Landscapes

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

Abstract

The invention discloses a method and a system for automatically determining a dynamic photo focus based on a mobile terminal, wherein the method comprises the steps of detecting each frame of image to obtain coordinates of different pixels in adjacent frames of images; obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images; and obtaining the focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels. The focus is selected by utilizing the dynamic content which continuously changes in the image, so that the trouble of manually selecting the focus can be avoided when a user takes a picture, the automatically selected focus can be more accurate and in place, the quality of the picture taken by the user is improved, and convenience is provided for the user.

Description

Method and system for automatically determining dynamic photo focus based on mobile terminal
Technical Field
The invention relates to the field of systems, in particular to a method and a system for automatically determining a dynamic photo focus based on a mobile terminal.
Background
At present, mobile terminals are all provided with cameras, and taking pictures by using the camera function of the mobile terminal in daily life is one of the most used functions of general users; when taking a picture with a mobile terminal, the process generally includes: turning on the camera; focusing; a photograph is taken.
The focus in the picture is selected, the focus and the area near the focus are the clearest places in the picture, and the rest places in the picture are often not as clear as the focus and the area near the focus. For general use, even for taking photographs, this is required to highlight the subject in the photograph while fading out non-subjects. In the prior art, the focus is usually selected manually by a user through a touch screen or selected by sensed image content in a static environment, and a better focus selection method is not available for a dynamic picture, so that the prior art has defects and needs to be innovated and developed.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and a system for automatically determining a dynamic photo focus based on a mobile terminal, aiming at the above-mentioned defects in the prior art. The invention aims to provide a method for automatically determining a focus of a dynamic photo, which aims to select the focus by using dynamic contents which change continuously in an image, so that the user can avoid the trouble of manually selecting the focus when taking the photo, and simultaneously, the automatically selected focus can be more accurate and in place, the quality of the photo taken by the user is improved, and convenience is provided for the user.
The technical scheme adopted by the invention for solving the technical problem is as follows:
a method for automatically determining a dynamic photo focus based on a mobile terminal comprises the following steps:
A. detecting each frame of image, and acquiring the position coordinates of different pixels in adjacent frames of images;
B. obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images;
C. and obtaining the focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels.
The method for automatically determining the focus of the dynamic photo based on the mobile terminal comprises the following specific steps:
a1, presetting a storage space capable of storing all pixel image data of two frames of images, for storing all pixel image data of the latest two frames of images;
a2, sequentially comparing the image data of all pixels of the two closest frame images in pixel-by-pixel order, and recording the coordinates of the pixels of the two closest frame images whose data are different.
The method for automatically determining the focus of the dynamic photo based on the mobile terminal, wherein the step B specifically comprises the following steps:
b1, obtaining the following four coordinates from the coordinates of the pixels with different data in the last two frames of images obtained in the step a 2: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis.
The method for automatically determining the focus of the dynamic photo based on the mobile terminal, wherein the step C specifically comprises the following steps:
and C1, calculating to obtain the focal point coordinate according to the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis obtained in the step B1, wherein the x axis value of the focal point is the average value of the minimum value of the x axis and the maximum value of the x axis, and the y axis value of the focal point is the average value of the minimum value of the y axis and the maximum value of the y axis.
A system for automatically determining a dynamic photo focus based on a mobile terminal, comprising:
the detection acquisition module is used for detecting each frame of image and acquiring the position coordinates of different pixels in adjacent frames of images;
the coordinate acquisition module is used for obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the acquired adjacent frame images;
and the focal point coordinate acquisition module is used for acquiring focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels.
The system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
the image data acquisition module is used for presetting a storage space capable of storing all pixel image data of two frames of images and storing all pixel image data of the latest two frames of images;
and the different pixel coordinate acquisition module is used for comparing all pixel image data of the two closest frame images in sequence according to pixels and recording the coordinates of the pixels with different data in the two closest frame images.
The system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
according to the coordinates of the pixels with different data in the two latest frames of images obtained by the different pixel coordinate obtaining modules, the following four coordinates are obtained in the coordinates: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis;
the system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
and the focus calculation module is used for calculating to obtain a focus coordinate according to the obtained x-axis minimum coordinate, the x-axis maximum coordinate, the y-axis minimum coordinate and the y-axis maximum coordinate, wherein the x-axis value of the focus is the average value of the x-axis minimum coordinate and the x-axis maximum coordinate, and the y-axis value of the focus is the average value of the y-axis minimum coordinate and the y-axis maximum coordinate.
The method and the system for automatically determining the dynamic photo focus based on the mobile terminal provided by the invention have the advantages that the coordinates of different pixels in adjacent frame images are obtained by detecting each frame image; obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images; and obtaining the focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels. The focus is selected by utilizing the dynamic content which continuously changes in the image, so that the trouble of manually selecting the focus can be avoided when a user takes a picture, the automatically selected focus can be more accurate and in place, the quality of the picture taken by the user is improved, and convenience is provided for the user.
Drawings
Fig. 1 is a flowchart of a method for automatically determining a dynamic photo focus based on a mobile terminal according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of a method for automatically determining a dynamic photo focus based on a mobile terminal according to a preferred embodiment of the present invention.
FIG. 3 is a flow chart of the system for automatically determining the focus of a dynamic photo based on a mobile terminal according to the preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for automatically determining a dynamic photo focus based on a mobile terminal according to a preferred embodiment of the present invention. The method for automatically determining the dynamic photo focus based on the mobile terminal comprises the following steps:
and S100, detecting each frame of image, and acquiring coordinates of different pixels in adjacent frames of images.
In the embodiment of the invention, during specific implementation, a storage space capable of storing all pixel image data of two frames of images needs to be preset for storing all pixel image data of the latest two frames of images; for example, one pixel occupies two bytes of storage space, and the size of one frame of image is xm × ym, so that the total required storage space is xm × ym 2 × 2 bytes.
Comparing all pixel image data of the two closest frame images in turn by pixel, and recording the coordinates of the pixels with different data in the two closest frame images. FIG. 2 is a schematic diagram of pixel coordinates in each frame according to an embodiment of the method of the present invention, where P [1,1] in FIG. 2 represents image data in a first row and a first column in a frame image, P [1,2] represents image data in a first row and a second column in a frame image, … …, comparing sequentially whether image data at corresponding positions in two frames are the same, and if not, recording; if the data are not the same, it indicates that the photographed object is changing in time between the two frames.
And S200, obtaining the coordinates of the uppermost, lowermost, leftmost and rightmost pixels from the coordinates of the different pixels in the acquired adjacent frame images.
Specifically, based on the obtained coordinates of the pixels whose data are different in the last two frames of images, the following four coordinates are obtained in these coordinates: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis.
And S300, obtaining the focal point coordinate according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels.
Specifically, the focal point coordinate is obtained through calculation according to the obtained x-axis minimum coordinate, x-axis maximum coordinate, y-axis minimum coordinate and y-axis maximum coordinate, wherein the x-axis value of the focal point is the average value of the x-axis minimum coordinate and the x-axis maximum coordinate, and the y-axis value of the focal point is the average value of the y-axis minimum coordinate and the y-axis maximum coordinate.
In view of the above, in the method for automatically determining a dynamic photo focus based on a mobile terminal according to the embodiment of the present invention, coordinates of different pixels in adjacent frames of images are obtained by detecting each frame of image; obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images; and obtaining the focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels. The focus is selected by utilizing the dynamic content which continuously changes in the image, so that the user can avoid the trouble of manually selecting the focus when taking a picture, and meanwhile, the automatically selected focus can be more accurate and in place, the quality of the picture taken by the user is improved, the user experience is improved, and convenience is provided for the user.
Based on the above method embodiment, the present invention further provides a system for automatically determining a dynamic photo focus based on a mobile terminal, as shown in fig. 3, the system includes:
the detection obtaining module 210 is configured to detect each frame of image, and obtain position coordinates of different pixels in adjacent frames of images; as described above.
A coordinate obtaining module 220, configured to obtain coordinates of an uppermost pixel, a lowermost pixel, a leftmost pixel, and a rightmost pixel from the obtained coordinates of different pixels in the adjacent frame images; as described above.
A focus coordinate obtaining module 230, configured to obtain a focus coordinate according to the obtained coordinates of the uppermost, lowermost, leftmost, and rightmost pixels; as described above.
Further, the system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
the image data acquisition module is used for presetting a storage space capable of storing all pixel image data of two frames of images and storing all pixel image data of the latest two frames of images; as described above.
The different pixel coordinate acquisition module is used for comparing all pixel image data of the two closest frame images in sequence according to pixels and recording the coordinates of the pixels with different data in the two closest frame images; as described above.
Further, the system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
according to the coordinates of the pixels with different data in the two latest frames of images obtained by the different pixel coordinate obtaining modules, the following four coordinates are obtained in the coordinates: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis; as described above.
Further, the system for automatically determining the focus of a dynamic photo based on a mobile terminal further comprises:
the focus calculation module is used for calculating to obtain a focus coordinate according to the obtained x-axis minimum coordinate, the x-axis maximum coordinate, the y-axis minimum coordinate and the y-axis maximum coordinate, wherein the x-axis value of the focus is the average value of the x-axis minimum coordinate and the x-axis maximum coordinate, and the y-axis value of the focus is the average value of the y-axis minimum coordinate and the y-axis maximum coordinate; as described above.
In summary, according to the method and the system for automatically determining the focus of the dynamic photo based on the mobile terminal provided by the invention, the coordinates of different pixels in adjacent frames of images are obtained by detecting each frame of image; obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images; and obtaining the focal point coordinates according to the acquired coordinates of the uppermost, lowermost, leftmost and rightmost pixels. The focus is selected by utilizing the dynamic content which continuously changes in the image, so that the trouble of manually selecting the focus can be avoided when a user takes a picture, the automatically selected focus can be more accurate and in place, the quality of the picture taken by the user is improved, and convenience is provided for the user.
Of course, it will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by a computer program instructing relevant hardware (such as a processor, a controller, etc.), and the program may be stored in a computer readable storage medium, and when executed, the program may include the processes of the above method embodiments. The storage medium may be a memory, a magnetic disk, an optical disk, etc.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (2)

1. A method for automatically determining a dynamic photo focus based on a mobile terminal is characterized by comprising the following steps:
A. detecting each frame of image, and acquiring the position coordinates of different pixels in adjacent frames of images;
the step A specifically comprises the following steps:
a1, presetting a storage space capable of storing all pixel image data of two frames of images, for storing all pixel image data of the latest two frames of images;
a2, comparing all the image data of the pixels of the two closest frame images in turn according to the pixels, and recording the coordinates of the pixels with different data in the two closest frame images;
B. obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the adjacent frame images;
the step B specifically comprises the following steps:
b1, obtaining the following four coordinates from the coordinates of the pixels with different data in the last two frames of images obtained in the step a 2: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis;
C. obtaining a focus coordinate according to the obtained coordinates of the uppermost, lowermost, leftmost and rightmost pixels;
the step C specifically comprises the following steps:
and C1, calculating to obtain the focal point coordinate according to the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis obtained in the step B1, wherein the x axis value of the focal point is the average value of the minimum value of the x axis and the maximum value of the x axis, and the y axis value of the focal point is the average value of the minimum value of the y axis and the maximum value of the y axis.
2. A system for automatically determining a dynamic focus of a photograph based on a mobile terminal, comprising:
the detection acquisition module is used for detecting each frame of image and acquiring the position coordinates of different pixels in adjacent frames of images;
the image data acquisition module is used for presetting a storage space capable of storing all pixel image data of two frames of images and storing all pixel image data of the latest two frames of images;
the different pixel coordinate acquisition module is used for comparing all pixel image data of the two closest frame images in sequence according to pixels and recording the coordinates of the pixels with different data in the two closest frame images;
the coordinate acquisition module is used for obtaining the coordinates of the pixels at the top, the bottom, the left and the right from the coordinates of the different pixels in the acquired adjacent frame images; according to the coordinates of the pixels with different data in the two latest frames of images obtained by the different pixel coordinate obtaining modules, the following four coordinates are obtained in the coordinates: the coordinate of the minimum value of the x axis, the coordinate of the maximum value of the x axis, the coordinate of the minimum value of the y axis and the coordinate of the maximum value of the y axis;
the focal point coordinate acquisition module is used for acquiring focal point coordinates according to the acquired coordinates of the pixels at the top, the bottom, the left and the right;
the system further comprises:
and the focus calculation module is used for calculating to obtain a focus coordinate according to the obtained x-axis minimum coordinate, the x-axis maximum coordinate, the y-axis minimum coordinate and the y-axis maximum coordinate, wherein the x-axis value of the focus is the average value of the x-axis minimum coordinate and the x-axis maximum coordinate, and the y-axis value of the focus is the average value of the y-axis minimum coordinate and the y-axis maximum coordinate.
CN201710100408.XA 2017-02-23 2017-02-23 Method and system for automatically determining dynamic photo focus based on mobile terminal Active CN106878616B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710100408.XA CN106878616B (en) 2017-02-23 2017-02-23 Method and system for automatically determining dynamic photo focus based on mobile terminal
PCT/CN2018/075768 WO2018153269A1 (en) 2017-02-23 2018-02-08 Method and system for mobile terminal-based automatic determination of dynamic focal points in photos, and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710100408.XA CN106878616B (en) 2017-02-23 2017-02-23 Method and system for automatically determining dynamic photo focus based on mobile terminal

Publications (2)

Publication Number Publication Date
CN106878616A CN106878616A (en) 2017-06-20
CN106878616B true CN106878616B (en) 2020-06-09

Family

ID=59168370

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710100408.XA Active CN106878616B (en) 2017-02-23 2017-02-23 Method and system for automatically determining dynamic photo focus based on mobile terminal

Country Status (2)

Country Link
CN (1) CN106878616B (en)
WO (1) WO2018153269A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878616B (en) * 2017-02-23 2020-06-09 惠州Tcl移动通信有限公司 Method and system for automatically determining dynamic photo focus based on mobile terminal
CN111309420A (en) * 2020-02-06 2020-06-19 Tcl移动通信科技(宁波)有限公司 Startup picture display method and system, storage medium and terminal equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003125172A (en) * 2001-10-10 2003-04-25 Pfu Ltd Control method for image reader
CN101840578B (en) * 2009-03-17 2012-05-23 鸿富锦精密工业(深圳)有限公司 Camera device and dynamic detection method thereof
CN102469247A (en) * 2010-11-09 2012-05-23 鸿富锦精密工业(深圳)有限公司 Photographic device and dynamic focusing method thereof
CN103369227A (en) * 2012-03-26 2013-10-23 联想(北京)有限公司 Photographing method of moving object and electronic equipment
JP2014085503A (en) * 2012-10-23 2014-05-12 Ricoh Co Ltd Imaging apparatus and imaging method
JP5866493B2 (en) * 2013-11-19 2016-02-17 パナソニックIpマネジメント株式会社 Imaging device
CN106324945A (en) * 2015-06-30 2017-01-11 中兴通讯股份有限公司 Non-contact automatic focusing method and device
CN106878616B (en) * 2017-02-23 2020-06-09 惠州Tcl移动通信有限公司 Method and system for automatically determining dynamic photo focus based on mobile terminal

Also Published As

Publication number Publication date
WO2018153269A1 (en) 2018-08-30
CN106878616A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
KR102598109B1 (en) Electronic device and method for providing notification relative to image displayed via display and image stored in memory based on image analysis
US9609221B2 (en) Image stabilization method and electronic device therefor
US9313419B2 (en) Image processing apparatus and image pickup apparatus where image processing is applied using an acquired depth map
WO2016112704A1 (en) Method and device for adjusting focal length of projector, and computer storage medium
US7450756B2 (en) Method and apparatus for incorporating iris color in red-eye correction
WO2019085951A1 (en) Image processing method, and device
CN107295252B (en) Focusing area display method and device and terminal equipment
CN103997598A (en) Method of tracking object using camera and camera system for object tracking
US20220222830A1 (en) Subject detecting method and device, electronic device, and non-transitory computer-readable storage medium
EP3308537A1 (en) Calibration of defective image sensor elements
KR101441786B1 (en) Subject determination apparatus, subject determination method and recording medium storing program thereof
CN103826031A (en) Method and apparatus for digital-image red-eye correction that facilitates undo operation
US8948453B2 (en) Device, method and non-transitory computer readable storage medium for detecting object
CN110072078A (en) Monitor camera, the control method of monitor camera and storage medium
CN106791451B (en) Photographing method of intelligent terminal
CN106878616B (en) Method and system for automatically determining dynamic photo focus based on mobile terminal
US9706110B2 (en) Foreign body information detection device and foreign body information detection method of imaging apparatus
CN105578020B (en) Self-timer system and method
CN110475071B (en) Phase focusing method, phase focusing device, electronic equipment and machine-readable storage medium
US20160323490A1 (en) Extensible, automatically-selected computational photography scenarios
CN107197155B (en) Method and system for focusing after photographing, mobile terminal and storage device
JP6381212B2 (en) Imaging apparatus and control method thereof
WO2017126056A1 (en) Mobile terminal, image processing method, and program
JP6622555B2 (en) Image processing apparatus and control method therefor, imaging apparatus, program, and storage medium
JP6548409B2 (en) Image processing apparatus, control method therefor, control program, and imaging apparatus

Legal Events

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

Effective date of registration: 20231027

Address after: Room 501, 85 Xiaguang Dongli, Haicang District, Xiamen City, Fujian Province, 361000

Patentee after: Xiamen reliable intellectual property service Co.,Ltd.

Address before: 516006 Zhongkai hi tech Zone, Huizhou, Guangdong, 86 Chang seven Road West

Patentee before: HUIZHOU TCL MOBILE COMMUNICATION Co.,Ltd.

TR01 Transfer of patent right