CN113938596A - Method and device for shooting image - Google Patents

Method and device for shooting image Download PDF

Info

Publication number
CN113938596A
CN113938596A CN202010603432.7A CN202010603432A CN113938596A CN 113938596 A CN113938596 A CN 113938596A CN 202010603432 A CN202010603432 A CN 202010603432A CN 113938596 A CN113938596 A CN 113938596A
Authority
CN
China
Prior art keywords
voice coil
coil motor
preset
camera
focusing
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
CN202010603432.7A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010603432.7A priority Critical patent/CN113938596A/en
Publication of CN113938596A publication Critical patent/CN113938596A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/02Mountings, adjusting means, or light-tight connections, for optical elements for lenses
    • G02B7/04Mountings, adjusting means, or light-tight connections, for optical elements for lenses with mechanism for focusing or varying magnification
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B13/00Viewfinders; Focusing aids for cameras; Means for focusing for cameras; Autofocus systems for cameras
    • G03B13/32Means for focusing
    • G03B13/34Power focusing

Abstract

The embodiment of the disclosure provides a method and a device for shooting an image. The method for shooting the image comprises the following steps: the method comprises the steps of firstly obtaining a first image collected by a first position of a display picture in a camera focusing view-finding frame, adjusting the position of a voice coil motor of the camera to enable the camera to focus a second position in the display picture based on position adjustment information of preset voice coil motor movement data obtained in advance, obtaining movement second position data needing to be adjusted of the voice coil motor at the second position of the focusing display picture, and obtaining a second image collected by the focusing second position, wherein the position adjustment information of the preset voice coil motor comprises the movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display picture, and obtaining and generating clear images of the first position and the second position based on the first image and the second image, so that rapid focusing is realized.

Description

Method and device for shooting image
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for shooting images.
Background
The common VCM motor camera needs to realize focusing for 2 times, based on a contrast focusing principle, point-by-point scanning is needed, focusing time is long, when one camera is used for shooting an inclined plane at a short distance, when the inclination angle is large, because the depth of field of the short-distance camera is shallow, the shot inclined plane is at different depths of field, one image cannot be clear, 2 images can be shot through 2 times of near and far focusing of the shot inclined plane, images which are clear at a near place and clear at a far place are respectively obtained, and then a clear image is synthesized. Since it takes long to complete 2 times of focusing based on the contrast focusing principle.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for shooting an image.
In a first aspect, an embodiment of the present disclosure provides a method of capturing an image, the method including: acquiring a first image acquired at a first position of a display picture in a camera focusing view-finding frame; based on the position adjustment information of the preset voice coil motor, which is acquired in advance, the position of the voice coil motor of the camera is adjusted to enable the camera to focus on a second position in the display picture, and a second image acquired by focusing on the second position is acquired, wherein the position adjustment information of the preset voice coil motor comprises movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display picture; and generating an image with clear first and second positions based on the first and second images.
In some embodiments, the pre-acquired position adjustment information of the preset voice coil motor includes: presetting moving data of the voice coil motor when a focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from a first position to a second position in a display picture; and based on the position adjustment information of the preset voice coil motor acquired in advance, adjusting the position of the voice coil motor of the camera to enable the camera to focus on a second position in the display picture, including: the method comprises the steps of obtaining step length parameters of a voice coil motor of a camera, and determining position adjustment information of the voice coil motor of the camera based on the proportional relation between the step length parameters of the voice coil motor of the camera and preset step length parameters and movement data corresponding to the preset parameters.
In some embodiments, the preset position adjustment information of the voice coil motor is obtained by: acquiring first position data of a preset voice coil motor at a first position in a camera focusing display picture; and controlling the preset voice coil motor to move, determining focusing positions in the display picture corresponding to the preset voice coil motor when the preset voice coil motor moves to the preset positions, taking position data of the voice coil motor when the voice coil motor moves to a second position in the focusing display picture as second position data, and determining position adjustment information of the preset voice coil motor based on the first position data and the second position data.
In some embodiments, determining the focusing position in the display screen corresponding to the preset voice coil motor when moving to each preset position includes: and determining the definition of a second position in the image acquired when the preset voice coil motor moves to each preset position, and determining whether the focusing position in the corresponding display picture is the second position when the preset voice coil motor moves to each preset position based on the definition of the second position.
In some embodiments, the in-finder-frame display comprises a tilted view; and the first position and the second position are a position relatively close to the camera and a position relatively far from the camera in the inclined plane in the display screen, respectively.
In a second aspect, an embodiment of the present disclosure provides an apparatus for capturing an image, the apparatus including: a first acquisition unit configured to acquire a first image captured at a first position of a display screen in a camera focus finder frame; a second obtaining unit configured to, based on position adjustment information of a preset voice coil motor obtained in advance, adjust a position of the voice coil motor of the camera such that the camera focuses on a second position in the display screen, and obtain a second image acquired by focusing on the second position, wherein the position adjustment information of the preset voice coil motor includes movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display screen; a generating unit configured to generate an image in which the first position and the second position are clear, based on the first image and the second image.
In some embodiments, the pre-acquired position adjustment information of the preset voice coil motor includes: presetting moving data of the voice coil motor when a focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from a first position to a second position in a display picture; and a second acquisition unit further configured to: the method comprises the steps of obtaining step length parameters of a voice coil motor of a camera, and determining position adjustment information of the voice coil motor of the camera based on the proportional relation between the step length parameters of the voice coil motor of the camera and preset step length parameters and movement data corresponding to the preset parameters.
In some embodiments, the preset position adjustment information of the voice coil motor is obtained by: acquiring first position data of a preset voice coil motor at a first position in a camera focusing display picture; and controlling the preset voice coil motor to move, determining focusing positions in the display picture corresponding to the preset voice coil motor when the preset voice coil motor moves to the preset positions, taking position data of the voice coil motor when the voice coil motor moves to a second position in the focusing display picture as second position data, and determining position adjustment information of the preset voice coil motor based on the first position data and the second position data.
In some embodiments, determining the focusing position in the display screen corresponding to the preset voice coil motor when moving to each preset position includes: and determining the definition of a second position in the image acquired when the preset voice coil motor moves to each preset position, and determining whether the focusing position in the corresponding display picture is the second position when the preset voice coil motor moves to each preset position based on the definition of the second position.
In some embodiments, the in-finder-frame display comprises a tilted view; and the first position and the second position are a position relatively close to the camera and a position relatively far from the camera in the inclined plane in the display screen, respectively.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon; when the one or more programs are executed by the one or more processors, the one or more processors implement the method of capturing an image as described in any of the embodiments of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, which computer program, when executed by a processor, implements the method of capturing an image as described in any of the embodiments of the first aspect.
The method and the device for shooting the image, provided by the embodiment of the disclosure, first acquire a first image acquired by a camera focusing a first position of a display frame in a viewing frame, then adjust the position of a voice coil motor of the camera to focus a second position in the display frame based on position adjustment information of preset voice coil motor movement data acquired in advance, acquire movement second position data of the voice coil motor at the second position of the focusing display frame, which needs to be adjusted, and acquire a second image acquired by focusing the second position, wherein the position adjustment information of the preset voice coil motor comprises the movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display frame, and finally acquire and generate clear images of the first position and the second position based on the first image and the second image, thereby realizing rapid focusing without performing focusing operations twice on the display frame in the viewing frame respectively, the focusing time is shortened, and the focusing efficiency and the shooting efficiency are improved.
Drawings
Other features, objects and advantages of the disclosure will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flow diagram of one embodiment of a method of capturing an image, according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of one application scenario of a method of capturing images according to an embodiment of the present disclosure;
fig. 3 is an exemplary flowchart for obtaining position adjustment information of a preset voice coil motor according to an embodiment of the disclosure;
FIG. 4 is a schematic block diagram of one embodiment of an apparatus for capturing images according to an embodiment of the present disclosure;
FIG. 5 is a schematic structural diagram of an electronic device suitable for use in implementing embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant disclosure and are not limiting of the disclosure. It should be noted that, for the convenience of description, only the parts relevant to the related disclosure are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
With continued reference to FIG. 1, a flow 100 of one embodiment of a method of capturing an image according to the present disclosure is shown. The method for shooting the image comprises the following steps:
step 110, a first image collected from a first position of a display frame in a camera focusing frame is obtained.
In this step, the execution subject on which the method of capturing an image is executed may display a frame in which a picture captured by the camera can be displayed in the screen, and the display picture in the frame may include a picture corresponding to the first position and a picture corresponding to the second position, for example, the picture corresponding to the first position may be a middle-upper half picture in the frame, and the picture corresponding to the second position may be a middle-lower half picture in the frame.
Alternatively, the in-finder display screen may include an oblique screen; pictures in different locations may also be included. The first position and the second position of the display picture in the view finder are respectively a position which is relatively close to the camera and a position which is relatively far away from the camera in the inclined plane in the display picture.
The execution main body displays a display picture in the view-finding frame in the screen, receives a click operation executed by a user on a first position in the display picture, and controls the voice coil motor to move continuously based on a contrast focusing principle, so that the camera focuses on the first position of the display picture in the view-finding frame, and the display picture at the first position is clear. The execution main body acquires a first image acquired by the camera focusing the first position on the basis of focusing the first position of the camera, wherein the first image comprises an image picture with a clear first position and a fuzzy second position.
And step 120, adjusting the position of the voice coil motor of the camera based on the position adjustment information of the preset voice coil motor acquired in advance, so that the camera focuses on the second position in the display picture, and acquiring a second image acquired by focusing on the second position.
In this step, after the execution main body acquires the first image with a clear first position in the display screen, the execution main body acquires position adjustment information of a preset voice coil motor in advance, where the position adjustment information may be used to adjust the position of the preset voice coil motor, and the camera focuses on different positions by adjusting the position of the preset voice coil motor, where the position adjustment information of the preset voice coil motor includes movement data of the preset voice coil motor when the focused position moves from the first position to the second position in the display screen. After the execution main body acquires the position adjustment information of the preset voice coil motor, the position of the voice coil motor of the camera is adjusted according to the position adjustment information, so that the camera focuses on a second position in the display picture, and then a second image acquired by focusing the second position is acquired, wherein the second image comprises an image picture with a clear second position but a fuzzy first position.
In some optional implementations of this embodiment, the pre-obtained position adjustment information of the preset voice coil motor includes: and presetting moving data of the voice coil motor when the focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from the first position to the second position in the display picture. The execution main body can acquire a step length parameter of a voice coil motor of the camera, and position adjustment information of the voice coil motor of the camera is determined based on a proportional relation between the step length parameter of the voice coil motor of the camera and the preset step length parameter and the preset parameter corresponding to the movement data.
Specifically, the execution body stores position adjustment information of a preset voice coil motor in advance, and may store at least one preset step parameter, where each preset step parameter corresponds to a piece of movement data, and the movement data may be movement data of the preset voice coil motor when the focusing position of the camera moves from a first position to a second position in the display screen. The preset moving data corresponding to the voice coil motor can be at least one code value, each voice coil motor is burnt with a step length parameter, the step length parameter represents each code value, and the voice coil motor can output the corresponding moving step length.
The execution main body can locally read or detect and acquire the step length parameter of the voice coil motor of the camera and the preset step length parameter of the preset voice coil motor, and then the execution main body can calculate the proportional relation between the step length parameter of the voice coil motor of the camera and the preset step length parameter according to the step length parameter of the voice coil motor of the camera and the preset step length parameter. The execution main body can obtain position adjustment information of the voice coil motor of the camera according to the proportional relation obtained through calculation and the movement data corresponding to the preset parameters.
As an example, the terminal may locally pre-store a preset step parameter and a mobile code value corresponding to the preset step parameter, and the terminal may adjust the preset voice coil motor according to the mobile code value, so that the camera focusing position is moved from the first position to the second position in the display screen by adjusting the preset voice coil motor. The terminal obtains the step length parameter of the voice coil motor of the camera by detecting the voice coil motor of the camera, compares the step length parameter of the voice coil motor of the camera with the preset step length parameter to obtain the ratio of the step length parameter of the voice coil motor of the camera to the preset step length parameter, and multiplies the ratio by the mobile code value corresponding to the preset step length parameter to obtain the mobile code value of the voice coil motor of the camera to serve as the position adjustment information.
In the implementation mode, based on the position adjustment information of the preset voice coil motor and the step length parameter of the voice coil motor, which are acquired in advance, the movement data corresponding to different voice coil motors can be automatically acquired, and the flexibility and the autonomy of the movement of the voice coil motor are improved.
Step 130, generating an image with clear first and second positions based on the first and second images.
In this step, the execution subject acquires a first image with a clear first position and a blurred second position and a second image with a blurred first position and a clear second position, and performs image synthesis on the first image and the second image by using an image synthesis technique to obtain an image with a clear first position and a clear second position.
With continuing reference to fig. 2, fig. 2 is a schematic diagram of one application scenario of the method of capturing images according to the present embodiment. In the application scenario of fig. 2, the terminal 201 captures an external picture through a camera, and displays a display picture in the view frame through a screen, where the display picture includes an upper half and a lower half, and the camera cannot focus on the upper half and the lower half at the same time. The terminal 201 receives the clicking operation of the user on the upper half part of the view frame, and controls the voice coil motor of the camera to move so that the camera focuses on the upper half part of the display picture. The terminal 201 receives a shooting operation performed by a user, and acquires a first image 202 acquired by focusing the upper half of the display picture by a camera, wherein the upper half of the first image 202 is clear but the lower half of the first image is fuzzy. When the terminal 201 reads a pre-acquired focusing position and moves from a first position to a second position in a display picture, the movement data of the voice coil motor is preset, the movement data that the voice coil motor of the camera needs to move is acquired according to the movement data of the voice coil motor, then the position of the voice coil motor of the camera is adjusted to enable the camera to focus on the lower half portion of the display picture, a second image 203 acquired by the camera focusing on the lower half portion of the display picture is acquired, and the lower half portion of the second image 203 is clear but the lower half portion is fuzzy. Finally, the terminal 201 performs image synthesis on the first image 202 and the second image 203 to generate an image 204 with clear upper and lower portions, and the image 204 is displayed through the screen of the terminal 201.
The method for shooting the image, provided by the embodiment of the disclosure, includes the steps of firstly obtaining a first image collected by a camera focusing a first position of a display frame in a viewing frame, adjusting the position of a voice coil motor of the camera to focus a second position in the display frame based on position adjustment information of preset voice coil motor movement data obtained in advance, obtaining movement second position data of the voice coil motor needing to be adjusted for focusing the second position of the display frame, and obtaining a second image collected by focusing the second position, wherein the position adjustment information of the preset voice coil motor comprises the movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display frame, obtaining and generating images with clear first and second positions based on the first and second images, realizing rapid focusing, and not needing to respectively perform focusing operations twice on the display frame in the viewing frame, the focusing time is shortened, and the focusing efficiency and the shooting efficiency are improved.
In some optional implementations of the present embodiment, the preset position adjustment information of the voice coil motor may be obtained according to the following process 300:
in step 310, first position data of a preset voice coil motor at a first position in a camera focusing display picture is obtained.
In this step, the execution body may train a preset voice coil motor, and the preset voice coil motor is used to drive the camera, so that the camera may focus on a first position of a display frame in the view finder. When the executing body focuses on a first position in the display picture, first position data of the preset voice coil motor is obtained, where the first position data may be step length data, such as a code value, representing that the preset voice coil motor needs to move.
And 320, controlling the preset voice coil motor to move and determining the focusing position in the display picture corresponding to the preset voice coil motor when the preset voice coil motor moves to each preset position, taking the position data of the voice coil motor when the voice coil motor moves to the second position in the focusing display picture as second position data, and determining the position adjustment information of the preset voice coil motor based on the first position data and the second position data.
In this step, after the execution main body acquires the first position data based on the first position in the display frame focused by the camera, the preset voice coil motor is controlled to continuously move to different preset positions based on the first position data, for example, the preset voice coil motor is controlled to respectively move different code values based on the first position data, so that the preset voice coil motor reaches the preset position corresponding to each code value. The execution main body respectively determines the focusing position of the camera in the display picture when the preset voice coil motor moves to each preset position. The execution main body determines a focusing position which is a second position in the display picture by judging each focusing position, takes position data corresponding to the focusing position as second position data, and determines a difference value between the second position data and the first position data as preset position adjustment information of the voice coil motor.
As an example, after the terminal acquires the first position data, on the basis of the first position data, the terminal controls the preset voice coil motor to move by 1 code value, acquires a first focus position of the camera at the moment, then the terminal continues to control the preset voice coil motor to move by 1 code value, the position of the preset voice coil motor differs by 2 code values relative to the first position data at the moment, acquires a second focus position of the camera at the moment, and then the terminal continues to control the preset voice coil motor to move by 1 code value, the position of the preset voice coil motor differs by 3 code values relative to the first position data at the moment, and acquires a third focus position of the camera at the moment. The terminal can determine that the third focusing position is the second position in the focusing display picture from the first focusing position, the second focusing position and the third focusing position by comparing the first focusing position, the second focusing position and the third focusing position, and then the terminal moves the position data corresponding to the third focusing position, namely the position data corresponding to 3 code values on the basis of the first position data, and takes the position data as the second position data. Meanwhile, the terminal can acquire that the difference between the second position data of the preset voice coil motor and the first position data is 3 code values, and the obtained 3 code values are determined as the position adjustment information of the preset voice coil motor.
In this implementation, the voice coil motor is preset through control and is moved to different preset positions, so that the camera can focus different positions in the display picture, and the position adjustment information of the voice coil motor is preset when the camera focuses the preset positions can be determined from the position information, so that the position adjustment information is more accurate.
In some optional implementation manners of the present embodiment, the executing body determines a focusing position in a display screen corresponding to the preset voice coil motor when the preset voice coil motor moves to each preset position, and the method is implemented based on the following steps: the execution main body determines definition of a second position in an image collected when the preset voice coil motor moves to each preset position, and determines whether a focusing position in a corresponding display picture is the second position when the preset voice coil motor moves to each preset position based on the definition of the second position.
Specifically, the execution main body controls the preset voice coil motor to move continuously to different preset positions on the basis of the first position data, and obtains an image acquired after the camera is focused at each preset position, so as to obtain a plurality of images. The executing body may perform sharpness evaluation on the obtained multiple images through an image sharpness evaluation algorithm, or input the obtained multiple images into an image sharpness evaluation model to perform sharpness evaluation, so as to obtain sharpness of the second position in each image, analyze the sharpness of the second position in each image, determine whether the second position in each image is a focused position of the second position in the focused display screen, for example, analyze the sharpness of the second position in each image, determine an image with highest sharpness from the sharpness of the second position in each image, and determine the second position in the image as the focused position of the second position in the focused display screen.
As an example, after the terminal acquires the first position data, on the basis of the first position data, the terminal controls the preset voice coil motor to move by 1 code value, controls the preset voice coil motor to move to a first preset position, so that the camera focuses on the first preset position in the display picture, and acquires a first preset image acquired by the first preset position in the camera focusing display picture; then the terminal continuously controls the preset voice coil motor to move for 1 code value, controls the preset voice coil motor to move to a second preset position, enables the camera to focus on the second preset position in the display picture, and enables the position of the preset voice coil motor to have a difference of 2 code values relative to the first position data at the moment, and the terminal obtains a second preset image collected by the second preset position in the camera focusing display picture; and then the terminal continuously controls the preset voice coil motor to move 1 code value and controls the preset voice coil motor to move to a third preset position, so that the camera focuses on the third preset position in the display picture, the difference between the position of the preset voice coil motor and the first position data is 3 code values, and the terminal acquires a third preset image acquired by the camera focusing on the third preset position in the display picture. The terminal can evaluate the definition of the first preset image, the second preset image and the third preset image through an image definition evaluation algorithm to obtain the first definition of a second position in the first preset image, the second definition of the second position in the second preset image and the third definition of the second position in the third preset image. And the terminal sequences the first definition, the second definition and the third definition, determines the definition with the highest definition, and determines that the focusing position in the display picture corresponding to the image with the highest definition is the second position in the display picture.
In the implementation manner, the focusing position in the display picture is judged by comparing the definition of the second position in the plurality of images, so that the judgment of the focusing position in each image is more accurate, and the focusing position in the display picture determined based on the focusing position in the image is more accurate.
With further reference to fig. 4, as an implementation of the methods illustrated in the above figures, the present disclosure provides one embodiment of an apparatus for capturing an image. This device embodiment corresponds to the method embodiment shown in fig. 1.
As shown in fig. 4, the apparatus 400 for capturing an image of the present embodiment may include: a first acquisition unit 410 configured to acquire a first image captured at a first position of a display screen in a camera focus frame; a second obtaining unit 420 configured to, based on position adjustment information of a preset voice coil motor obtained in advance, adjust a position of the voice coil motor of the camera such that the camera focuses on a second position in the display screen, and obtain a second image acquired by focusing on the second position, wherein the position adjustment information of the preset voice coil motor includes movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display screen; a generating unit 430 configured to generate an image with sharp first and second positions based on the first and second images.
In some optional implementations of the present embodiment, the pre-obtained position adjustment information of the preset voice coil motor includes: presetting moving data of the voice coil motor when a focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from a first position to a second position in a display picture; and a second obtaining unit 420, further configured to: the method comprises the steps of obtaining step length parameters of a voice coil motor of a camera, and determining position adjustment information of the voice coil motor of the camera based on the proportional relation between the step length parameters of the voice coil motor of the camera and preset step length parameters and movement data corresponding to the preset parameters.
In some optional implementations of the present implementation, the preset position adjustment information of the voice coil motor is obtained by: acquiring first position data of a preset voice coil motor at a first position in a camera focusing display picture; and controlling the preset voice coil motor to move, determining focusing positions in the display picture corresponding to the preset voice coil motor when the preset voice coil motor moves to the preset positions, taking position data of the voice coil motor when the voice coil motor moves to a second position in the focusing display picture as second position data, and determining position adjustment information of the preset voice coil motor based on the first position data and the second position data.
In some optional implementations of the present embodiment, determining a focusing position in a display screen corresponding to a preset voice coil motor when the preset voice coil motor moves to each preset position includes: and determining the definition of a second position in the image acquired when the preset voice coil motor moves to each preset position, and determining whether the focusing position in the corresponding display picture is the second position when the preset voice coil motor moves to each preset position based on the definition of the second position.
In some optional implementations of the present implementation, the display in the viewfinder frame includes an oblique screen; and the first position and the second position are a position relatively close to the camera and a position relatively far from the camera in the inclined plane in the display screen, respectively.
The device provided by the above embodiment of the present disclosure first obtains a first image collected by a camera focusing a first position of a display frame in a viewing frame, adjusts a position of a voice coil motor of the camera to focus a second position in the display frame based on position adjustment information of preset voice coil motor movement data obtained first in advance, obtains moving second position data of the voice coil motor of the second position of the focusing display frame, which needs to be adjusted, and obtains a second image collected by focusing the second position, wherein the position adjustment information of the preset voice coil motor includes the movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display frame, and obtains and generates clear images of the first position and the second position based on the first image and the second image, thereby realizing rapid focusing without performing focusing operations on the display frame in the viewing frame twice respectively, the focusing time is shortened, and the focusing efficiency and the shooting efficiency are improved.
As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium of the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a first image acquired at a first position of a display picture in a camera focusing view-finding frame; based on the position adjustment information of the preset voice coil motor, which is acquired in advance, the position of the voice coil motor of the camera is adjusted to enable the camera to focus on a second position in the display picture, and a second image acquired by focusing on the second position is acquired, wherein the position adjustment information of the preset voice coil motor comprises movement data of the preset voice coil motor when the focusing position moves from the first position to the second position in the display picture; and generating an image with clear first and second positions based on the first and second images.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a first acquisition unit, a second acquisition unit, and a generation unit. The names of these units do not in some cases constitute a limitation on the unit itself, and for example, the first acquisition unit may also be described as a "unit that acquires a first image acquired at a first position of a display screen in a camera focus finder".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (12)

1. A method of capturing an image, comprising:
acquiring a first image acquired at a first position of a display picture in a camera focusing view-finding frame;
based on position adjustment information of a preset voice coil motor, which is acquired in advance, adjusting the position of the voice coil motor of the camera to enable the camera to focus on a second position in the display picture, and acquiring a second image acquired by focusing on the second position, wherein the position adjustment information of the preset voice coil motor comprises movement data of the preset voice coil motor when the focusing position moves from a first position to a second position in the display picture;
and generating an image with clear first and second positions based on the first and second images.
2. The method of claim 1, wherein the pre-obtained position adjustment information of the preset voice coil motor comprises: presetting moving data of the voice coil motor when a focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from a first position to a second position in a display picture; and
the adjusting the position of the voice coil motor of the camera based on the pre-acquired position adjustment information of the preset voice coil motor to enable the camera to focus on a second position in the display picture comprises:
acquiring the step size parameter of the voice coil motor of the camera, and determining the position adjustment information of the voice coil motor of the camera based on the proportional relation between the step size parameter of the voice coil motor of the camera and the preset step size parameter and the movement data corresponding to the preset parameter.
3. The method of claim 2, wherein the position adjustment information of the preset voice coil motor is obtained by:
acquiring first position data of the preset voice coil motor at a first position in a camera focusing display picture;
and controlling the preset voice coil motor to move and determining the focusing position in the corresponding display picture when the preset voice coil motor moves to each preset position, taking the position data when the voice coil motor moves to the second position in the focusing display picture as second position data, and determining the position adjusting information of the preset voice coil motor based on the first position data and the second position data.
4. The method of claim 3, wherein the determining the focus position in the display screen corresponding to the preset voice coil motor when moving to the respective preset position comprises:
determining the definition of the second position in the image collected when the preset voice coil motor moves to each preset position, and determining whether the focusing position in the corresponding display picture of the preset voice coil motor when the preset voice coil motor moves to each preset position is the second position or not based on the definition of the second position.
5. The method of any of claims 1-4, wherein the display in the viewfinder frame includes a tilted view; and the first position and the second position are a position relatively close to the camera and a position relatively far away from the camera in the inclined plane in the display screen, respectively.
6. An apparatus for capturing an image, comprising:
a first acquisition unit configured to acquire a first image captured at a first position of a display screen in a camera focus finder frame;
a second obtaining unit configured to, based on position adjustment information of a preset voice coil motor obtained in advance, adjust a position of the voice coil motor of the camera so that the camera focuses on a second position in the display screen, and obtain a second image acquired by focusing on the second position, wherein the position adjustment information of the preset voice coil motor includes movement data of the preset voice coil motor when the focused position moves from the first position to the second position in the display screen;
a generating unit configured to generate an image with sharp first and second positions based on the first and second images.
7. The apparatus of claim 6, wherein the pre-obtained position adjustment information of the preset voice coil motor comprises: presetting moving data of the voice coil motor when a focusing position corresponding to at least one preset step length parameter of the voice coil motor in a one-to-one mode moves from a first position to a second position in a display picture; and
the second obtaining unit is further configured to: acquiring the step size parameter of the voice coil motor of the camera, and determining the position adjustment information of the voice coil motor of the camera based on the proportional relation between the step size parameter of the voice coil motor of the camera and the preset step size parameter and the movement data corresponding to the preset parameter.
8. The apparatus of claim 7, wherein the position adjustment information of the preset voice coil motor is obtained by:
acquiring first position data of the preset voice coil motor at a first position in a camera focusing display picture;
and controlling the preset voice coil motor to move and determining the focusing position in the corresponding display picture when the preset voice coil motor moves to each preset position, taking the position data when the voice coil motor moves to the second position in the focusing display picture as second position data, and determining the position adjusting information of the preset voice coil motor based on the first position data and the second position data.
9. The apparatus of claim 8, wherein the determining the focus position in the display screen corresponding to the preset voice coil motor when moving to each preset position comprises:
determining the definition of the second position in the image collected when the preset voice coil motor moves to each preset position, and determining whether the focusing position in the corresponding display picture of the preset voice coil motor when the preset voice coil motor moves to each preset position is the second position or not based on the definition of the second position.
10. The apparatus according to any one of claims 6-9, wherein the frame in the frame comprises a tilted frame; and the first position and the second position are a position relatively close to the camera and a position relatively far away from the camera in the inclined plane in the display screen, respectively.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-5.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202010603432.7A 2020-06-29 2020-06-29 Method and device for shooting image Pending CN113938596A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010603432.7A CN113938596A (en) 2020-06-29 2020-06-29 Method and device for shooting image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010603432.7A CN113938596A (en) 2020-06-29 2020-06-29 Method and device for shooting image

Publications (1)

Publication Number Publication Date
CN113938596A true CN113938596A (en) 2022-01-14

Family

ID=79272725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010603432.7A Pending CN113938596A (en) 2020-06-29 2020-06-29 Method and device for shooting image

Country Status (1)

Country Link
CN (1) CN113938596A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055872A (en) * 2022-08-31 2023-05-02 荣耀终端有限公司 Image acquisition method, electronic device, and computer-readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201037447A (en) * 2009-04-03 2010-10-16 Hon Hai Prec Ind Co Ltd Imaging device and focusing method thereof
CN104506767A (en) * 2014-11-27 2015-04-08 惠州Tcl移动通信有限公司 Method for generating different focal lengths of same scene by using continuous movement of motor and terminal
CN105827945A (en) * 2015-11-25 2016-08-03 维沃移动通信有限公司 Real-time focusing method and mobile terminal
CN106791373A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Focusing process method, device and terminal device
CN107426490A (en) * 2017-05-16 2017-12-01 深圳市金立通信设备有限公司 A kind of photographic method and terminal
CN110336951A (en) * 2019-08-26 2019-10-15 厦门美图之家科技有限公司 Contrast formula focusing method, device and electronic equipment
US20200125831A1 (en) * 2017-06-16 2020-04-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Focusing method, device and computer apparatus for realizing clear human face

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201037447A (en) * 2009-04-03 2010-10-16 Hon Hai Prec Ind Co Ltd Imaging device and focusing method thereof
CN104506767A (en) * 2014-11-27 2015-04-08 惠州Tcl移动通信有限公司 Method for generating different focal lengths of same scene by using continuous movement of motor and terminal
CN105827945A (en) * 2015-11-25 2016-08-03 维沃移动通信有限公司 Real-time focusing method and mobile terminal
CN106791373A (en) * 2016-11-29 2017-05-31 广东欧珀移动通信有限公司 Focusing process method, device and terminal device
CN107426490A (en) * 2017-05-16 2017-12-01 深圳市金立通信设备有限公司 A kind of photographic method and terminal
US20200125831A1 (en) * 2017-06-16 2020-04-23 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Focusing method, device and computer apparatus for realizing clear human face
CN110336951A (en) * 2019-08-26 2019-10-15 厦门美图之家科技有限公司 Contrast formula focusing method, device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116055872A (en) * 2022-08-31 2023-05-02 荣耀终端有限公司 Image acquisition method, electronic device, and computer-readable storage medium
CN116055872B (en) * 2022-08-31 2024-04-05 荣耀终端有限公司 Image acquisition method, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US11544820B2 (en) Video repair method and apparatus, and storage medium
US11481975B2 (en) Image processing method and apparatus, electronic device, and computer-readable storage medium
US9742995B2 (en) Receiver-controlled panoramic view video share
KR20220130197A (en) Filming method, apparatus, electronic equipment and storage medium
US9759994B1 (en) Automatic projection focusing
CN109472738B (en) Image illumination correction method and device, electronic equipment and storage medium
EP4294031A2 (en) Automatic generation of all-in-focus images with a mobile camera
JPWO2016125372A1 (en) Tracking system, terminal device, camera device, tracking shooting method and program
CN110928509B (en) Display control method, display control device, storage medium, and communication terminal
CN104038694A (en) Method and device for displaying panoramic image
CN113938596A (en) Method and device for shooting image
CN114125411A (en) Projection equipment correction method and device, storage medium and projection equipment
CN117544856A (en) Target tracking method, device, electronic equipment and readable storage medium
CN111385460A (en) Image processing method and device
CN111263115B (en) Method, apparatus, electronic device, and computer-readable medium for presenting images
KR101670247B1 (en) System for magnifying-moving object using one click of cctv real-time image and method therefor
US20180041679A1 (en) System and methods for variable image capture
CN114897688A (en) Video processing method, video processing device, computer equipment and medium
US8054332B2 (en) Advanced input controller for multimedia processing
CN111782050B (en) Image processing method and apparatus, storage medium, and electronic device
CN112004022B (en) Method and device for generating shooting prompt information
CN115767257A (en) Shooting method and device, electronic equipment and storage medium
CN113724382A (en) Map generation method and device and electronic equipment
JP2021124671A (en) Image processing device, imaging apparatus, image processing method, and program
CN114157848A (en) Projection equipment correction method and device, storage medium and projection equipment

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