WO2022213339A1 - Focusing method, photographing device, photographing system, and readable storage medium - Google Patents

Focusing method, photographing device, photographing system, and readable storage medium Download PDF

Info

Publication number
WO2022213339A1
WO2022213339A1 PCT/CN2021/086072 CN2021086072W WO2022213339A1 WO 2022213339 A1 WO2022213339 A1 WO 2022213339A1 CN 2021086072 W CN2021086072 W CN 2021086072W WO 2022213339 A1 WO2022213339 A1 WO 2022213339A1
Authority
WO
WIPO (PCT)
Prior art keywords
state
lens position
threshold range
photographing device
lens
Prior art date
Application number
PCT/CN2021/086072
Other languages
French (fr)
Chinese (zh)
Inventor
滕文猛
韩守谦
胡涛
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2021/086072 priority Critical patent/WO2022213339A1/en
Publication of WO2022213339A1 publication Critical patent/WO2022213339A1/en

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

Definitions

  • the present application generally relates to the field of focusing, and more particularly, to a focusing method, a photographing device, a photographing system, and a readable storage medium.
  • SLR cameras can use an independent phase sensor to assist manual focusing
  • some mirrorless cameras can use built-in Phase Detection (PD) pixels.
  • PD Phase Detection
  • the image sensor assists manual focusing
  • some movie cameras also have high-end PD technology to assist manual focusing.
  • PD sensors perform poorly in low-light environments and low-contrast environments, and the more PD pixels, the better the focusing performance, and the better the image quality. the worse.
  • a first aspect of the embodiments of the present application provides a focusing method, the method includes: acquiring a first lens position and a second lens position for enabling a shooting target to be in a focus state in a shooting picture of a shooting device, wherein, The first lens position is determined based on a first focusing method, the second lens position is determined based on a second focusing method, and the first focusing method is different from the second focusing method; the focusing method is determined based on a preset rule , and focus the photographing device based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on one of the first lens position and the second lens position Focusing on the photographing device, or focusing on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method, wherein the first lens position The three focusing method is different from the first focusing method and the second focusing method.
  • a second aspect of the embodiments of the present application provides a photographing device, and the photographing device includes:
  • At least one processor the at least one processor executes the computer-executed instructions stored in the memory, so that the following steps are implemented when executing the computer-executed instructions:
  • the first lens position is based on a first focusing method
  • a focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and the One of the second lens positions focuses the photographing device, or the photographing device is focused on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
  • a third aspect of an embodiment of the present application provides a shooting system, including: a pan/tilt and the shooting device described in the third aspect; the pan/tilt is used to carry the shooting device.
  • a fourth aspect of the embodiments of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium; when the computer program is executed, the focusing method as described above is implemented.
  • the present application provides a focusing method, a photographing device, a photographing system, and a readable storage medium.
  • a focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and all the focusing on the photographing device based on one of the second lens positions, or focusing on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method Focusing is performed, wherein the first focusing method, the second focusing method and the third focusing method are different focusing methods.
  • the focusing method of the present application does not depend on the performance of the image sensor, and can realize the Fast focusing, and the focusing method of the present application does not need to use PD pixels, so for the image sensor, the quality of the captured picture will not be affected in the slightest. Accuracy and effectiveness of focusing methods.
  • FIG. 1 shows a schematic structural diagram of a photographing system provided by an embodiment of the present application
  • FIG. 2 shows a schematic diagram of a focusing process in a second focusing method provided by an embodiment of the present application
  • FIG. 3 shows a schematic flowchart of a focusing method in an embodiment of the present application
  • FIG. 4 shows a schematic flowchart of a focusing method in another embodiment of the present application
  • FIG. 5 shows a schematic structural diagram of a photographing device in another embodiment of the present application.
  • a first aspect of the present application provides a focusing method. As shown in FIG. 3 , the method 200 includes:
  • Step S201 Acquire a first lens position and a second lens position for enabling the shooting target to be in an in-focus state in the shooting picture of the shooting device, wherein the first lens position is determined based on the first focusing method, the The second lens position is determined based on a second focusing method, and the first focusing method is different from the second focusing method;
  • Step S202 Determine a focusing mode based on a preset rule, and focus the photographing device based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and one of the second lens positions to focus the photographing device, or based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method
  • the photographing device performs focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
  • the photographing device can operate independently as the execution subject, and can also be set on the gimbal, and the gimbal is used as the carrying subject for shooting.
  • the photographing system may include a distance sensor 110 and a photographing device 130 .
  • the distance sensor 110 includes a transmitting device 111, a receiving device 112 and a control device 113, which are used to control the transmitting device 111 to transmit an optical signal through the control device 113, and receive the reflected optical signal through the receiving device 112, so as to collect distance sensing data,
  • the real-time distance between the photographing target and the photographing device 130 is obtained according to the distance sensing data.
  • the receiving device 112 may be a receiving array.
  • the sensing data collected by the distance sensor 110 may include the measured distances M between the distance sensor 110 and the shooting target corresponding to different sampling moments.
  • the real-time distance between the photographing target and the photographing device 130 can be determined according to M and L.
  • the real-time distance between the shooting device 130 and the shooting target is the value M-L obtained by subtracting the distance difference L from the measured distance M .
  • the calculation and processing of the real-time distance may be performed by the distance sensor 110, the photographing device 130 or the pan/tilt head, which is not limited in this embodiment.
  • the photographing system may further include a follow focus motor 120, the follow focus motor 120 is an actuator that drives the rotation of the lens 131 of the photographing device 130, and includes a position controller 121 and a gear, the position controller 121 is used for according to the follow focus motor.
  • the follow focus motor 120 is engaged with a follow focus ring of the lens 131 in the photographing device 130 .
  • the focus wheel 140 may be an independent control device, or may be integrated on the PTZ.
  • the follow focus motor 120 is connected in communication with the gimbal, and is used for receiving a user's control instruction for the follow focus motor 120 .
  • the operating member of the follow focus motor 120 can be provided on the hand-held part of the gimbal, and the operating member is used to receive a user's control command for the follow focus motor and further drive the follow focus motor according to the control command, so as to control the photographing device 130 to focus.
  • the operating member may include, but is not limited to, the focus wheel 140 .
  • the photographing device 130 includes a lens 131 and a camera body 132 , and the lens 131 is provided on the camera body 132 .
  • the photographing device 130 can photograph the photographing target to obtain an image.
  • the camera body 132 may be a camera body of a handheld single-lens reflex camera or a mirrorless camera.
  • the lens 131 in this embodiment can support manual focus and automatic focus.
  • the photographing system may further include a pan/tilt head.
  • the photographing device 130 and the follow focus motor 120 are carried on the gimbal.
  • the follow focus motor 120 and the bottom of the camera body 132 can be fixedly connected by using the accessories of the gimbal. After the lens 131 is mounted on the camera body 132 through the bayonet, the follow focus motor 120 can drive the lens 131 to rotate through the follow focus ring.
  • the photographing system may further include a follow focus wheel 140 , and the follow focus wheel 140 can push the current rotational position and rotational speed data of the follow focus wheel 140 to the follow focus motor 120 , so that the follow focus motor 120 rotates to the same level as the follow focus wheel 140 . the corresponding specified location.
  • parameters can be calibrated, for example, the follow focus motor 120 can be driven by the follow focus wheel 140 to reach at least two focus calibration points, so as to complete the mapping between the real-time distance between the shooting device 130 and the shooting target and the rotation position of the follow focus motor 120 Calibration of the relationship.
  • the photographing system includes a display device 150 for displaying pictures shot by the photographing equipment, such as a live view picture, a setting interface of the photographing equipment, etc., and can also be used for displaying various prompt information, such as prompt information on completion of focusing.
  • a display device 150 for displaying pictures shot by the photographing equipment, such as a live view picture, a setting interface of the photographing equipment, etc., and can also be used for displaying various prompt information, such as prompt information on completion of focusing.
  • the display device 150 may be provided in the photographing device 130, for example, an interactive interface inherent in the photographing device 130 for displaying various information, and various visual information, such as real-time information, are directly displayed to the user through the interactive interface during the photographing process.
  • a viewfinder screen, a setting interface of a photographing device, etc. for another example, in response to a user's instruction for selecting a region of interest, a selection frame of the region of interest is displayed, and the like.
  • the display device may be provided outside the photographing device 130, independent of the photographing device 130, but connected in communication with the photographing device 130, and transmits the framing image of the photographing device 130 to the display device through the communication connection and displays it to the user Framing the image.
  • the display device 150 may also be disposed on the pan/tilt, such as a handheld part integrated in the pan/tilt.
  • the display device 150 is detachably arranged on the mounting seat of the pan/tilt (eg, connected to the handle), and the display device 150 is connected in communication with the pan/tilt, and the photographing device 130 is connected in communication with the pan/tilt, and the photographing device 130 obtains the collected image information.
  • the information to be displayed to the user is transmitted to the PTZ, and the PTZ then transmits the information to be displayed to the user to the display device 150 and displays it to the user through the display device 150 for focusing.
  • the display device 150 is not limited to the listed installation positions, and the display device 150 may also be installed at other positions of the pan/tilt.
  • the photographing device 130 in addition to manual focusing, can also focus automatically. Based on this, the user can also select a mode by inputting a selection instruction on the display device 150 and switch the auto follow focus mode to the manual follow focus mode, thereby realizing flexible switching between the manual follow focus mode and the automatic follow focus mode.
  • the focus can be achieved by using the follow focus wheel 140 to control the position of the follow focus motor 120, or by directly manually rotating the position of the lens to focus.
  • the follow focus motor 120 can obtain a user's control instruction for the follow focus motor 120; and drive the follow focus motor 120 according to the control instruction, output torque, and drive and follow focus through gear transmission
  • the lens that engages the camera's motor is focused so that the subject is in focus in the shooting device's frame.
  • the photographing system may also not include the follow focus motor 120, but manually move the lens, so that the current lens position is manually adjusted to the target lens position by the user, thereby achieving focusing .
  • the follow focus wheel 140 can be controlled by the processor, and the follow focus wheel 140 can control the position of the follow focus motor 120 to automatically focus, or the lens of the photographing device is coupled with a follow focus motor, and the follow focus motor The motor is used to drive the lens of the photographing device to rotate, so as to focus.
  • the photographing device 130 may not be provided on the pan/tilt, and the focusing method of the present application can be implemented independently by the photographing device 130, wherein the composition and operation method of the photographing device 130 herein are not carried on the pan/tilt and are not carried by the photographing device 130. Under the premise of contradicting each other, all relevant explanations and descriptions may be introduced into the photographing device 130 , which will not be repeated here.
  • the execution subject of the focusing method may be a processing device with independent computing capabilities, such as the follow focus motor 120, the distance sensor 110, the photographing device 130 or the pan/tilt in the embodiment shown in FIG. 1 .
  • the method can also be performed by one device to perform some steps, and another device to perform other steps, that is, it can be performed by any combination of the follow focus motor 120, the distance sensor 110, the photographing device 130 and the pan/tilt head, for example, to follow focus Taking the combination of the follower motor 120 and the pan/tilt as an example, the follow focus motor 120 may perform some steps, and the pan/tilt may perform the remaining steps, so that the follow focus motor 120 and the pan/tilt jointly perform the focusing method provided in this embodiment.
  • the follow focus motor 120 can be engaged with the follow focus ring of the lens 131 in the photographing device 130, and then the follow focus motor 120 can be determined according to the current position of the follow focus motor 120.
  • the current position of the lens of the photographing device 130 is determined.
  • the current position of the follow focus motor 120 can be detected by an angle sensor.
  • the current lens position of the photographing device can also be determined in other ways, for example, it can be calculated according to the current focusing degree, and the focusing degree can be determined according to a specific focusing method.
  • the first lens position and the second lens position of the photographing device 130 refer to the possible in-focus positions of the lens of the photographing device 130, that is, when the photographing device 130 is at the first lens position or the second lens position, the shooting target is in the photographing device
  • the 130 shots are expected to be in focus.
  • the acquiring the first lens position and the second lens position used to enable the shooting target to be in focus in the shooting picture of the shooting device further includes: responding to an interest input by the user through a user interface interface
  • the region selection instruction obtains the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, wherein the shooting target is included in the region of interest.
  • a selection box of the region of interest such as a box, may also be displayed on the user interface.
  • the photographing device can also automatically determine the region of interest.
  • the first lens position is determined based on the first focusing method
  • the second lens position is determined based on the second focusing method
  • the first focusing method is different from the second focusing method.
  • the first lens position and the second lens position may have different confidences, that is, the first lens position has the first confidence.
  • the second lens position has a second confidence level.
  • the confidence level may be used to characterize the accuracy of the determined lens position, that is, the first confidence level may be used to characterize the determined accuracy of the first lens position, and the second confidence level may be used to characterize the determined accuracy of the first lens position The accuracy of the second lens position.
  • the photographing target refers to an object to be photographed and imaged, such as a person, an object, a scene, and the like.
  • the camera body generally marks the position of the focal plane, and the real-time distance between the photographing device 130 and the photographing target can be the distance between the focal plane of the camera body of the photographing device 130 and the photographing target, represented by d, so d is equal to the object distance u and the image distance v can be expressed as:
  • the image distance and the object distance satisfy the Gaussian imaging formula:
  • the first focusing method is, for example, a three-dimensional time of flight (TOF) focusing method
  • determining the position of the first lens based on the first focusing method includes: using the distance sensor 110 Determine the distance d between the shooting target and the shooting device 130; calculate the focus object distance according to the distance d; then calculate the target image distance according to the focus object distance according to formulas (2) and (3), and determine the first lens position according to the target image distance .
  • TOF time of flight
  • the installation positions of the distance sensor 110 can be various, as long as the real-time distance between the photographing device 130 and the photographing target can be determined according to the sensing data collected by the distance sensor 110 .
  • the distance sensor 110 is detachably provided on the photographing device 130 .
  • the distance sensor 110 may be disposed on the hot shoe of the photographing device 130.
  • the ranging reference plane of the distance sensor 110 and the focal plane of the lens of the photographing device 130 may be substantially coincident within a certain error range.
  • the distance measuring reference plane of the distance sensor 110 can also be installed at a fixed distance from the focal plane of the lens of the photographing device 130, as long as the fixed distance is taken into account in subsequent calculations.
  • the photographing device The real-time distance between 130 and the shooting target is the value M-L obtained by subtracting L from the measured distance M of the distance sensor 110 . This embodiment does not limit this.
  • the photographing device 130 is detachably carried on the bearing seat of the gimbal
  • the distance sensor 110 is detachably carried on the bearing seat of the gimbal.
  • both the photographing device 130 and the distance sensor 110 are carried by the pan/tilt.
  • the balance adjustment function of the pan/tilt can be used to ensure the balance of the photographing device 130, and on the other hand, the photographing device 130 and the distance sensor 110 can be ensured.
  • the distance sensor 110 can be set relatively fixedly, so as to realize the accurate calculation of the real-time distance between the above-mentioned photographing device 130 and the photographing target.
  • the shooting target in this embodiment may be selected by the user.
  • the specific selection method is that the photographing device 130 is detachably carried on the bearing seat of the gimbal, the gimbal is communicatively connected to the photographing device 130, the display device 150 is provided on the hand-held part of the gimbal, and the photographing target is Determined by detecting the user's selection operation on the display device 150 that displays the captured image of the photographing device 130 , for example, by detecting the user's clicking and selecting operation on an area of interest in the live view screen displayed by the display device of the photographing device to obtain the selection instruction .
  • the acquired pixel coordinates of the region of interest (for example, the photographing target) can also be passed through a predetermined position.
  • the key to conversion is to convert the location information of the region of interest in the coordinate system of the shooting device into the location information in the TOF coordinate system, and then control the ranging area of the distance sensor to achieve ranging.
  • the distance sensor 110 includes a transmitting device for transmitting optical signals and a receiving device for receiving optical signals reflected by the photographing target.
  • the distance between the photographing device 130 and the photographing target is obtained according to the sensing data collected by the distance sensor 110 .
  • the real-time distance includes: determining the distance between the shooting target and the shooting device 130 according to the light signal received by the receiving device.
  • the distance sensor 110 may further include a transmitting device for emitting optical signals and a receiving device for receiving optical signals emitted by the photographing target.
  • the photographing device 130 and the photographing target are acquired according to the sensing data collected by the distance sensor 110 .
  • the real-time distance between them includes: determining the distance between the photographing target and the photographing device 130 according to the acoustic signal received by the receiving device.
  • the distance sensor 110 can be a single-point ranging sensor or a 3D ranging sensor, and the distance sensor 110 can be a TOF (Time Of Flight, time-of-flight) ranging sensor. This embodiment does not limit this.
  • the focus or follow focus of the lens generally keeps the position of the shooting target and the position of the focal plane of the camera body of the shooting device 130 unchanged.
  • the thread converts the rotation angle of rotation into the forward and backward translation distance of the lens group of the lens, which is equivalent to driving the lens manually or with the follow focus motor 120 under the condition that the real-time distance between the shooting device 130 and the shooting target remains unchanged. Rotate to adjust the object distance u and image distance v so that the shooting screen is in focus.
  • the effect will not be affected in low light or low contrast environments.
  • CMOS with phase sensor or CMOS with phase ranging more pixels, better focusing performance, but the image quality will be worse
  • the first confidence level is positively correlated with the signal-to-noise ratio of the collected data of the distance sensor 110, that is, the smaller the distortion caused by the noise of the distance sensor 110, the greater the reflected light intensity of the distance sensor 110, and the higher the signal-to-noise ratio of the distance sensor 110.
  • the higher the first confidence level the higher the first confidence level.
  • the second focusing method is an ambiguity-based focusing method, and the method uses a point spread function (PSF) to focus, and the point spread function (PSF) is a function describing the ability of an optical system to resolve a point source. Because the point source will form an enlarged image point due to diffraction after passing through any optical system, the image information can be extracted more accurately by measuring the point spread function of the system.
  • PSF point spread function
  • the blur-based focusing method is to calculate the focusing curve according to different images captured at different focusing positions and their respective blur degrees (for example, represented by PSF), and then obtain the focusing positions.
  • Picture0 is the ideal picture in the in-focus state
  • Picture1 is the image captured at the first position
  • PSF1 is the first blur of the lens when the target is captured at the first position
  • Picture2 is captured at the second position
  • PSF2 is the second blur degree of the lens when shooting the target at the second position
  • PSF1 (d) and PSF2 (d) are the blur degrees calibrated to the lens of the shooting device 130 on the focusing stroke, that is, the PSF database ambiguity in .
  • the shooting position of the shooting device 130 is calibrated on the focusing stroke, and different shooting positions correspond to different image blur degrees. Therefore, when focusing, the shooting device 130 can be controlled to shoot the shooting target at the first position and the second position respectively, and the first position is different from the second position; and the first position of the lens when shooting the shooting target at the first position can be obtained. a blur degree, and the second blur degree of the lens when the shooting target is photographed at the second position; then, the second lens position is determined according to the acquired first blur degree and the second blur degree.
  • determining the second lens position according to the first blurriness degree and the second blurriness degree includes: determining a curve for focusing according to the first blurriness degree and the second blurriness degree; then determining the second lens position according to the curve lens position.
  • the position corresponding to the vertex in the curve is the position of the second lens.
  • the first ambiguity and the second ambiguity can be obtained by using the content corresponding to the above formula, and the method for determining the curve used for focusing according to the ambiguity can refer to the prior art, which will not be repeated here.
  • the second lens position in addition to determining the target lens position through a curve, can also be obtained by obtaining a focusing data table and looking up the table, and the above focusing method is only exemplary.
  • the second focusing method has a second confidence level, and the second confidence level is positively correlated with the curvature of the curve, that is, the larger the curvature of the focusing curve, the smaller the opening degree, the higher the second confidence level, on the contrary, the smaller the curvature of the focusing curve is. , the greater the degree of opening, the lower the second confidence.
  • the determining the focusing mode based on the preset rule includes: acquiring a first confidence level of the first lens position and a second confidence level of the second lens position; The confidence level and the threshold range to which the second confidence level with a higher confidence level belongs is used to determine the focusing mode.
  • the threshold range to which the higher confidence level of the confidence level and the second confidence level belong, and determining the focusing mode includes: normalizing the first confidence level and the second confidence level; The first confidence level after the normalization process and the threshold range to which the second confidence level after the normalization process has a higher confidence level belong to, determine the focusing mode, and use the normalization process to be used for Under the same unit measure, the first confidence level and the second confidence level are compared to determine the higher confidence level of the first shot position and the second shot position.
  • the first confidence level and the second confidence level may be normalized by any suitable method.
  • the first confidence level and the second confidence level are calibrated first, and the , when the ground truth is known, test the first lens position and the first confidence of the first focusing method, and the second lens position and second confidence of the second focusing method, so that the confidences are aligned, to compare.
  • the determining the focusing mode based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs further comprising: comparing the first confidence level and the second confidence level The second confidence level is normalized; according to the shooting scene of the shooting device, the first weight of the first confidence level and the second weight of the second confidence level are determined; The weight determines the final first confidence level, and the final second confidence level is determined by the normalized second confidence level and the second weight, based on the final first confidence level and the final second confidence level.
  • the first weight of the first confidence level and the second weight of the second confidence level are determined according to the shooting scene of the shooting device.
  • the first weight assigned to the first confidence level is greater than the second weight assigned to the second confidence level.
  • the shooting distance between the shooting target and the shooting device is less than or equal to the threshold distance, for example, the shooting distance is less than or equal to 1.5m , for example, between 0.5m and 1.5m, and further, when it is less than or equal to 1m, for example, when the shooting distance is approximately 1m, the first weight assigned to the first confidence level is smaller than the second weight assigned to the second confidence level .
  • the final first confidence degree is determined by the normalized first confidence degree and the first weight
  • the final second confidence degree is determined by the normalized second confidence degree and the second weight
  • the final The first confidence level is compared with the final second confidence level, and the higher confidence level of the two is determined, and then the threshold range to which the higher confidence level belongs, and the focusing mode is determined.
  • each frame of image information will correspondingly output a first lens position and a first confidence level and a second lens position and a second confidence level, so as to determine which focusing method to focus on.
  • the focusing mode is determined based on a threshold range to which the first confidence level and the second confidence level with a higher confidence level belong, where the threshold range can be reasonably set according to actual needs, for example,
  • the threshold range may include a first threshold range, a second threshold range, a third threshold range, and a fourth threshold range, wherein the first threshold range is greater than the second threshold range, the second threshold range is greater than the third threshold range, and the third threshold range greater than the fourth threshold range, for example, the first threshold range is greater than 90%, the second threshold range is less than or equal to 90% and greater than 70%, the third threshold range is less than or equal to 70% and greater than or equal to 50%, the The fourth threshold range is less than 50%.
  • the photographing device when the person with the higher confidence level is within the first threshold range, focusing on the photographing device based on the first lens position or the second lens position corresponding to the person with the higher confidence degree, including: When the state machine is triggered to switch from the current state to the target state in response to the higher confidence being within the range of the first threshold, the first lens position or the second lens position corresponding to the higher confidence
  • the photographing device focuses, optionally, the current state includes a first state, a second state or a third state, wherein the first state is before the second state, and the second state is before the second state before the third state.
  • the position within the first threshold value indicates that the position of the first lens position or the second lens position corresponding to the one with higher confidence is relatively accurate
  • the position of the first lens or the second lens corresponding to the one with higher confidence is directly used.
  • the lens of the shooting device can be in focus, so that the focusing can be achieved quickly and accurately.
  • the state machine in the focusing process may include multiple states, such as a first state, a second state, a third state, a fourth state, and a target state.
  • the first state precedes the second state, and the second state Before the third state, the third state is before the fourth state, and the fourth state is before the target state.
  • the first state may be the initialization of the preparation phase (AF prepare init), the preparation phase (AF prepare main), the second state is, for example, the initialization of the coarse search stage (AF coarse init), the operation of the coarse search stage (AF coarse main), and the third state is, for example, the initialization of the fine search stage (AF fine init) .
  • the fourth state is, for example, the operation of the fine search phase (AF fine main) and the final focus (GoToPeak).
  • the above-mentioned division manner of the state machine is only an example, and other suitable state machines can also be applied to the present application.
  • determining the focusing mode based on a threshold range where the higher one of the first confidence level and the second confidence level is located includes: when the higher confidence level is within a second threshold range When inside, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the one with the higher confidence, and then perform the shooting of the shooting device based on the third lens position determined by the third focusing method. Focus.
  • the state machine when the state machine is triggered to switch from the current state to the third state (such as the initialization of the fine search stage) in response to the higher confidence being within the second threshold range, first control the lens of the photographing device to move to The first lens position or the second lens position corresponding to the one with a higher degree of confidence, and then focus on the shooting device based on the third lens position determined by the third focusing method, and the current state includes the first state (for example, ready to use). initialization of a stage) or a second state (eg, initialization of a coarse search stage), wherein the first state precedes the second state and the second state precedes the third state.
  • the third state such as the initialization of the fine search stage
  • the lens position can be made close to the in-focus position, and then the third focusing method is used for fine adjustment, so as to be faster And accurately determine the position of the third lens that matches the in-focus position, so as to achieve fast and accurate focusing.
  • determining the position of the third lens based on the third focusing method includes: driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the first direction The two directions are opposite directions; the image data information obtained by the lens at each position is acquired; the third lens position is determined based on the clarity of each image data information, wherein the third lens position is used to enable the shooting target to be able to In focus on the shooting screen of the shooting device.
  • the determining the third lens position based on the sharpness of each image data information includes: determining a first curve for focusing based on the sharpness of each image data information; determining the first curve based on the first curve.
  • the third lens position is the lens position corresponding to the image data information with the highest definition in each image data information, that is, the lens position corresponding to the vertex of the first curve.
  • the first direction and the second direction are parallel to the optical axis of the lens of the photographing device, or the first direction and the second direction and the optical axis of the lens of the photographing device coincide.
  • the third focusing method can be adapted to a variety of application scenarios and has high focusing accuracy.
  • acquiring the image data information obtained by the lens at each position includes digitizing the image data information obtained at each position, wherein the digitized image data information may be an integer matrix, and then, based on the digitized image data information Calculate and obtain the sharpness of each image data information, in which the contrast amount (such as contrast or gradient) of each image data information can be calculated and obtained, and the sharpness of each image data information can be characterized based on the contrast amount, and the curve can be used to filter out the highest sharpness ( That is, the image data information with the largest amount of contrast) can also be compared for the sharpness of each image data information to screen out the image data information with the highest definition (that is, the largest amount of contrast), and then determine the position of the third lens to obtain the correct focus.
  • the contrast amount such as contrast or gradient
  • the lens may also be determined whether the lens is in focus, that is, whether the focus is completed, according to the value with the largest contrast amount.
  • the focusing process of the third focusing method when it is reflected on the user interaction interface, it is a process of "pulling the bellows" from blurred to clear to blurred and finally clear. This judgment can obtain very high focusing accuracy, and the same is true in actual use.
  • the third focusing method is called Contrast Detection Auto Focus (CDAF).
  • the determining the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located includes: when the higher confidence level is in a When the state machine is triggered to switch from the first state to the second state within the third threshold range, the moving direction of the lens is first determined based on the first lens position or the second lens position corresponding to the higher confidence level, and then based on the third The third lens position determined by the focusing method focuses the photographing device, and the third focusing method moves the lens of the photographing device according to the moving direction, and the moving direction includes the first direction or the second direction, wherein the The first direction and the second direction are opposite directions, and the first state is located before the second state.
  • the moving direction is also the direction of driving the lens to move from the current position to the first lens position or the second lens position corresponding to the one with higher confidence.
  • the moving direction can assist the third focusing method to quickly and accurately determine the third lens position. This enables fast and accurate focusing.
  • the moving direction includes a first direction or a second direction, wherein the first direction and the second direction are opposite directions, and the first direction and the second direction are parallel to the photographing device.
  • the optical axis of the lens, or the first direction and the second direction coincide with the optical axis of the lens of the photographing device.
  • the determining the focusing mode based on the threshold range in which the higher one of the first confidence level and the second confidence level is located includes: when the higher confidence level is in the first When within the second threshold range or within the third threshold range or within the fourth threshold range, focus on the photographing device based on the third lens position determined by the third focusing method, wherein the second threshold range is greater than the third threshold range A threshold range, the third threshold range is greater than the fourth threshold range.
  • the third focusing method can be used for focusing, wherein the third focusing method can realize fine adjustment of the focusing position, and is stable, and can locate any suitable third lens position in a static scene.
  • the photographing device when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method. Focusing, including: when the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence being within the fourth threshold range, the third lens position determined based on the third focusing method for the The photographing device performs focusing, and the fourth state is subsequent to the first state.
  • the first state is, for example, the initialization of the preparation stage
  • the fourth state is, for example, the operation of the fine search stage (AF fine main).
  • the photographing device is determined based on the third lens position determined by the third focusing method. Focusing includes: when the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, focusing based on the third The third lens position determined by the method focuses the photographing device, and the fourth state is subsequent to the second state.
  • the second state is, for example, the initialization of the rough search stage
  • the fourth state is, for example, the operation of the fine search stage (AF fine main).
  • the photographing device when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method. Focusing, comprising: triggering a state machine to switch from a third state to a fourth state in response to the higher confidence being within the second threshold range or within the third threshold range or within the fourth threshold range In the state, the photographing device is focused based on the third lens position determined by the third focusing method, and the fourth state is subsequent to the third state.
  • the third state is, for example, the initialization of the fine search stage
  • the fourth state is, for example, the operation of the fine search stage.
  • the person with higher confidence when the person with higher confidence is in the first threshold range, for example, greater than 90%, it is marked as OK++, and when the person with higher confidence is in the second threshold range, for example, in the range of 70% to 90 %, mark as OK+, when the higher confidence is in the third threshold range, such as between 50% and 70%, mark as OK, when the confidence is higher in the third threshold range, such as less than 50% , marked as NG.
  • the output results of the first focusing method such as the first lens position and the first confidence level
  • the output results of the second focusing method such as the second lens position and the second confidence level
  • the normalization described above After processing such as giving weights, compare to obtain the higher confidence, and input the value corresponding to the higher confidence into the initialization phase of the state machine's preparation phase, the initialization of the rough search phase, and the initialization of the fine search phase to determine Which of the first focusing method, the second focusing method and the third focusing method is used for focusing.
  • the third focusing method uses the third focusing method to fine-tune the search to obtain the third lens position (that is, the focus is achieved). position), so as to complete focusing based on the position of the third lens; when the initialization stage of the preparation stage determines that the one with higher confidence (conf) is NG, it jumps to the initialization stage of the fine search stage, and firstly uses the third focusing method to determine the third The lens position (that is, the in-focus position), so that focusing is completed based on the third lens position.
  • conf one with higher confidence
  • the initialization stage of the fine search stage judges that the one with higher confidence (conf) is OK++, then jump to the final focus (GoToPeak), and directly use the first shot corresponding to the one with higher confidence
  • the position (such as the output of 3D TOF) or the second lens position (such as the output of BDAF) completes the focus;
  • the initialization stage of the preparation stage judges that the one with higher confidence (conf) is OK+ or OK or NG, it jumps to fine search
  • the third focusing method is used first to determine the third lens position (ie, the focus position), so as to complete focusing based on the third lens position.
  • the focusing methods include a first focusing method, a second focusing method and a third focusing method, and the three focusing methods have their own advantages.
  • Accuracy for example, using the first focusing method of the distance sensor 110 to determine that the position of the first lens has sufficient resolution and accuracy to meet the distance measurement within a certain distance, so within the specifications of the first focusing method, it can meet the requirements of focusing assistance, and
  • the first focusing method has good applicability in low-light or low-contrast environments, and does not affect the quality of the captured image.
  • a second focusing method is required to estimate the in-focus position and improve the effect of AF assist.
  • the maximum ranging range in the first focusing method will not exceed 10 meters, but some lenses need to meet the auto focus of more than 10 meters; the general first focusing method determines the accuracy of the position of the first lens is about 5%, but some lenses At closer distances, the accuracy requirements are very high, perhaps around 1%.
  • the second focusing method can be used to estimate the in-focus position, and in a static situation, for a high-contrast scene, the accuracy of the second focusing method in determining the position of the second lens is [-1F ⁇ , 1F ⁇ ], in a low-contrast scene, the accuracy of the second focusing method for determining the position of the second lens is [-2F ⁇ , 2F ⁇ ], where the F ⁇ is the size of the speckle, which can meet the requirements of manual focus assistance.
  • the accuracy of determining the position of the second lens by the second focusing method will decrease accordingly. In this case, focusing can be performed by the first focusing method.
  • a high-contrast scene means that the subject and the ambient background have a large contrast and/or have good lighting conditions, for example, the shooting background is black, and the shooting target is white, and/or has good lighting, which is high contrast. On the contrary, if the color of the subject and the background are similar, and the lighting conditions are poor, it is a low-contrast scene.
  • the target lens position selected based on the confidence level can be better used for focusing in different dynamic and static, different contrast, and different distance application scenarios.
  • the first lens position or the second lens position corresponding to the one with higher confidence satisfies the preset rule, it can be directly used for focusing, so that the focusing speed and accuracy can be improved, and when the first focusing method and the second focusing method are used
  • the third focusing method can be used to determine the position of the third lens and then complete the focusing.
  • the third focusing method can be finely adjusted, has good stability and high accuracy, and is suitable for most Still scene, applicable to a wider range.
  • the present application combines the advantages of the first focusing method, the second focusing method and the third focusing method to assist the automatic focusing, improve its accuracy, and assist the fast focusing.
  • the focusing method of the present application does not depend on the performance of the image sensor, and can realize the fast focusing of the photographing device, and has a wider application range, and the focusing method of the present application does not need to use PD pixels, so for the image sensor, the quality of the captured image It will not be affected in the slightest.
  • a suitable focusing method can be selected for focusing according to preset rules, which improves the accuracy and effect of the focusing method.
  • a second aspect of the embodiments of the present application provides a photographing device for executing the foregoing focusing method.
  • the photographing device 500 of this embodiment may include: at least one processor 501 and a memory 502 .
  • the processor 501 and the memory 502 are connected through a bus 503 .
  • the memory 502 stores the computer-executed instructions
  • at least one processor 501 executes the computer-executed instructions stored in the memory 502, so that the following steps are implemented when executing the computer-executed instructions: acquiring a shooting screen for enabling the shooting target to be captured by the shooting device The first lens position and the second lens position in the in-focus state, wherein the first lens position is based on the first focusing method; the focusing method is determined based on a preset rule, and the focusing method is determined based on the determined focusing method.
  • the focusing method includes any one of the following methods: focusing the photographing device based on one of the first lens position and the second lens position, or focusing on the photographing device based on the first lens position and the second lens position.
  • One of the first lens position, the second lens position, and the third lens position determined by a third focusing method focuses the photographing device, wherein the third focusing method is different from the first focusing method and the second focusing method.
  • At least one processor the at least one processor executes the computer-executable instructions stored in the memory, so that the following steps are implemented when the computer-executable instructions are executed:
  • the processor 501 is configured to determine the focusing mode based on the preset rule, including: acquiring a first confidence level of the first lens position and a second confidence level of the second lens position; based on the The focusing mode is determined by the threshold range to which the higher confidence level of the first confidence level and the second confidence level belongs.
  • the processor 501 is configured to determine the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, including: when the confidence level is higher than When the higher one is within the first threshold range, the photographing device is focused based on the first lens position or the second lens position corresponding to the higher confidence value.
  • the current state includes a first state, a second state or a third state, wherein the first state precedes the second state and the second state precedes the third state.
  • the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when the higher confidence level is When it is within the second threshold range, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the one with the higher confidence, and then adjust the third lens position determined based on the third focusing method.
  • the photographing device focuses.
  • the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when in response to a higher confidence level When the higher one is within the second threshold range and the state machine is triggered to switch from the current state to the third state, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the higher confidence value , and then focus the photographing device based on the third lens position determined by the third focusing method, the current state includes a first state or a second state, wherein the first state is before the second state, and the The second state precedes the third state.
  • the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when in response to a higher confidence level When the higher one is within the third threshold range and the state machine is triggered to switch from the first state to the second state, first determine the moving direction of the lens based on the first lens position or the second lens position corresponding to the higher confidence value, and then The photographing device is focused based on the third lens position determined by a third focusing method, and the third focusing method moves the lens of the photographing device according to the moving direction, and the moving direction includes the first direction or the second direction , wherein the first direction and the second direction are opposite directions, and the first state is located before the second state.
  • the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when the higher confidence level is When within the second threshold range or the third threshold range or the fourth threshold range, focus the photographing device based on the third lens position determined by the third focusing method, wherein the second threshold range is greater than the A third threshold range, the third threshold range is greater than the fourth threshold range.
  • the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range. Focusing by the photographing device includes: when the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence level being within the fourth threshold range, determining the first state based on the third focusing method. Three lens positions focus the photographing device, and the fourth state follows the first state.
  • the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range.
  • the photographing device focusing includes: when the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, The photographing device is focused based on a third lens position determined by a third focusing method, and the fourth state is subsequent to the second state.
  • the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range. Focusing by the photographing device includes: triggering a state machine from the third threshold in response to the higher confidence being within the second threshold range or within the third threshold range or within the fourth threshold range When the state is switched to a fourth state, the photographing device is focused based on the third lens position determined by the third focusing method, and the fourth state is subsequent to the third state.
  • the first state includes the initialization of the preparation phase
  • the second state includes the initialization of the coarse search phase
  • the third state includes the initialization of the fine search phase
  • the fourth state includes the initialization of the fine search phase. run.
  • the first threshold range is greater than 90% and less than or equal to 100%; the second threshold range is less than or equal to 90% and greater than 70%; the third threshold range is less than or equal to 70% , and greater than or equal to 50%; the fourth threshold range is less than 50%.
  • the processor 501 is configured to determine the focusing mode based on a threshold range to which the first confidence level and the second confidence level with a higher confidence level belong, including: determining the first confidence level Perform normalization processing with the second confidence level; based on the first confidence level after the normalization process and the threshold range to which the second confidence level after the normalization process has a higher confidence level to determine the focusing method.
  • the processor 501 is configured to determine the third lens position based on the third focusing method, comprising: driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the The second direction is the opposite direction; the image data information obtained by the lens at each position is acquired; the third lens position is determined based on the clarity of each image data information, wherein the third lens position is used to make The shooting target can be in focus in the shooting screen of the shooting device.
  • the processor 501 is configured to determine the third lens position based on the sharpness of each image data information, including: determining a first curve for focusing based on the sharpness of each image data information; based on the first curve The third lens position is determined.
  • the third lens position includes a lens position corresponding to the image data information with the highest definition in each image data information.
  • first direction and the second direction are parallel to the optical axis of the lens of the photographing device, or the first direction and the second direction and the light of the lens of the photographing device Axes coincide.
  • the processor 501 is configured to determine the first lens position based on the first focusing method, including: determining distance data between the shooting target and the shooting device through a distance sensor; according to the distance The focal object distance is calculated from the data; the target image distance is calculated according to the focal object distance, and the first lens position is determined according to the target image distance.
  • the signal-to-noise ratio of the collected data of the distance sensor is positively correlated with the first confidence level.
  • the processor 501 is configured to determine the second lens position based on the second focusing method, including: controlling the shooting device to shoot the shooting target at the first position and the second position, respectively, where the first position is different from the second position; when the shooting target is shot at the first position, the first blur degree of the lens of the shooting device is obtained; the shooting is performed at the second position When the target is photographed, a second blur degree of the lens of the photographing device is acquired; the second lens position is determined according to the first blur degree and the second blur degree.
  • the processor 501 is configured to determine the second lens position according to the first blurriness and the second blurriness, including: The second curve for focusing; the position of the second lens is determined according to the second curve.
  • the second confidence level is positively related to the curvature of the curve.
  • the processor 501 is configured to acquire the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, and further includes: responding to user input through the user interaction interface The selection instruction of the region of interest, obtains the first lens position and the second lens position for enabling the shooting target to be in the in-focus state in the shooting screen of the shooting device, wherein the region of interest includes the shooting target. .
  • a follow focus motor is coupled to the lens of the photographing device, and the follow focus motor is used to drive the lens of the photographing device to move, so that the photographing device is adjusted from the current lens position to the first A lens position or the second lens position or the third lens position.
  • the photographing device and the follow focus motor are carried on the gimbal.
  • the photographing device further includes a display device, the photographing device is connected in communication with the pan/tilt, wherein: the display device is provided on the hand-held part of the pan/tilt; or the display device is detachable
  • the display device is arranged on the mounting seat of the pan/tilt, and the display device is connected in communication with the pan/tilt.
  • the follow focus motor is connected in communication with the pan/tilt, an operating member of the follow focus motor is provided on a hand-held part of the pan/tilt, and the operating member is used to receive the user's response to the follow focus. Control commands for the focuser motor.
  • the display device is a user interface of the photographing device, or the display device is connected in communication with the photographing device.
  • a third aspect of the embodiments of the present application provides a shooting system, where the shooting system includes a pan/tilt and the aforementioned shooting device; the pan/tilt is used to carry the shooting device.
  • the shooting system includes a pan/tilt and the aforementioned shooting device; the pan/tilt is used to carry the shooting device.
  • pan/tilt in this embodiment can be used to implement the technical solutions of the above focusing method embodiments of the present application, and the implementation principles and technical effects thereof are similar, and will not be repeated here.
  • the technical solutions of the above-mentioned focusing method embodiments of the present application can also be implemented by combining devices.
  • some steps of the focusing method provided in the method embodiments may be performed by a pan/tilt head, and another part of the steps may be performed by a follow focus motor or manually by a user. This embodiment of the present application does not limit this.
  • a fourth aspect of the present application also provides a computer storage medium on which a computer program is stored.
  • One or more computer program instructions may be stored on the computer-readable storage medium, and the computer program contains at least one piece of code, and at least one piece of code can be executed by the computer to control the computer to perform the aforementioned focusing method.
  • Embodiments of the present application further provide a computer storage medium, where program instructions are stored in the computer storage medium, and when the program is executed, part or all of the steps of the focusing method of the first aspect may be included.
  • the above-mentioned readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM Static Random Access Memory
  • EEPROM Electrically Erasable Programmable Read-Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • An exemplary readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium.
  • the readable storage medium can also be an integral part of the processor.
  • the processor and the readable storage medium may be located in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short).
  • ASIC Application Specific Integrated Circuits
  • the processor and the readable storage medium may also exist in the device as discrete components.
  • the functions in the embodiments of the present application (implemented by the processor) and/or other desired functions can be realized, for example, to execute the corresponding steps of the focusing method according to the embodiments of the present application, and stored in a computer-readable storage
  • Various application programs and various data such as various data used and/or generated by the application program, can also be stored in the medium.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some modules according to the embodiments of the present application.
  • DSP digital signal processor
  • the present application can also be implemented as a program of apparatus (eg, computer programs and computer program products) for performing part or all of the methods described herein.
  • Such a program implementing the present application may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.

Landscapes

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

Abstract

A focusing method (200), a photographing device, a photographing system, and a readable storage medium. The focusing method comprises: acquiring a first lens position and a second lens position that are used to enable a photographing target to be in a focusing state in a photographing picture of a photographing device (S201), wherein the first lens position is determined on the basis of a first focusing method, and the second lens position is determined on the basis of a second focusing method; determining a focusing manner on the basis of a preset rule, and focusing the photographing device on the basis of the determined focusing manner (S202), the focusing manner comprising any one of the following manners: focusing the photographing device on the basis of one of the first lens position and the second lens position, or focusing the photographing device on the basis of one of the first lens position, the second lens position, and a third lens position which is determined by a third focusing method, wherein the third focusing method, the first focusing method, and the second focusing method are different methods. In the method, hybrid automatic focusing can be implemented, and the accuracy is high.

Description

对焦方法、拍摄设备、拍摄系统以及可读存储介质Focusing method, photographing device, photographing system, and readable storage medium 技术领域technical field
本申请总地涉及对焦领域,更具体地涉及一种对焦方法、拍摄设备、拍摄系统以及可读存储介质。The present application generally relates to the field of focusing, and more particularly, to a focusing method, a photographing device, a photographing system, and a readable storage medium.
背景技术Background technique
大部分的单反相机、微单相机、电影机都具有手动对焦模式,例如单反相机可以利用独立的相位传感器,辅助手动对焦,部分微单相机可以利用内嵌相位(Phase Detection,简称PD)像素的图像传感器辅助手动对焦,部分电影机也有高端的PD技术来辅助手动对焦,但是目前PD传感器在暗光环境、低对比度环境表现较差,且PD像素越多,对焦性能越好,其图像质量会越差。Most SLR cameras, mirrorless cameras, and movie cameras have manual focus modes. For example, SLR cameras can use an independent phase sensor to assist manual focusing, and some mirrorless cameras can use built-in Phase Detection (PD) pixels. The image sensor assists manual focusing, and some movie cameras also have high-end PD technology to assist manual focusing. However, at present, PD sensors perform poorly in low-light environments and low-contrast environments, and the more PD pixels, the better the focusing performance, and the better the image quality. the worse.
发明内容SUMMARY OF THE INVENTION
在发明内容部分中引入了一系列简化形式的概念,这将在具体实施方式部分中进一步详细说明。本发明的发明内容部分并不意味着要试图限定出所要求保护的技术方案的关键特征和必要技术特征,更不意味着试图确定所要求保护的技术方案的保护范围。A series of concepts in simplified form have been introduced in the Summary section, which are described in further detail in the Detailed Description section. The Summary of the Invention section of the present invention is not intended to attempt to limit the key features and essential technical features of the claimed technical solution, nor is it intended to attempt to determine the protection scope of the claimed technical solution.
本申请实施例第一方面提供了一种对焦方法,所述方法包括:获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法确定,所述第二镜头位置为基于第二对焦方法确定,所述第一对焦方法不同于所述第二对焦方法;基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。A first aspect of the embodiments of the present application provides a focusing method, the method includes: acquiring a first lens position and a second lens position for enabling a shooting target to be in a focus state in a shooting picture of a shooting device, wherein, The first lens position is determined based on a first focusing method, the second lens position is determined based on a second focusing method, and the first focusing method is different from the second focusing method; the focusing method is determined based on a preset rule , and focus the photographing device based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on one of the first lens position and the second lens position Focusing on the photographing device, or focusing on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method, wherein the first lens position The three focusing method is different from the first focusing method and the second focusing method.
本申请实施例第二方面提供了一种拍摄设备,所述拍摄设备包括:A second aspect of the embodiments of the present application provides a photographing device, and the photographing device includes:
存储器,所述存储器存储计算机执行指令;a memory that stores computer-executed instructions;
至少一个处理器,所述至少一个处理器执行所述存储器存储的计算机执行指令,使 得执行所述计算机执行指令时实现如下步骤:At least one processor, the at least one processor executes the computer-executed instructions stored in the memory, so that the following steps are implemented when executing the computer-executed instructions:
获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法;acquiring a first lens position and a second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, wherein the first lens position is based on a first focusing method;
基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。A focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and the One of the second lens positions focuses the photographing device, or the photographing device is focused on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
本申请实施例第三方面提供了一种拍摄系统,包括:云台和第三方面所述的拍摄设备;所述云台用于承载所述拍摄设备。A third aspect of an embodiment of the present application provides a shooting system, including: a pan/tilt and the shooting device described in the third aspect; the pan/tilt is used to carry the shooting device.
本申请实施例第四方面提供了一种可读存储介质,所述可读存储介质上存储有计算机程序;所述计算机程序在被执行时,实现如前文所述的对焦方法。A fourth aspect of the embodiments of the present application provides a readable storage medium, where a computer program is stored on the readable storage medium; when the computer program is executed, the focusing method as described above is implemented.
本申请提供了一种对焦方法、拍摄设备、拍摄系统及可读存储介质。在本申请的对焦方法中,基于预设规则确定对焦方式,基于已确定的对焦方式对拍摄设备进行对焦,其中,对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第一对焦方法、所述第二对焦方法和所述第三对焦方法是不同的对焦方法,本申请的对焦方法不依赖于图像传感器的性能,即可实现拍摄设备的快速对焦,且本申请的对焦方法无需采用PD像素,因此对于图像传感器来说,所拍摄的画面质量不会受到丝毫影响,另外,可以根据预设规则,选择适合的对焦方法进行对焦,提高了对焦方式的准确性和效果。The present application provides a focusing method, a photographing device, a photographing system, and a readable storage medium. In the focusing method of the present application, a focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and all the focusing on the photographing device based on one of the second lens positions, or focusing on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method Focusing is performed, wherein the first focusing method, the second focusing method and the third focusing method are different focusing methods. The focusing method of the present application does not depend on the performance of the image sensor, and can realize the Fast focusing, and the focusing method of the present application does not need to use PD pixels, so for the image sensor, the quality of the captured picture will not be affected in the slightest. Accuracy and effectiveness of focusing methods.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative labor.
在附图中:In the attached image:
图1示出本申请的实施例提供的拍摄系统的示意性架构图;FIG. 1 shows a schematic structural diagram of a photographing system provided by an embodiment of the present application;
图2示出本申请的实施例提供的第二对焦方法中对焦过程的示意图;2 shows a schematic diagram of a focusing process in a second focusing method provided by an embodiment of the present application;
图3示出本申请的一实施例中的对焦方法的流程示意图;FIG. 3 shows a schematic flowchart of a focusing method in an embodiment of the present application;
图4示出本申请的另一实施例中的对焦方法的流程示意图;FIG. 4 shows a schematic flowchart of a focusing method in another embodiment of the present application;
图5示出本申请的另一实施例中的拍摄设备的结构示意图。FIG. 5 shows a schematic structural diagram of a photographing device in another embodiment of the present application.
具体实施方式Detailed ways
为了使得本申请的目的、技术方案和优点更为明显,下面将参照附图详细描述根据本申请的示例实施例。显然,所描述的实施例仅仅是本申请的一部分实施例,而不是本申请的全部实施例,应理解,本申请不受这里描述的示例实施例的限制。基于本申请中描述的本申请实施例,本领域技术人员在没有付出创造性劳动的情况下所得到的所有其它实施例都应落入本申请的保护范围之内。In order to make the objectives, technical solutions and advantages of the present application more apparent, the exemplary embodiments according to the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited by the example embodiments described herein. Based on the embodiments of the present application described in the present application, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present application.
在下文的描述中,给出了大量具体的细节以便提供对本申请更为彻底的理解。然而,对于本领域技术人员而言显而易见的是,本申请可以无需一个或多个这些细节而得以实施。在其他的例子中,为了避免与本申请发生混淆,对于本领域公知的一些技术特征未进行描述。In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced without one or more of these details. In other instances, some technical features known in the art have not been described in order to avoid confusion with the present application.
应当理解的是,本申请能够以不同形式实施,而不应当解释为局限于这里提出的实施例。相反地,提供这些实施例将使公开彻底和完全,并且将本申请的范围完全地传递给本领域技术人员。It should be understood that the application may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this application to those skilled in the art.
在此使用的术语的目的仅在于描述具体实施例并且不作为本申请的限制。在此使用时,单数形式的“一”、“一个”和“所述/该”也意图包括复数形式,除非上下文清楚指出另外的方式。还应明白术语“组成”和/或“包括”,当在该说明书中使用时,确定所述特征、整数、步骤、操作、元件和/或部件的存在,但不排除一个或更多其它的特征、整数、步骤、操作、元件、部件和/或组的存在或添加。在此使用时,术语“和/或”包括相关所列项目的任何及所有组合。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the singular forms "a," "an," and "the/the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the terms "compose" and/or "include", when used in this specification, identify the presence of stated features, integers, steps, operations, elements and/or components, but do not exclude one or more other The presence or addition of features, integers, steps, operations, elements, parts and/or groups. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
为了彻底理解本申请,将在下列的描述中提出详细的结构,以便阐释本申请提出的技术方案。本申请的可选实施例详细描述如下,然而除了这些详细描述外,本申请还可以具有其他实施方式。For a thorough understanding of the present application, detailed structures will be presented in the following description in order to explain the technical solutions proposed by the present application. Alternative embodiments of the present application are described in detail below, however, the present application may have other embodiments in addition to these detailed descriptions.
本申请的第一方面提供了一种对焦方法,如图3所示,该方法200包括:A first aspect of the present application provides a focusing method. As shown in FIG. 3 , the method 200 includes:
步骤S201:获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法确定,所述第二镜头位置为基于第二对焦方法确定,所述第一对焦方法不同于所述第二对焦方法;Step S201: Acquire a first lens position and a second lens position for enabling the shooting target to be in an in-focus state in the shooting picture of the shooting device, wherein the first lens position is determined based on the first focusing method, the The second lens position is determined based on a second focusing method, and the first focusing method is different from the second focusing method;
步骤S202:基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。Step S202: Determine a focusing mode based on a preset rule, and focus the photographing device based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and one of the second lens positions to focus the photographing device, or based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method The photographing device performs focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
为了更好地说明上述对焦方法,下面先结合附图先对拍摄设备进行简要说明。其中,拍摄设备可以作为执行主体单独运行,还可以设置于云台上,以云台为承载主体进行拍摄,下面以拍摄设备承载于云台上为例对整体的拍摄系统进行详细的说明。In order to better illustrate the above-mentioned focusing method, a brief description of the photographing device is given below with reference to the accompanying drawings. Among them, the photographing device can operate independently as the execution subject, and can also be set on the gimbal, and the gimbal is used as the carrying subject for shooting.
其中,图1是根据本申请的实施例提供的拍摄系统的示意性架构图。如图1所示,拍摄系统可以包括距离传感器110和拍摄设备130。1 is a schematic structural diagram of a photographing system provided according to an embodiment of the present application. As shown in FIG. 1 , the photographing system may include a distance sensor 110 and a photographing device 130 .
其中,距离传感器110包括发射装置111、接收装置112和控制装置113,用于通过控制装置113控制发射装置111发射光信号,并通过接收装置112接收反射的光信号,从而采集距离传感数据,以根据该距离传感数据获得拍摄目标与拍摄设备130之间的实时距离。可选地,该接收装置112可以为接收阵列。距离传感器110采集的传感数据可以包括不同采样时刻对应的距离传感器110与拍摄目标之间的测量距离M。距离传感器110与拍摄设备130之间的距离差为一固定值L,则可以根据M和L确定拍摄目标与拍摄设备130之间的实时距离。例如,距离传感器的基准面位于镜头的焦平面后方,即位于镜头背离拍摄目标的一侧,则拍摄设备130与拍摄目标之间的实时距离为测量距离M减去距离差L后得到的值M-L。该实时距离的计算处理可以通过距离传感器110、通过拍摄设备130或云台进行处理,本实施例对此不做限定。The distance sensor 110 includes a transmitting device 111, a receiving device 112 and a control device 113, which are used to control the transmitting device 111 to transmit an optical signal through the control device 113, and receive the reflected optical signal through the receiving device 112, so as to collect distance sensing data, The real-time distance between the photographing target and the photographing device 130 is obtained according to the distance sensing data. Optionally, the receiving device 112 may be a receiving array. The sensing data collected by the distance sensor 110 may include the measured distances M between the distance sensor 110 and the shooting target corresponding to different sampling moments. If the distance difference between the distance sensor 110 and the photographing device 130 is a fixed value L, the real-time distance between the photographing target and the photographing device 130 can be determined according to M and L. For example, if the reference plane of the distance sensor is located behind the focal plane of the lens, that is, on the side of the lens away from the shooting target, the real-time distance between the shooting device 130 and the shooting target is the value M-L obtained by subtracting the distance difference L from the measured distance M . The calculation and processing of the real-time distance may be performed by the distance sensor 110, the photographing device 130 or the pan/tilt head, which is not limited in this embodiment.
拍摄系统还可以包括跟焦器电机120,跟焦器电机120为驱动拍摄设备130的镜头131转动的执行机构,包括位置控制器121和齿轮,该位置控制器121用于根据与跟焦器电机120连接的跟焦轮140给出的控制指令或者与距离传感器110连接的控制器给出的控制指令,输出力矩,通过齿轮传动驱动与跟焦器电机120啮合的镜头131对焦,以使拍摄目标在拍摄设备130的拍摄画面中处于合焦状态。可选地,跟焦器电机120与拍摄设备130中镜头131的跟焦环啮合。其中,跟焦轮140可以为独立的控制设备,或集成于云台上。The photographing system may further include a follow focus motor 120, the follow focus motor 120 is an actuator that drives the rotation of the lens 131 of the photographing device 130, and includes a position controller 121 and a gear, the position controller 121 is used for according to the follow focus motor. The control command given by the follow focus wheel 140 connected to 120 or the control command given by the controller connected with the distance sensor 110, output torque, and drive the lens 131 engaged with the follow focus motor 120 to focus through gear transmission, so as to make the shooting target It is in the in-focus state in the photographing screen of the photographing device 130 . Optionally, the follow focus motor 120 is engaged with a follow focus ring of the lens 131 in the photographing device 130 . Wherein, the focus wheel 140 may be an independent control device, or may be integrated on the PTZ.
在一实施例中,跟焦器电机120与云台通信连接,用于接收用户针对跟焦器电机120的控制指令。具体地,跟焦器电机120的操作件可以设于云台的手持部,操作件用于接收用户针对跟焦器电机的控制指令并进一步根据控制指令驱动跟焦器电机,以对拍摄设备130进行对焦。其中,操作件可以包括但不限于跟焦轮140。In one embodiment, the follow focus motor 120 is connected in communication with the gimbal, and is used for receiving a user's control instruction for the follow focus motor 120 . Specifically, the operating member of the follow focus motor 120 can be provided on the hand-held part of the gimbal, and the operating member is used to receive a user's control command for the follow focus motor and further drive the follow focus motor according to the control command, so as to control the photographing device 130 to focus. The operating member may include, but is not limited to, the focus wheel 140 .
拍摄设备130,包括镜头131和相机本体132,镜头131设于相机本体132。在跟焦 器电机120驱动镜头131对焦后,即拍摄目标在拍摄设备130的拍摄画面中处于合焦状态时,拍摄设备130能够对拍摄目标进行拍摄获得图像。相机本体132可以为手持单反或微单相机的相机本体。本实施例中的镜头131可以支持手动对焦以及自动对焦。The photographing device 130 includes a lens 131 and a camera body 132 , and the lens 131 is provided on the camera body 132 . After the follow focus motor 120 drives the lens 131 to focus, that is, when the photographing target is in the in-focus state in the photographing screen of the photographing device 130, the photographing device 130 can photograph the photographing target to obtain an image. The camera body 132 may be a camera body of a handheld single-lens reflex camera or a mirrorless camera. The lens 131 in this embodiment can support manual focus and automatic focus.
可选地,该拍摄系统还可以包括云台。拍摄设备130与跟焦器电机120承载于云台。使用该云台的配件可将跟焦器电机120和相机本体132底部固联,镜头131通过卡口安装到相机本体132上后,跟焦器电机120即可通过跟焦环驱动镜头131转动。Optionally, the photographing system may further include a pan/tilt head. The photographing device 130 and the follow focus motor 120 are carried on the gimbal. The follow focus motor 120 and the bottom of the camera body 132 can be fixedly connected by using the accessories of the gimbal. After the lens 131 is mounted on the camera body 132 through the bayonet, the follow focus motor 120 can drive the lens 131 to rotate through the follow focus ring.
该拍摄系统还可以包括跟焦轮140,跟焦轮140可以推送跟焦轮140当前的转动位置和转动速度数据给跟焦器电机120,从而使跟焦器电机120转动到与跟焦轮140相对应的指定位置。其中,可以通过参数标定,例如使用跟焦轮140驱动跟焦器电机120到达至少两个对焦标定点,从而完成拍摄设备130与拍摄目标之间的实时距离与跟焦器电机120转动位置的映射关系的标定。The photographing system may further include a follow focus wheel 140 , and the follow focus wheel 140 can push the current rotational position and rotational speed data of the follow focus wheel 140 to the follow focus motor 120 , so that the follow focus motor 120 rotates to the same level as the follow focus wheel 140 . the corresponding specified location. Wherein, parameters can be calibrated, for example, the follow focus motor 120 can be driven by the follow focus wheel 140 to reach at least two focus calibration points, so as to complete the mapping between the real-time distance between the shooting device 130 and the shooting target and the rotation position of the follow focus motor 120 Calibration of the relationship.
另外,拍摄系统包括显示装置150用于显示拍摄设备所拍摄的画面例如实时取景画面、拍摄设备的设置界面等,还可以用于显示各种提示信息,例如对焦完成的提示信息等。In addition, the photographing system includes a display device 150 for displaying pictures shot by the photographing equipment, such as a live view picture, a setting interface of the photographing equipment, etc., and can also be used for displaying various prompt information, such as prompt information on completion of focusing.
在一示例中,显示装置150可以设置于拍摄设备130,例如为拍摄设备130固有的用于显示各种信息的交互界面,在拍摄过程中通过交互界面直接向用户展示各种可视信息例如实时取景画面、拍摄设备的设置界面等,再例如,响应于用户对感兴趣区域的选择指令,显示感兴趣区域的选框等。In an example, the display device 150 may be provided in the photographing device 130, for example, an interactive interface inherent in the photographing device 130 for displaying various information, and various visual information, such as real-time information, are directly displayed to the user through the interactive interface during the photographing process. A viewfinder screen, a setting interface of a photographing device, etc., for another example, in response to a user's instruction for selecting a region of interest, a selection frame of the region of interest is displayed, and the like.
在另一示例中,显示装置可以设置于拍摄设备130以外,独立于拍摄设备130,但是与拍摄设备130通信连接,将拍摄设备130的取景影像通过通信连接的方式传输至显示装置并向用户显示取景影像。In another example, the display device may be provided outside the photographing device 130, independent of the photographing device 130, but connected in communication with the photographing device 130, and transmits the framing image of the photographing device 130 to the display device through the communication connection and displays it to the user Framing the image.
例如,显示装置150还可以设置在云台上,如集成于云台的手持部。或者显示装置150可拆卸地设置在云台的安装座(如与手柄连接)上,并且显示装置150与云台通信连接,拍摄设备130与云台通信连接,拍摄设备130获取采集到的影像信息等需要向用户展示的信息传输至云台,云台再将等需要向用户展示的信息传输至显示装置150,并通过显示装置150显示给用户,进行调焦。需要说明的是显示装置150但并不局限于所列举的安装位置,显示装置150还可以设置于云台的其他位置。For example, the display device 150 may also be disposed on the pan/tilt, such as a handheld part integrated in the pan/tilt. Or the display device 150 is detachably arranged on the mounting seat of the pan/tilt (eg, connected to the handle), and the display device 150 is connected in communication with the pan/tilt, and the photographing device 130 is connected in communication with the pan/tilt, and the photographing device 130 obtains the collected image information. The information to be displayed to the user is transmitted to the PTZ, and the PTZ then transmits the information to be displayed to the user to the display device 150 and displays it to the user through the display device 150 for focusing. It should be noted that the display device 150 is not limited to the listed installation positions, and the display device 150 may also be installed at other positions of the pan/tilt.
本申请实施例中,拍摄设备130除进行手动对焦之外,还可以自动对焦。基于此,用户还可以通过在显示装置150输入选择指令进行模式选择,将自动跟焦模式切换到手动跟焦模式,从而实现手动跟焦模式和自动跟焦模式的灵活切换。In this embodiment of the present application, in addition to manual focusing, the photographing device 130 can also focus automatically. Based on this, the user can also select a mode by inputting a selection instruction on the display device 150 and switch the auto follow focus mode to the manual follow focus mode, thereby realizing flexible switching between the manual follow focus mode and the automatic follow focus mode.
其中,手动对焦模式下,可以通过使用跟焦轮140来控制跟焦器电机120的位置来对焦,或者,直接手动转动镜头的位置来对焦。例如,在本申请的一实施例中,跟焦器电机120可以获取用户针对跟焦器电机120的控制指令;并根据控制指令驱动跟焦器电机120, 输出力矩,通过齿轮传动驱动与跟焦器电机啮合的镜头对焦,以使拍摄目标在拍摄设备的拍摄画面中处于合焦状态。在本申请的另一实施例中,拍摄系统也可以不包含跟焦器电机120,而是通过手动的方式拨动镜头,以使当前镜头位置经用户手动转动调节至目标镜头位置,进而实现对焦。Wherein, in the manual focus mode, the focus can be achieved by using the follow focus wheel 140 to control the position of the follow focus motor 120, or by directly manually rotating the position of the lens to focus. For example, in an embodiment of the present application, the follow focus motor 120 can obtain a user's control instruction for the follow focus motor 120; and drive the follow focus motor 120 according to the control instruction, output torque, and drive and follow focus through gear transmission The lens that engages the camera's motor is focused so that the subject is in focus in the shooting device's frame. In another embodiment of the present application, the photographing system may also not include the follow focus motor 120, but manually move the lens, so that the current lens position is manually adjusted to the target lens position by the user, thereby achieving focusing .
在自动对焦模式下,可以通过处理器控制跟焦轮140,跟焦轮140来控制跟焦器电机120的位置来自动对焦,或者,拍摄设备的镜头耦合有跟焦器电机,所述跟焦器电机用于驱动所述拍摄设备的镜头转动,从而进行对焦。In the auto focus mode, the follow focus wheel 140 can be controlled by the processor, and the follow focus wheel 140 can control the position of the follow focus motor 120 to automatically focus, or the lens of the photographing device is coupled with a follow focus motor, and the follow focus motor The motor is used to drive the lens of the photographing device to rotate, so as to focus.
应理解,上述对于拍摄系统各组成部分的命名仅是出于标识的目的,并不应理解为对本申请的实施例的限制。It should be understood that the above naming of each component of the photographing system is only for the purpose of identification, and should not be construed as a limitation on the embodiments of the present application.
需说明,拍摄设备130也可以不设置于云台,通过拍摄设备130单独地实现本申请的对焦方法,其中本文中拍摄设备130的构成以及运行方法在拍摄设备130不承载于云台上并且不相互矛盾的前提下,相关解释和说明可以全部引入到拍摄设备130中,在此不再赘述。It should be noted that the photographing device 130 may not be provided on the pan/tilt, and the focusing method of the present application can be implemented independently by the photographing device 130, wherein the composition and operation method of the photographing device 130 herein are not carried on the pan/tilt and are not carried by the photographing device 130. Under the premise of contradicting each other, all relevant explanations and descriptions may be introduced into the photographing device 130 , which will not be repeated here.
在本申请中,对焦方法的执行主体可以为具有独立计算能力的处理设备,例如图1所示实施例中的跟焦器电机120、距离传感器110、拍摄设备130或者云台,当然本实施例的方法还可以由一个设备执行一些步骤,由另一个设备执行其他步骤,也即可以由跟焦器电机120、距离传感器110、拍摄设备130和云台中任意组合来共同执行,例如,以跟焦器电机120和云台的组合为例,可以由跟焦器电机120执行一部分步骤,由云台执行剩余步骤,以使跟焦器电机120和云台共同执行本实施例提供的对焦方法。In this application, the execution subject of the focusing method may be a processing device with independent computing capabilities, such as the follow focus motor 120, the distance sensor 110, the photographing device 130 or the pan/tilt in the embodiment shown in FIG. 1 . Of course, this embodiment The method can also be performed by one device to perform some steps, and another device to perform other steps, that is, it can be performed by any combination of the follow focus motor 120, the distance sensor 110, the photographing device 130 and the pan/tilt head, for example, to follow focus Taking the combination of the follower motor 120 and the pan/tilt as an example, the follow focus motor 120 may perform some steps, and the pan/tilt may perform the remaining steps, so that the follow focus motor 120 and the pan/tilt jointly perform the focusing method provided in this embodiment.
在步骤S201中,在本申请的一实施例中,如前文所述,跟焦器电机120可以与拍摄设备130中镜头131的跟焦环啮合,那么可以根据跟焦器电机120的当前位置来确定拍摄设备130的镜头当前所在的位置。其中,跟焦器电机120的当前位置可以通过角度传感器检测得到。当然,拍摄设备的当前镜头位置也可以采用其它方式来确定,例如,可以根据当前的对焦程度进行计算得到,该对焦程度可以依据具体的对焦方法而定。In step S201, in an embodiment of the present application, as described above, the follow focus motor 120 can be engaged with the follow focus ring of the lens 131 in the photographing device 130, and then the follow focus motor 120 can be determined according to the current position of the follow focus motor 120. The current position of the lens of the photographing device 130 is determined. Wherein, the current position of the follow focus motor 120 can be detected by an angle sensor. Of course, the current lens position of the photographing device can also be determined in other ways, for example, it can be calculated according to the current focusing degree, and the focusing degree can be determined according to a specific focusing method.
其中,拍摄设备130的第一镜头位置、第二镜头位置是指拍摄设备130的镜头可能处于的合焦位置,即拍摄设备130处于第一镜头位置或第二镜头位置时,拍摄目标在拍摄设备130的拍摄画面中预计处于合焦状态。The first lens position and the second lens position of the photographing device 130 refer to the possible in-focus positions of the lens of the photographing device 130, that is, when the photographing device 130 is at the first lens position or the second lens position, the shooting target is in the photographing device The 130 shots are expected to be in focus.
在一个示例中,所述获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,还包括:响应于用户通过用户交互界面输入的感兴趣区域的选择指令,获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述感兴趣区域中包括所述拍摄目标。可选地,在用户交互界面上还可以显示感兴趣区域的选框,例如方框等。或者,拍摄设备还可以自动 确定感兴趣区域。In one example, the acquiring the first lens position and the second lens position used to enable the shooting target to be in focus in the shooting picture of the shooting device further includes: responding to an interest input by the user through a user interface interface The region selection instruction obtains the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, wherein the shooting target is included in the region of interest. Optionally, a selection box of the region of interest, such as a box, may also be displayed on the user interface. Alternatively, the photographing device can also automatically determine the region of interest.
具体地,第一镜头位置基于第一对焦方法确定,第二镜头位置为基于第二对焦方法确定,第一对焦方法不同于第二对焦方法。其中,基于第一镜头位置和第二镜头位置的相同或不同。Specifically, the first lens position is determined based on the first focusing method, and the second lens position is determined based on the second focusing method, and the first focusing method is different from the second focusing method. Wherein, based on the same or different of the first lens position and the second lens position.
其中,由于第一对焦方法不同于第二对焦方法,其置信度的影响因素不同,那么第一镜头位置和第二镜头位置可以具有不同的置信度,也即第一镜头位置具有第一置信度,第二镜头位置具有第二置信度。Wherein, since the first focusing method is different from the second focusing method, and the influencing factors of the confidence are different, the first lens position and the second lens position may have different confidences, that is, the first lens position has the first confidence. , the second lens position has a second confidence level.
在本申请中,置信度可以用于表征确定的镜头位置的准确度,也即,第一置信度可以用于表征确定的第一镜头位置的准确度,第二置信度可以用于表征确定的第二镜头位置的准确度。In this application, the confidence level may be used to characterize the accuracy of the determined lens position, that is, the first confidence level may be used to characterize the determined accuracy of the first lens position, and the second confidence level may be used to characterize the determined accuracy of the first lens position The accuracy of the second lens position.
具体地,本申请的一实施例中,拍摄目标是指待拍摄成像的对象,例如人、物、景等。相机本体一般会标注焦平面的位置,拍摄设备130与拍摄目标之间的实时距离可以为拍摄设备130的相机本体的焦平面与拍摄目标之间的距离,以d代表,因此d与物距u和像距v之间的关系可以表示为:Specifically, in an embodiment of the present application, the photographing target refers to an object to be photographed and imaged, such as a person, an object, a scene, and the like. The camera body generally marks the position of the focal plane, and the real-time distance between the photographing device 130 and the photographing target can be the distance between the focal plane of the camera body of the photographing device 130 and the photographing target, represented by d, so d is equal to the object distance u and the image distance v can be expressed as:
d=u+v    (1)d=u+v (1)
在拍摄目标在拍摄设备130的拍摄画面中处于合焦状态时,像距和物距满足高斯成像公式:When the shooting target is in the in-focus state in the shooting picture of the shooting device 130, the image distance and the object distance satisfy the Gaussian imaging formula:
Figure PCTCN2021086072-appb-000001
Figure PCTCN2021086072-appb-000001
根据公式(1)和公式(2)可以得到:According to formula (1) and formula (2), we can get:
Figure PCTCN2021086072-appb-000002
Figure PCTCN2021086072-appb-000002
Figure PCTCN2021086072-appb-000003
Figure PCTCN2021086072-appb-000003
在本申请的一实施例中,第一对焦方法例如为三维飞行时间(time of Flight,简称TOF)对焦方法,基于所述第一对焦方法确定所述第一镜头位置,包括:通过距离传感器110确定拍摄目标与拍摄设备130之间的距离d;根据距离d计算对焦物距;然后根据公式(2)和(3)根据对焦物距计算目标像距,并根据目标像距确定第一镜头位置。In an embodiment of the present application, the first focusing method is, for example, a three-dimensional time of flight (TOF) focusing method, and determining the position of the first lens based on the first focusing method includes: using the distance sensor 110 Determine the distance d between the shooting target and the shooting device 130; calculate the focus object distance according to the distance d; then calculate the target image distance according to the focus object distance according to formulas (2) and (3), and determine the first lens position according to the target image distance .
本实施例中,距离传感器110的安装位置可以有多种,只要满足根据距离传感器110采集的传感数据能够确定拍摄设备130与拍摄目标之间的实时距离即可。In this embodiment, the installation positions of the distance sensor 110 can be various, as long as the real-time distance between the photographing device 130 and the photographing target can be determined according to the sensing data collected by the distance sensor 110 .
在一种可实现方式中,距离传感器110可拆卸地设置在拍摄设备130上。例如,距离传感器110可以设置在拍摄设备130的热靴上,在此情况下,距离传感器110的测距基准面与拍摄设备130的镜头的焦平面可以在一定误差范围内实现基本重合。当然,也可以令距离传感器110的测距基准面与拍摄设备130的镜头的焦平面相距固定的距离进行安装,只要在后续计算中将该固定的距离考虑在内即可。例如,距离传感器110的基准面位于镜 头的焦平面后方,即背离拍摄目标的一侧,且距离传感器110的基准面与镜头的焦平面之间的距离差为一固定值L,则,拍摄设备130与拍摄目标之间的实时距离为距离传感器110的测量距离M减去L后得到的值M-L。本实施例对此不做限定。In an implementation manner, the distance sensor 110 is detachably provided on the photographing device 130 . For example, the distance sensor 110 may be disposed on the hot shoe of the photographing device 130. In this case, the ranging reference plane of the distance sensor 110 and the focal plane of the lens of the photographing device 130 may be substantially coincident within a certain error range. Of course, the distance measuring reference plane of the distance sensor 110 can also be installed at a fixed distance from the focal plane of the lens of the photographing device 130, as long as the fixed distance is taken into account in subsequent calculations. For example, if the reference plane of the distance sensor 110 is located behind the focal plane of the lens, that is, on the side away from the shooting target, and the distance difference between the reference plane of the distance sensor 110 and the focal plane of the lens is a fixed value L, then the photographing device The real-time distance between 130 and the shooting target is the value M-L obtained by subtracting L from the measured distance M of the distance sensor 110 . This embodiment does not limit this.
在另一种实现方式中,拍摄设备130可拆卸地承载在云台的承载座上,距离传感器110可拆卸地承载在云台的承载座上。该方式中,通过设置云台,将拍摄设备130和距离传感器110均由该云台承载,一方面可以利用云台的平衡调节功能保证拍摄设备130的平衡,另一方面可以保证拍摄设备130与距离传感器110能够相对固定的设置,实现上述拍摄设备130与拍摄目标之间的实时距离的准确计算。In another implementation manner, the photographing device 130 is detachably carried on the bearing seat of the gimbal, and the distance sensor 110 is detachably carried on the bearing seat of the gimbal. In this way, by setting the pan/tilt, both the photographing device 130 and the distance sensor 110 are carried by the pan/tilt. On the one hand, the balance adjustment function of the pan/tilt can be used to ensure the balance of the photographing device 130, and on the other hand, the photographing device 130 and the distance sensor 110 can be ensured. The distance sensor 110 can be set relatively fixedly, so as to realize the accurate calculation of the real-time distance between the above-mentioned photographing device 130 and the photographing target.
可选地,本实施例中的拍摄目标可以是由用户选中的。在一些实施例中,具体的选择方式是,拍摄设备130可拆卸地承载在云台的承载座上,云台与拍摄设备130通信连接,云台的手持部上设置显示装置150,拍摄目标是通过检测用户对显示拍摄设备130的拍摄图像的显示装置150的选择操作确定的,例如通过检测用户对拍摄设备的显示装置显示的实时取景画面中的一个感兴趣区域的点击选择操作而获得选择指令。Optionally, the shooting target in this embodiment may be selected by the user. In some embodiments, the specific selection method is that the photographing device 130 is detachably carried on the bearing seat of the gimbal, the gimbal is communicatively connected to the photographing device 130, the display device 150 is provided on the hand-held part of the gimbal, and the photographing target is Determined by detecting the user's selection operation on the display device 150 that displays the captured image of the photographing device 130 , for example, by detecting the user's clicking and selecting operation on an area of interest in the live view screen displayed by the display device of the photographing device to obtain the selection instruction .
在一个示例中,由于测距传感器和拍摄设备的传感器两者之间的物理装备上具有一定的距离,还可以将获取的感兴趣区域(例如拍摄目标)的像素坐标,而将通过预定的位置转换关键,将拍摄设备坐标系下的感兴趣区域的位置信息转换为TOF坐标系下的位置信息,进而控制距离传感器的测距区域,实现测距。In one example, since there is a certain distance on the physical equipment between the ranging sensor and the sensor of the photographing device, the acquired pixel coordinates of the region of interest (for example, the photographing target) can also be passed through a predetermined position. The key to conversion is to convert the location information of the region of interest in the coordinate system of the shooting device into the location information in the TOF coordinate system, and then control the ranging area of the distance sensor to achieve ranging.
在一些实施例中,距离传感器110包括发射光信号的发射装置和接收拍摄目标反射的光信号的接收装置,相应的,根据距离传感器110采集到的传感数据获取拍摄设备130与拍摄目标之间的实时距离,包括:根据接收装置接收到的光信号确定拍摄目标与拍摄设备130之间的距离。In some embodiments, the distance sensor 110 includes a transmitting device for transmitting optical signals and a receiving device for receiving optical signals reflected by the photographing target. Correspondingly, the distance between the photographing device 130 and the photographing target is obtained according to the sensing data collected by the distance sensor 110 . The real-time distance includes: determining the distance between the shooting target and the shooting device 130 according to the light signal received by the receiving device.
在一些实施例中,距离传感器110还可以包括发射光信号的发射装置和接收拍摄目标发射的光信号的接收装置,相应的,根据距离传感器110采集到的传感数据获取拍摄设备130与拍摄目标之间的实时距离,包括:根据接收装置接收到的声信号确定拍摄目标与拍摄设备130之间的距离。In some embodiments, the distance sensor 110 may further include a transmitting device for emitting optical signals and a receiving device for receiving optical signals emitted by the photographing target. Correspondingly, the photographing device 130 and the photographing target are acquired according to the sensing data collected by the distance sensor 110 . The real-time distance between them includes: determining the distance between the photographing target and the photographing device 130 according to the acoustic signal received by the receiving device.
本实施例中,距离传感器110可以为单点式测距传感器或者3D测距传感器,距离传感器110可以为TOF(Time Of Flight,时间飞行)测距传感器。本实施例对此不做限定。In this embodiment, the distance sensor 110 can be a single-point ranging sensor or a 3D ranging sensor, and the distance sensor 110 can be a TOF (Time Of Flight, time-of-flight) ranging sensor. This embodiment does not limit this.
在第一对焦方法中,镜头的对焦或跟焦一般是保持拍摄目标的位置和拍摄设备130的相机本体的焦平面位置均不变,通过转动拍摄设备130的镜头的跟焦环,镜头内壁的螺纹将转动的旋转角度转换成镜头的透镜组的前后平移距离,相当于在拍摄设备130与拍摄目标之间的实时距离保持不变的情况下,通过手动方式或者用跟焦器电机120驱动镜头转动,调整物距u和像距v使拍摄画面合焦。在第一对焦方法中,在暗光或低对比度环境下,效果不会受到影响。此外因为没有采用带有相位传感器的CMOS或者具备相位测距的 CMOS(像素较多,对焦性能较好,但图像质量会变差),所以对于图像传感器来说,画质没有丝毫损失,具有更高的清晰度。In the first focusing method, the focus or follow focus of the lens generally keeps the position of the shooting target and the position of the focal plane of the camera body of the shooting device 130 unchanged. The thread converts the rotation angle of rotation into the forward and backward translation distance of the lens group of the lens, which is equivalent to driving the lens manually or with the follow focus motor 120 under the condition that the real-time distance between the shooting device 130 and the shooting target remains unchanged. Rotate to adjust the object distance u and image distance v so that the shooting screen is in focus. In the first focusing method, the effect will not be affected in low light or low contrast environments. In addition, because there is no CMOS with phase sensor or CMOS with phase ranging (more pixels, better focusing performance, but the image quality will be worse), so for the image sensor, there is no loss of image quality, and it has better performance. high definition.
其中,第一置信度与距离传感器110的采集数据的信噪比呈正相关,即距离传感器110的噪音引起的失真越小,距离传感器110的反射光强度越大,距离传感器110的信噪比越高,第一置信度也就越高。The first confidence level is positively correlated with the signal-to-noise ratio of the collected data of the distance sensor 110, that is, the smaller the distortion caused by the noise of the distance sensor 110, the greater the reflected light intensity of the distance sensor 110, and the higher the signal-to-noise ratio of the distance sensor 110. The higher the first confidence level, the higher the first confidence level.
第二对焦方法为基于模糊度的对焦方法,方法利用点扩散函数(PSF)进行对焦,点扩散函数(PSF)是描述光学系统对点源解析能力的函数。因为点源在经过任何光学系统后都会由于衍射而形成一个扩大的像点,通过测量系统的点扩展函数,能够更准确地提取图像信息。The second focusing method is an ambiguity-based focusing method, and the method uses a point spread function (PSF) to focus, and the point spread function (PSF) is a function describing the ability of an optical system to resolve a point source. Because the point source will form an enlarged image point due to diffraction after passing through any optical system, the image information can be extracted more accurately by measuring the point spread function of the system.
基于模糊度对焦的方法是根据不同合焦位置上拍摄的不同的图像和各自的模糊度(例如通过PSF表征),推算出对焦曲线,然后得到合焦位置。The blur-based focusing method is to calculate the focusing curve according to different images captured at different focusing positions and their respective blur degrees (for example, represented by PSF), and then obtain the focusing positions.
由如下公式可知,在PSF1等于PSF1(d)并且PSF2等于PSF2(d)的情况下,picture1卷积PSF2(d)等于picture2卷积PSF1(d)。As can be seen from the following formula, in the case where PSF1 is equal to PSF1(d) and PSF2 is equal to PSF2(d), picture1 convolving PSF2(d) is equal to picture2 convolving PSF1(d).
Figure PCTCN2021086072-appb-000004
Figure PCTCN2021086072-appb-000004
Figure PCTCN2021086072-appb-000005
Figure PCTCN2021086072-appb-000005
其中,Picture0为合焦状态下的理想图片,Picture1为第一位置时拍摄得到的图像,PSF1为在第一位置对拍摄目标进行拍摄时镜头的第一模糊度,Picture2为第二位置时拍摄得到的图像,PSF2为在第二位置对拍摄目标进行拍摄时镜头的第二模糊度,PSF1(d)和PSF2(d)为在对焦行程上对拍摄设备130的镜头标定的模糊度,即PSF数据库中的模糊度。在对焦过程中,计算相邻位置的两张图像Picture1和Picture2,遍历数据库中的所有PSF,找到满足公式的PSF1(d)和PSF2(d),然后就确定了PSF1(d)和PSF2(d)对应的用于合焦的曲线,即可找到合焦点,如图2所示。Among them, Picture0 is the ideal picture in the in-focus state, Picture1 is the image captured at the first position, PSF1 is the first blur of the lens when the target is captured at the first position, and Picture2 is captured at the second position. , PSF2 is the second blur degree of the lens when shooting the target at the second position, PSF1 (d) and PSF2 (d) are the blur degrees calibrated to the lens of the shooting device 130 on the focusing stroke, that is, the PSF database ambiguity in . During the focusing process, two adjacent images, Picture1 and Picture2, are calculated, and all PSFs in the database are traversed to find PSF1(d) and PSF2(d) that satisfy the formula, and then PSF1(d) and PSF2(d) are determined. ) corresponding to the curve used for focusing, you can find the focusing point, as shown in Figure 2.
在本申请的一实施例中,如图2所示,在第二对焦方法中,在对焦行程上对拍摄设备130的拍摄位置进行了标定,不同的拍摄位置对应不同的图像模糊度。因此,对焦时,可控制拍摄设备130在第一位置和第二位置分别对拍摄目标进行拍摄,第一位置不同于第二位置;并可以获取在第一位置对拍摄目标进行拍摄时镜头的第一模糊度,以及在第二位置对拍摄目标进行拍摄时镜头的第二模糊度;然后,根据获取第一模糊度和第二模糊度确定第二镜头位置。In an embodiment of the present application, as shown in FIG. 2 , in the second focusing method, the shooting position of the shooting device 130 is calibrated on the focusing stroke, and different shooting positions correspond to different image blur degrees. Therefore, when focusing, the shooting device 130 can be controlled to shoot the shooting target at the first position and the second position respectively, and the first position is different from the second position; and the first position of the lens when shooting the shooting target at the first position can be obtained. a blur degree, and the second blur degree of the lens when the shooting target is photographed at the second position; then, the second lens position is determined according to the acquired first blur degree and the second blur degree.
在本申请的一实施例中,根据第一模糊度和第二模糊度确定第二镜头位置,包括:根据第一模糊度和第二模糊度确定用于对焦的曲线;然后根据曲线确定第二镜头位置。其中,在曲线中顶点处对应的位置即第二镜头位置。In an embodiment of the present application, determining the second lens position according to the first blurriness degree and the second blurriness degree includes: determining a curve for focusing according to the first blurriness degree and the second blurriness degree; then determining the second lens position according to the curve lens position. The position corresponding to the vertex in the curve is the position of the second lens.
其中,第一模糊度、第二模糊度可以采用上述公式对应的内容获取,依据模糊度确 定用于对焦的曲线的方法可以参照现有技术,此处不再赘述。Wherein, the first ambiguity and the second ambiguity can be obtained by using the content corresponding to the above formula, and the method for determining the curve used for focusing according to the ambiguity can refer to the prior art, which will not be repeated here.
需要说明的是,在本申请除了通过曲线确定目标镜头位置之外,还可以通过获取对焦数据表,通过查表的方式得到第二镜头位置,上述对焦方法仅仅为示例性的。It should be noted that, in this application, in addition to determining the target lens position through a curve, the second lens position can also be obtained by obtaining a focusing data table and looking up the table, and the above focusing method is only exemplary.
第二对焦方法具有第二置信度,第二置信度与曲线的曲率呈正相关,即对焦曲线的曲率越大,开口程度越小,则第二置信度越高,相反,对焦曲线的曲率越小,开口程度越大,则第二置信度越低。The second focusing method has a second confidence level, and the second confidence level is positively correlated with the curvature of the curve, that is, the larger the curvature of the focusing curve, the smaller the opening degree, the higher the second confidence level, on the contrary, the smaller the curvature of the focusing curve is. , the greater the degree of opening, the lower the second confidence.
在本申请的步骤S202中,所述基于预设规则确定对焦方式,包括:获取所述第一镜头位置的第一置信度和所述第二镜头位置的第二置信度;基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。In step S202 of the present application, the determining the focusing mode based on the preset rule includes: acquiring a first confidence level of the first lens position and a second confidence level of the second lens position; The confidence level and the threshold range to which the second confidence level with a higher confidence level belongs is used to determine the focusing mode.
在本申请中,由于第一对焦方法和第二对焦方法为不同的方法,是基于两个不同的器件输出的结果,因此,需要在数值上做物理意义的对齐,所述基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,包括:对所述第一置信度和所述第二置信度进行归一化处理;基于所述归一化处理后的第一置信度和所述归一化处理后所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,通过归一化处理以用于在同一个单位量度下,对第一置信度和第二置信度进行比较,以确定第一镜头位置和第二镜头位置中置信度更高的一个。In this application, since the first focusing method and the second focusing method are different methods and are based on the results of two different device outputs, it is necessary to align the values in physical sense. The threshold range to which the higher confidence level of the confidence level and the second confidence level belong, and determining the focusing mode includes: normalizing the first confidence level and the second confidence level; The first confidence level after the normalization process and the threshold range to which the second confidence level after the normalization process has a higher confidence level belong to, determine the focusing mode, and use the normalization process to be used for Under the same unit measure, the first confidence level and the second confidence level are compared to determine the higher confidence level of the first shot position and the second shot position.
可以采用任意适合的方法对所述第一置信度和所述第二置信度进行归一化处理,例如,先对第一置信度和第二置信度进行标定,可以通过在N个特定场景中,已知真实值(ground truth)的情况下,测试第一对焦方法的第一镜头位置和第一置信度,以及第二对焦方法的第二镜头位置以及第二置信度,使置信度对齐,进而进行比较。The first confidence level and the second confidence level may be normalized by any suitable method. For example, the first confidence level and the second confidence level are calibrated first, and the , when the ground truth is known, test the first lens position and the first confidence of the first focusing method, and the second lens position and second confidence of the second focusing method, so that the confidences are aligned, to compare.
在一个示例中,所述基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,还包括:对所述第一置信度和所述第二置信度进行归一化处理;根据拍摄设备的拍摄场景,确定第一置信度的第一权重和第二置信度的第二权重;通过归一化后的第一置信度和第一权重确定最终的第一置信度,以及通过归一化后的第二置信度和第二权重确定最终的第二置信度,基于最终的第一置信度和最终的第二置信度中置信度较高者所属的阈值范围,确定对焦方式。其中,根据拍摄设备的拍摄场景,确定第一置信度的第一权重和第二置信度的第二权重,例如当第一对焦方法为3D TOF对焦方法,而拍摄场景为暗光环境,则对第一置信度赋予的第一权重大于对第二置信度赋予的第二权重,再例如,当拍摄目标和拍摄设备之间的拍摄距离小于或等于阈值距离时,例如拍摄距离小于或等于1.5m,例如介于0.5m至1.5m之间,进一步,小于或等于1m时,例如拍摄距离大体为1m时,则对第一置信度赋予的第一权重小于对第二置信度赋予的第二权重。通过归一化后的第一置信度和第一权重确定最终的第一置信度,以及通过归一化后的第二 置信度和第二权重确定最终的第二置信度,进而再将最终的第一置信度和最终的第二置信度进行比较,确定两者中的置信度更高者,进而置信度较高者所属的阈值范围,确定对焦方式。In an example, the determining the focusing mode based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs, further comprising: comparing the first confidence level and the second confidence level The second confidence level is normalized; according to the shooting scene of the shooting device, the first weight of the first confidence level and the second weight of the second confidence level are determined; The weight determines the final first confidence level, and the final second confidence level is determined by the normalized second confidence level and the second weight, based on the final first confidence level and the final second confidence level. The threshold range that the higher one belongs to determines the focusing method. The first weight of the first confidence level and the second weight of the second confidence level are determined according to the shooting scene of the shooting device. For example, when the first focusing method is a 3D TOF focusing method and the shooting scene is a dark environment, then The first weight assigned to the first confidence level is greater than the second weight assigned to the second confidence level. For another example, when the shooting distance between the shooting target and the shooting device is less than or equal to the threshold distance, for example, the shooting distance is less than or equal to 1.5m , for example, between 0.5m and 1.5m, and further, when it is less than or equal to 1m, for example, when the shooting distance is approximately 1m, the first weight assigned to the first confidence level is smaller than the second weight assigned to the second confidence level . The final first confidence degree is determined by the normalized first confidence degree and the first weight, and the final second confidence degree is determined by the normalized second confidence degree and the second weight, and then the final The first confidence level is compared with the final second confidence level, and the higher confidence level of the two is determined, and then the threshold range to which the higher confidence level belongs, and the focusing mode is determined.
在对焦过程中,每帧影像信息,会对应输出一个第一镜头位置和第一置信度以及一个第二镜头位置和第二置信度,以用于判定基于何种对焦方式进行对焦。During the focusing process, each frame of image information will correspondingly output a first lens position and a first confidence level and a second lens position and a second confidence level, so as to determine which focusing method to focus on.
示例性地,基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,其中,阈值范围可以根据实际需要合理的设定,例如,阈值范围可以包括第一阈值范围、第二阈值范围、第三阈值范围和第四阈值范围,其中,第一阈值范围大于第二阈值范围,第二阈值范围大于第三阈值范围,第三阈值范围大于第四阈值范围,例如,第一阈值范围大于90%,第二阈值范围小于或等于90%且大于70%,所述第三阈值范围小于或等于70%且大于或等于50%,所述第四阈值范围小于50%。Exemplarily, the focusing mode is determined based on a threshold range to which the first confidence level and the second confidence level with a higher confidence level belong, where the threshold range can be reasonably set according to actual needs, for example, The threshold range may include a first threshold range, a second threshold range, a third threshold range, and a fourth threshold range, wherein the first threshold range is greater than the second threshold range, the second threshold range is greater than the third threshold range, and the third threshold range greater than the fourth threshold range, for example, the first threshold range is greater than 90%, the second threshold range is less than or equal to 90% and greater than 70%, the third threshold range is less than or equal to 70% and greater than or equal to 50%, the The fourth threshold range is less than 50%.
在一个示例中,当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于第一阈值范围内而触发状态机从当前状态切换为目标状态时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦,可选地,所述当前状态包括第一状态、第二状态或第三状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。由于第一阈值范围内则表示置信度较高者对应的第一镜头位置或第二镜头位置的位置是比较精准的,因此直接利用置信度较高者对应的第一镜头位置或第二镜头位置进行对焦,即可使拍摄设备的镜头处于合焦状态,从而能够快速精确的实现对焦。In an example, when the person with the higher confidence level is within the first threshold range, focusing on the photographing device based on the first lens position or the second lens position corresponding to the person with the higher confidence degree, including: When the state machine is triggered to switch from the current state to the target state in response to the higher confidence being within the range of the first threshold, the first lens position or the second lens position corresponding to the higher confidence The photographing device focuses, optionally, the current state includes a first state, a second state or a third state, wherein the first state is before the second state, and the second state is before the second state before the third state. Since the position within the first threshold value indicates that the position of the first lens position or the second lens position corresponding to the one with higher confidence is relatively accurate, the position of the first lens or the second lens corresponding to the one with higher confidence is directly used. By focusing, the lens of the shooting device can be in focus, so that the focusing can be achieved quickly and accurately.
在本申请中,对焦过程中的状态机可以包括多个状态,例如包括第一状态、第二状态、第三状态、第四状态、目标状态,第一状态在第二状态之前,第二状态在第三状态之前,第三状态在第四状态之前,第四状态在目标状态之前,具体地例如,如图4所示,第一状态可以为准备阶段的初始化(AF prepare init)、准备阶段的运行(AF prepare main)、第二状态例如为粗搜索阶段的初始化(AF coarse init)、粗搜索阶段的运行(AF coarse main)、第三状态例如为精搜索阶段的初始化(AF fine init)、第四状态例如为精搜索阶段的运行(AF fine main)、最终合焦(GoToPeak)。上述状态机的划分方式仅作为示例,对于其他适合的状态机也可以适用于本申请。In this application, the state machine in the focusing process may include multiple states, such as a first state, a second state, a third state, a fourth state, and a target state. The first state precedes the second state, and the second state Before the third state, the third state is before the fourth state, and the fourth state is before the target state. Specifically, for example, as shown in FIG. 4 , the first state may be the initialization of the preparation phase (AF prepare init), the preparation phase (AF prepare main), the second state is, for example, the initialization of the coarse search stage (AF coarse init), the operation of the coarse search stage (AF coarse main), and the third state is, for example, the initialization of the fine search stage (AF fine init) . The fourth state is, for example, the operation of the fine search phase (AF fine main) and the final focus (GoToPeak). The above-mentioned division manner of the state machine is only an example, and other suitable state machines can also be applied to the present application.
在一个示例中,基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当所述置信度较高者处于第二阈值范围内时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦。例如,当响应于所述置信度较高者 处于第二阈值范围内而触发状态机从当前状态切换为第三状态(例如精搜索阶段的初始化)时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述当前状态包括第一状态(例如准备阶段的初始化)或第二状态(例如粗搜索阶段的初始化),其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。通过先控制拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,可以使得镜头位置邻近合焦位置,再利用第三对焦方法进行精调,以更加快速和准确的确定合焦位置符合的第三镜头位置,从而快速和准确的实现对焦。In an example, determining the focusing mode based on a threshold range where the higher one of the first confidence level and the second confidence level is located includes: when the higher confidence level is within a second threshold range When inside, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the one with the higher confidence, and then perform the shooting of the shooting device based on the third lens position determined by the third focusing method. Focus. For example, when the state machine is triggered to switch from the current state to the third state (such as the initialization of the fine search stage) in response to the higher confidence being within the second threshold range, first control the lens of the photographing device to move to The first lens position or the second lens position corresponding to the one with a higher degree of confidence, and then focus on the shooting device based on the third lens position determined by the third focusing method, and the current state includes the first state (for example, ready to use). initialization of a stage) or a second state (eg, initialization of a coarse search stage), wherein the first state precedes the second state and the second state precedes the third state. By first controlling the lens of the photographing device to move to the first lens position or the second lens position corresponding to the one with the higher confidence, the lens position can be made close to the in-focus position, and then the third focusing method is used for fine adjustment, so as to be faster And accurately determine the position of the third lens that matches the in-focus position, so as to achieve fast and accurate focusing.
在本申请中,基于所述第三对焦方法确定所述第三镜头位置,包括:驱动镜头沿第一方向和/或第二方向移动至少两个位置,其中所述第一方向和所述第二方向为相反的方向;获取所述镜头在各个位置处获取的影像数据信息;基于各个影像数据信息的清晰度,确定第三镜头位置,其中,所述第三镜头位置用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态。示例性地,所述基于各个影像数据信息的清晰度,确定第三镜头位置,包括:基于各个影像数据信息的清晰度确定用于对焦的第一曲线;基于所述第一曲线确定所述第三镜头位置。其中,所述第三镜头位置为各个影像数据信息中清晰度最高的影像数据信息对应的镜头位置,也即在第一曲线的顶点处对应的镜头位置。可选地,所述第一方向和所述第二方向平行于所述拍摄设备的镜头的光轴,或者,所述第一方向和所述第二方向和所述拍摄设备的镜头的光轴重合。其中,第三对焦方法可以适应多种应用场景,并且对焦精度高。In the present application, determining the position of the third lens based on the third focusing method includes: driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the first direction The two directions are opposite directions; the image data information obtained by the lens at each position is acquired; the third lens position is determined based on the clarity of each image data information, wherein the third lens position is used to enable the shooting target to be able to In focus on the shooting screen of the shooting device. Exemplarily, the determining the third lens position based on the sharpness of each image data information includes: determining a first curve for focusing based on the sharpness of each image data information; determining the first curve based on the first curve. Three lens positions. The third lens position is the lens position corresponding to the image data information with the highest definition in each image data information, that is, the lens position corresponding to the vertex of the first curve. Optionally, the first direction and the second direction are parallel to the optical axis of the lens of the photographing device, or the first direction and the second direction and the optical axis of the lens of the photographing device coincide. Among them, the third focusing method can be adapted to a variety of application scenarios and has high focusing accuracy.
可选地,获取所述镜头在各个位置处获取的影像数据信息包括将各个位置上获得影像数据信息进行数字化,其中,数字化的影像数据信息可以是一个整数矩阵,之后,基于数字化的影像数据信息计算获取各个影像数据信息的清晰度,其中可以计算获取各个影像数据信息的反差量(例如对比度或梯度),基于反差量来表征各个影像数据信息的清晰度,可以利用曲线筛选出清晰度最高(也即反差量最大)的影像数据信息,也可以将各个影像数据信息的清晰度进行对比筛选出清晰度最高(也即反差量最大)的影像数据信息,进而确定第三镜头位置获得正确的对焦位置,从而最终驱动镜头从当前镜头位置移动到第三镜头位置。在一个示例中,还可以根据反差量最大的值确定镜头是否合焦,也即确定对焦是否完成。在第三对焦方法对焦过程中,反映在用户交互界面上时,则是取景画面由模糊到清晰再到模糊,最终清晰的“拉风箱”式的过程。这种判断能获得非常高的对焦精度,实际使用也是如此。第三对焦方法被称为反差式对焦(Contrast Detection Auto Focus,简称CDAF)。Optionally, acquiring the image data information obtained by the lens at each position includes digitizing the image data information obtained at each position, wherein the digitized image data information may be an integer matrix, and then, based on the digitized image data information Calculate and obtain the sharpness of each image data information, in which the contrast amount (such as contrast or gradient) of each image data information can be calculated and obtained, and the sharpness of each image data information can be characterized based on the contrast amount, and the curve can be used to filter out the highest sharpness ( That is, the image data information with the largest amount of contrast) can also be compared for the sharpness of each image data information to screen out the image data information with the highest definition (that is, the largest amount of contrast), and then determine the position of the third lens to obtain the correct focus. position, thereby finally driving the lens to move from the current lens position to the third lens position. In an example, it may also be determined whether the lens is in focus, that is, whether the focus is completed, according to the value with the largest contrast amount. During the focusing process of the third focusing method, when it is reflected on the user interaction interface, it is a process of "pulling the bellows" from blurred to clear to blurred and finally clear. This judgment can obtain very high focusing accuracy, and the same is true in actual use. The third focusing method is called Contrast Detection Auto Focus (CDAF).
在一个示例中,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当响应于所述置信度较高者处于第三阈值范围内而触发状态机从第一状态切换为第二状态时,先基于所述置信度较高者对应的第一镜头位置或第二镜头位置确定镜头的移动方向,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第三对焦方法按照所述移动方向移动所述拍摄设备的镜头,所述移动方向包括第一方向或第二方向,其中所述第一方向和所述第二方向为相反的方向,所述第一状态位于所述第二状态之前。所述置信度较高者对应的第一镜头位置或第二镜头位置虽然不能十分准确的给出镜头的合焦位置,但是,其可以大体指示合焦位置的位置范围,因此可以确定移动方向,该移动方向也即驱动镜头从当前位置向置信度较高者对应的第一镜头位置或第二镜头位置移动时的方向,该移动方向可以辅助第三对焦方法快速准确的确定第三镜头位置,从而快速准确的进行对焦。In an example, the determining the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located includes: when the higher confidence level is in a When the state machine is triggered to switch from the first state to the second state within the third threshold range, the moving direction of the lens is first determined based on the first lens position or the second lens position corresponding to the higher confidence level, and then based on the third The third lens position determined by the focusing method focuses the photographing device, and the third focusing method moves the lens of the photographing device according to the moving direction, and the moving direction includes the first direction or the second direction, wherein the The first direction and the second direction are opposite directions, and the first state is located before the second state. Although the position of the first lens or the position of the second lens corresponding to the one with a higher degree of confidence cannot give the in-focus position of the lens very accurately, it can generally indicate the position range of the in-focus position, so the moving direction can be determined, The moving direction is also the direction of driving the lens to move from the current position to the first lens position or the second lens position corresponding to the one with higher confidence. The moving direction can assist the third focusing method to quickly and accurately determine the third lens position. This enables fast and accurate focusing.
示例性地,移动方向包括第一方向或第二方向,其中所述第一方向和所述第二方向为相反的方向,所述第一方向和所述第二方向平行于所述拍摄设备的镜头的光轴,或者,所述第一方向和所述第二方向和所述拍摄设备的镜头的光轴重合。Exemplarily, the moving direction includes a first direction or a second direction, wherein the first direction and the second direction are opposite directions, and the first direction and the second direction are parallel to the photographing device. The optical axis of the lens, or the first direction and the second direction coincide with the optical axis of the lens of the photographing device.
在另一个示例中,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,其中,所述第二阈值范围大于所述第三阈值范围,所述第三阈值范围大于所述第四阈值范围。当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,则表明置信度较高者对应的第一镜头位置或第二镜头位置无法准确的实现对焦,因此,此时可以用第三对焦方法进行对焦,其中,第三对焦方法能够实现对对焦位置的精调,且稳定好,在静态场景下能够定位到任何适合的第三镜头位置。In another example, the determining the focusing mode based on the threshold range in which the higher one of the first confidence level and the second confidence level is located includes: when the higher confidence level is in the first When within the second threshold range or within the third threshold range or within the fourth threshold range, focus on the photographing device based on the third lens position determined by the third focusing method, wherein the second threshold range is greater than the third threshold range A threshold range, the third threshold range is greater than the fourth threshold range. When the person with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range, it indicates that the position of the first lens or the position of the second lens corresponding to the person with higher confidence cannot be accurately realized Therefore, at this time, the third focusing method can be used for focusing, wherein the third focusing method can realize fine adjustment of the focusing position, and is stable, and can locate any suitable third lens position in a static scene.
在一个示例中,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第四阈值范围内而触发状态机从第一状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第一状态之后。其中,第一状态例如为准备阶段的初始化,第四状态例如为精搜索阶段的运行(AF fine main)。In one example, when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method. Focusing, including: when the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence being within the fourth threshold range, the third lens position determined based on the third focusing method for the The photographing device performs focusing, and the fourth state is subsequent to the first state. The first state is, for example, the initialization of the preparation stage, and the fourth state is, for example, the operation of the fine search stage (AF fine main).
在另一个示例中,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第三阈值范围内或所述第四阈值范围内而触发状态 机从第二状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第二状态之后。其中,第二状态例如为粗搜索阶段的初始化,第四状态例如为精搜索阶段的运行(AF fine main)。In another example, when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the photographing device is determined based on the third lens position determined by the third focusing method. Focusing includes: when the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, focusing based on the third The third lens position determined by the method focuses the photographing device, and the fourth state is subsequent to the second state. The second state is, for example, the initialization of the rough search stage, and the fourth state is, for example, the operation of the fine search stage (AF fine main).
在其他示例中,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第二阈值范围内或所述第三阈值范围内或所述第四阈值范围内而触发状态机从第三状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第三状态之后。其中,第三状态例如为精搜索阶段的初始化,第四状态例如为精搜索阶段的运行。In other examples, when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method. Focusing, comprising: triggering a state machine to switch from a third state to a fourth state in response to the higher confidence being within the second threshold range or within the third threshold range or within the fourth threshold range In the state, the photographing device is focused based on the third lens position determined by the third focusing method, and the fourth state is subsequent to the third state. The third state is, for example, the initialization of the fine search stage, and the fourth state is, for example, the operation of the fine search stage.
在一个具体示例中,如图4所示,当置信度较高者处于第一阈值范围例如大于90%时,标记为OK++,当置信度较高者处于第二阈值范围例如位于70%到90%之间时,标记为OK+,当置信度较高者处于第三阈值范围例如位于50%到70%之间时,标记为OK,当置信度较高者处于第三阈值范围例如小于50%,标记为NG。In a specific example, as shown in FIG. 4 , when the person with higher confidence is in the first threshold range, for example, greater than 90%, it is marked as OK++, and when the person with higher confidence is in the second threshold range, for example, in the range of 70% to 90 %, mark as OK+, when the higher confidence is in the third threshold range, such as between 50% and 70%, mark as OK, when the confidence is higher in the third threshold range, such as less than 50% , marked as NG.
如图4所示,将第一对焦方法的输出结果例如第一镜头位置和第一置信度和第二对焦方法的输出结果例如第二镜头位置和第二置信度,经过前文中的归一化以及赋予权重等处理后,进行比较获得置信度较高者,将置信度较高者对应的数值输入到状态机的准备阶段的初始化阶段、粗搜索阶段的初始化、精搜索阶段的初始化,以确定使用第一对焦方法、第二对焦方法和第三对焦方法中的哪个方法进行对焦。As shown in FIG. 4 , the output results of the first focusing method, such as the first lens position and the first confidence level, and the output results of the second focusing method, such as the second lens position and the second confidence level, are subjected to the normalization described above. And after processing such as giving weights, compare to obtain the higher confidence, and input the value corresponding to the higher confidence into the initialization phase of the state machine's preparation phase, the initialization of the rough search phase, and the initialization of the fine search phase to determine Which of the first focusing method, the second focusing method and the third focusing method is used for focusing.
继续如图4所示,当准备阶段的初始化阶段判断置信度较高者(conf)为OK++时,则跳转到最终合焦(GoToPeak),直接利用置信度较高者对应的第一镜头位置(例如3D TOF的输出)或第二镜头位置(例如BDAF的输出)完成对焦;当准备阶段的初始化阶段判断置信度较高者(conf)为OK+时则跳转到精搜索阶段的初始化阶段,将镜头移动到置信度较高者对应的第一镜头位置或第二镜头位置附近,之后,使用第三对焦方法进行精调寻找,以获得第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦;当准备阶段的初始化阶段判断置信度较高者(conf)为OK时则跳转到粗搜索阶段的初始化阶段,首先利用置信度较高者对应的第一镜头位置或第二镜头位置判断在第三对焦方法寻找第三镜头位置时的移动方向,在已知移动方向的前提下,使用第三对焦方法进行精调寻找,以获得第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦;当准备阶段的初始化阶段判断置信度较高者(conf)为NG时则跳转到精搜索阶段的初始化阶段,首先使用第三对焦方法确定第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦。Continue as shown in Figure 4, when the initialization stage of the preparation stage judges that the one with higher confidence (conf) is OK++, then jump to the final focus (GoToPeak), and directly use the first lens position corresponding to the one with higher confidence (such as the output of 3D TOF) or the second lens position (such as the output of BDAF) to complete the focus; when the initialization stage of the preparation stage judges that the one with higher confidence (conf) is OK+, it jumps to the initialization stage of the fine search stage, Move the lens to the vicinity of the first lens position or the second lens position corresponding to the one with higher confidence, and then use the third focusing method to perform fine-tuning search to obtain the third lens position (that is, the in-focus position), thus based on The focus of the third lens position is completed; when the initialization stage of the preparation stage judges that the one with higher confidence (conf) is OK, then jump to the initialization stage of the rough search stage, and firstly use the first lens position corresponding to the one with higher confidence or The second lens position judges the moving direction when the third focusing method finds the third lens position. On the premise that the moving direction is known, use the third focusing method to fine-tune the search to obtain the third lens position (that is, the focus is achieved). position), so as to complete focusing based on the position of the third lens; when the initialization stage of the preparation stage determines that the one with higher confidence (conf) is NG, it jumps to the initialization stage of the fine search stage, and firstly uses the third focusing method to determine the third The lens position (that is, the in-focus position), so that focusing is completed based on the third lens position.
继续如图4所示,当粗搜索阶段的初始化阶段判断置信度较高者(conf)为OK++ 时,则跳转到最终合焦(GoToPeak),直接利用置信度较高者对应的第一镜头位置(例如3D TOF的输出)或第二镜头位置(例如BDAF的输出)完成对焦;当粗搜索阶段的初始化阶段判断置信度较高者(conf)为OK+时则跳转到精搜索阶段的初始化阶段,将镜头移动到置信度较高者对应的第一镜头位置或第二镜头位置附近,之后,使用第三对焦方法进行精调寻找,以获得第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦;当准备阶段的初始化阶段判断置信度较高者(conf)为OK或NG时则跳转到精搜索阶段的初始化阶段,首先使用第三对焦方法确定第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦。Continue as shown in Figure 4, when the initialization stage of the rough search stage judges that the one with higher confidence (conf) is OK++, then jump to the final focus (GoToPeak), and directly use the first shot corresponding to the one with higher confidence The position (such as the output of 3D TOF) or the second lens position (such as the output of BDAF) completes the focus; when the initialization stage of the coarse search stage judges that the one with higher confidence (conf) is OK+, it jumps to the initialization of the fine search stage In the first stage, move the lens to the vicinity of the first lens position or the second lens position corresponding to the one with higher confidence, and then use the third focusing method to fine-tune the search to obtain the third lens position (that is, the in-focus position), Thus, focusing is completed based on the position of the third lens; when the initialization stage of the preparation stage determines that the one with higher confidence (conf) is OK or NG, it jumps to the initialization stage of the fine search stage, and firstly uses the third focusing method to determine the third lens position (ie, in-focus position), so that focusing is completed based on the third lens position.
继续如图4所示,当精搜索阶段的初始化阶段判断置信度较高者(conf)为OK++时,则跳转到最终合焦(GoToPeak),直接利用置信度较高者对应的第一镜头位置(例如3D TOF的输出)或第二镜头位置(例如BDAF的输出)完成对焦;当准备阶段的初始化阶段判断置信度较高者(conf)为OK+或OK或NG时则跳转到精搜索阶段的初始化阶段,首先使用第三对焦方法确定第三镜头位置(也即合焦位置),从而基于第三镜头位置完成对焦。Continue as shown in Figure 4, when the initialization stage of the fine search stage judges that the one with higher confidence (conf) is OK++, then jump to the final focus (GoToPeak), and directly use the first shot corresponding to the one with higher confidence The position (such as the output of 3D TOF) or the second lens position (such as the output of BDAF) completes the focus; when the initialization stage of the preparation stage judges that the one with higher confidence (conf) is OK+ or OK or NG, it jumps to fine search In the initialization phase of the stage, the third focusing method is used first to determine the third lens position (ie, the focus position), so as to complete focusing based on the third lens position.
在本申请中,对焦方法中包括第一对焦方法、第二对焦方法和第三对焦方法,三种对焦方法具有各自的优点,本申请将三种对焦方法的优点集中在一起,进一步提高对焦的准确性,例如利用距离传感器110的第一对焦方法确定第一镜头位置有足够的分辨率和精度,可以满足一定距离内测距,所以第一对焦方法的规格内,可以满足对焦辅助要求,并且第一对焦方法在暗光或低对比度环境下具有很好的适用性,且不会影响拍摄影像的质量。而在第一对焦方法的规格之外的情况,需要第二对焦方法来估计合焦位置,提升自动对焦辅助的效果。In this application, the focusing methods include a first focusing method, a second focusing method and a third focusing method, and the three focusing methods have their own advantages. Accuracy, for example, using the first focusing method of the distance sensor 110 to determine that the position of the first lens has sufficient resolution and accuracy to meet the distance measurement within a certain distance, so within the specifications of the first focusing method, it can meet the requirements of focusing assistance, and The first focusing method has good applicability in low-light or low-contrast environments, and does not affect the quality of the captured image. In cases outside the specifications of the first focusing method, a second focusing method is required to estimate the in-focus position and improve the effect of AF assist.
例如,第一对焦方法中最大测距范围不会超过10米,但是部分镜头需要满足10米以上的自动对焦;一般的第一对焦方法确定第一镜头位置的精度在5%左右,但部分镜头在较近距离情况下,对精度的要求非常高,可能在1%左右。因此,在第一对焦方法无法满足合焦估计的情况下,可以使用第二对焦方法估计合焦位置,而在静止情况下,对于高对比度场景,第二对焦方法确定第二镜头位置的精度在[-1Fδ,1Fδ],低对比度场景下,第二对焦方法确定第二镜头位置的精度在[-2Fδ,2Fδ],其中,所述Fδ为弥散斑的大小,可以满足手动对焦辅助的要求。但对于运动场景,尤其剧烈运动时,第二对焦方法确定第二镜头位置的精度会随之下降,此时可以通过第一对焦方法进行对焦。其中,高对比度场景是指拍摄目标和环境背景具有大的对比度和/或具有良好的光照条件,例如拍摄背景为黑色,而拍摄目标为白色,和/或具有良好的光照,此时为高度对比场景,反之,若拍摄目标和环境背景的颜色相近,光照条件较差则为低对比场景。For example, the maximum ranging range in the first focusing method will not exceed 10 meters, but some lenses need to meet the auto focus of more than 10 meters; the general first focusing method determines the accuracy of the position of the first lens is about 5%, but some lenses At closer distances, the accuracy requirements are very high, perhaps around 1%. Therefore, in the case where the first focusing method cannot satisfy the in-focus estimation, the second focusing method can be used to estimate the in-focus position, and in a static situation, for a high-contrast scene, the accuracy of the second focusing method in determining the position of the second lens is [-1Fδ, 1Fδ], in a low-contrast scene, the accuracy of the second focusing method for determining the position of the second lens is [-2Fδ, 2Fδ], where the Fδ is the size of the speckle, which can meet the requirements of manual focus assistance. However, for a sports scene, especially during vigorous exercise, the accuracy of determining the position of the second lens by the second focusing method will decrease accordingly. In this case, focusing can be performed by the first focusing method. Among them, a high-contrast scene means that the subject and the ambient background have a large contrast and/or have good lighting conditions, for example, the shooting background is black, and the shooting target is white, and/or has good lighting, which is high contrast. On the contrary, if the color of the subject and the background are similar, and the lighting conditions are poor, it is a low-contrast scene.
需要说明的是,第一对焦方法确定第一镜头位置的精确度以及第二对焦方法确定第二镜头位置的精确度与应用场景的联系,最终可以反映在上述说明的置信度上,由此,基于置信度选择的目标镜头位置可以较好地用于不同动静态、不同对比度、不同距离的应用场景的对焦。It should be noted that the relationship between the accuracy of determining the position of the first lens by the first focusing method and the accuracy of determining the position of the second lens by the second focusing method and the application scene can be finally reflected in the confidence described above. Therefore, The target lens position selected based on the confidence level can be better used for focusing in different dynamic and static, different contrast, and different distance application scenarios.
当利用置信度较高者对应的第一镜头位置或第二镜头位置满足预设规则时,则可以直接利用其进行对焦,从而可以提升对焦速率和准确性,而当第一对焦方法和第二对焦方法均无法满足对焦要求时,则可以利用第三对焦方法来确定第三镜头位置,进而完成对焦,第三对焦方法能够进行精调,稳定性好,准确性高,且适用于绝大多数静止场景,适用范围更广。When the first lens position or the second lens position corresponding to the one with higher confidence satisfies the preset rule, it can be directly used for focusing, so that the focusing speed and accuracy can be improved, and when the first focusing method and the second focusing method are used When the focusing methods cannot meet the focusing requirements, the third focusing method can be used to determine the position of the third lens and then complete the focusing. The third focusing method can be finely adjusted, has good stability and high accuracy, and is suitable for most Still scene, applicable to a wider range.
由上可知,本申请则是结合第一对焦方法、第二对焦方法和第三对焦方法各自的优点来辅助自动对焦,提升其准确率,辅助快速对焦。本申请的对焦方法不依赖于图像传感器的性能,即可实现拍摄设备的快速对焦,适用范围更广,且本申请的对焦方法无需采用PD像素,因此对于图像传感器来说,所拍摄的画面质量不会受到丝毫影响,另外,可以根据预设规则,选择适合的对焦方法进行对焦,提高了对焦方式的准确性和效果。As can be seen from the above, the present application combines the advantages of the first focusing method, the second focusing method and the third focusing method to assist the automatic focusing, improve its accuracy, and assist the fast focusing. The focusing method of the present application does not depend on the performance of the image sensor, and can realize the fast focusing of the photographing device, and has a wider application range, and the focusing method of the present application does not need to use PD pixels, so for the image sensor, the quality of the captured image It will not be affected in the slightest. In addition, a suitable focusing method can be selected for focusing according to preset rules, which improves the accuracy and effect of the focusing method.
本申请实施例第二方面提供了一种拍摄设备,以用于执行前文的对焦方法。A second aspect of the embodiments of the present application provides a photographing device for executing the foregoing focusing method.
在一个实施例中,如图5所示,本实施例的拍摄设备500可以包括:至少一个处理器501和存储器502。其中,处理器501和存储器502通过总线503连接。In one embodiment, as shown in FIG. 5 , the photographing device 500 of this embodiment may include: at least one processor 501 and a memory 502 . The processor 501 and the memory 502 are connected through a bus 503 .
在具体实现过程中,存储器502存储计算机执行指令,至少一个处理器501执行存储器502存储的计算机执行指令,使得执行计算机执行指令时实现如下步骤:获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法;基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。In a specific implementation process, the memory 502 stores the computer-executed instructions, and at least one processor 501 executes the computer-executed instructions stored in the memory 502, so that the following steps are implemented when executing the computer-executed instructions: acquiring a shooting screen for enabling the shooting target to be captured by the shooting device The first lens position and the second lens position in the in-focus state, wherein the first lens position is based on the first focusing method; the focusing method is determined based on a preset rule, and the focusing method is determined based on the determined focusing method. focusing on the photographing device, wherein the focusing method includes any one of the following methods: focusing the photographing device based on one of the first lens position and the second lens position, or focusing on the photographing device based on the first lens position and the second lens position. One of the first lens position, the second lens position, and the third lens position determined by a third focusing method focuses the photographing device, wherein the third focusing method is different from the first focusing method and the second focusing method.
存储器,所述存储器存储计算机执行指令;a memory that stores computer-executed instructions;
至少一个处理器,所述至少一个处理器执行所述存储器存储的计算机执行指令,使得执行所述计算机执行指令时实现如下步骤:At least one processor, the at least one processor executes the computer-executable instructions stored in the memory, so that the following steps are implemented when the computer-executable instructions are executed:
在一个示例中,处理器501用于所述基于预设规则确定对焦方式,包括:获取所述第一镜头位置的第一置信度和所述第二镜头位置的第二置信度;基于所述第一置信度和所 述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。In an example, the processor 501 is configured to determine the focusing mode based on the preset rule, including: acquiring a first confidence level of the first lens position and a second confidence level of the second lens position; based on the The focusing mode is determined by the threshold range to which the higher confidence level of the first confidence level and the second confidence level belongs.
在一个示例中,所述处理器501用于基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。In an example, the processor 501 is configured to determine the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, including: when the confidence level is higher than When the higher one is within the first threshold range, the photographing device is focused based on the first lens position or the second lens position corresponding to the higher confidence value.
在一个示例中,当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于第一阈值范围内而触发状态机从当前状态切换为目标状态时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。可选地,所述当前状态包括第一状态、第二状态或第三状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。In an example, when the person with the higher confidence level is within the first threshold range, focusing on the photographing device based on the first lens position or the second lens position corresponding to the person with the higher confidence degree, including: When the state machine is triggered to switch from the current state to the target state in response to the higher confidence being within the range of the first threshold, the first lens position or the second lens position corresponding to the higher confidence Focus on the camera described above. Optionally, the current state includes a first state, a second state or a third state, wherein the first state precedes the second state and the second state precedes the third state.
在一个示例中,处理器501用于基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当所述置信度较高者处于第二阈值范围内时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦。In an example, the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when the higher confidence level is When it is within the second threshold range, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the one with the higher confidence, and then adjust the third lens position determined based on the third focusing method. The photographing device focuses.
在一个示例中,处理器501用于基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当响应于所述置信度较高者处于第二阈值范围内而触发状态机从当前状态切换为第三状态时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述当前状态包括第一状态或第二状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。In one example, the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when in response to a higher confidence level When the higher one is within the second threshold range and the state machine is triggered to switch from the current state to the third state, first control the lens of the shooting device to move to the first lens position or the second lens position corresponding to the higher confidence value , and then focus the photographing device based on the third lens position determined by the third focusing method, the current state includes a first state or a second state, wherein the first state is before the second state, and the The second state precedes the third state.
在一个示例中,处理器501用于基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当响应于所述置信度较高者处于第三阈值范围内而触发状态机从第一状态切换为第二状态时,先基于所述置信度较高者对应的第一镜头位置或第二镜头位置确定镜头的移动方向,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第三对焦方法按照所述移动方向移动所述拍摄设备的镜头,所述移动方向包括第一方向或第二方向,其中所述第一方向和所述第二方向为相反的方向,所述第一状态位于所述第二状态之前。In one example, the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when in response to a higher confidence level When the higher one is within the third threshold range and the state machine is triggered to switch from the first state to the second state, first determine the moving direction of the lens based on the first lens position or the second lens position corresponding to the higher confidence value, and then The photographing device is focused based on the third lens position determined by a third focusing method, and the third focusing method moves the lens of the photographing device according to the moving direction, and the moving direction includes the first direction or the second direction , wherein the first direction and the second direction are opposite directions, and the first state is located before the second state.
在一个示例中,处理器501用于基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄 设备进行对焦,其中,所述第二阈值范围大于所述第三阈值范围,所述第三阈值范围大于所述第四阈值范围。In an example, the processor 501 is configured to determine the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located, including: when the higher confidence level is When within the second threshold range or the third threshold range or the fourth threshold range, focus the photographing device based on the third lens position determined by the third focusing method, wherein the second threshold range is greater than the A third threshold range, the third threshold range is greater than the fourth threshold range.
在一个示例中,处理器501用于当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第四阈值范围内而触发状态机从第一状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第一状态之后。In one example, the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range. Focusing by the photographing device includes: when the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence level being within the fourth threshold range, determining the first state based on the third focusing method. Three lens positions focus the photographing device, and the fourth state follows the first state.
在一个示例中,处理器501用于当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第三阈值范围内或所述第四阈值范围内而触发状态机从第二状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第二状态之后。In one example, the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range. The photographing device focusing includes: when the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, The photographing device is focused based on a third lens position determined by a third focusing method, and the fourth state is subsequent to the second state.
在一个示例中,处理器501用于当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:当响应于所述置信度较高者处于所述第二阈值范围内或所述第三阈值范围内或所述第四阈值范围内而触发状态机从第三状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第三状态之后。In one example, the processor 501 is configured to pair the third lens position determined based on the third focusing method when the one with higher confidence is within the second threshold range, the third threshold range or the fourth threshold range. Focusing by the photographing device includes: triggering a state machine from the third threshold in response to the higher confidence being within the second threshold range or within the third threshold range or within the fourth threshold range When the state is switched to a fourth state, the photographing device is focused based on the third lens position determined by the third focusing method, and the fourth state is subsequent to the third state.
在本申请中,所述第一状态包括准备阶段的初始化,所述第二状态包括粗搜索阶段的初始化,所述第三状态包括精搜索阶段的初始化,所述第四状态包括精搜索阶段的运行。In this application, the first state includes the initialization of the preparation phase, the second state includes the initialization of the coarse search phase, the third state includes the initialization of the fine search phase, and the fourth state includes the initialization of the fine search phase. run.
在本申请中,所述第一阈值范围大于90%,且小于或等于100%;所述第二阈值范围小于或等于90%,且大于70%;所述第三阈值范围小于或等于70%,且大于或等于50%;所述第四阈值范围小于50%。In this application, the first threshold range is greater than 90% and less than or equal to 100%; the second threshold range is less than or equal to 90% and greater than 70%; the third threshold range is less than or equal to 70% , and greater than or equal to 50%; the fourth threshold range is less than 50%.
在一个示例中,处理器501用于基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,包括:对所述第一置信度和所述第二置信度进行归一化处理;基于所述归一化处理后的第一置信度和所述归一化处理后所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。In an example, the processor 501 is configured to determine the focusing mode based on a threshold range to which the first confidence level and the second confidence level with a higher confidence level belong, including: determining the first confidence level Perform normalization processing with the second confidence level; based on the first confidence level after the normalization process and the threshold range to which the second confidence level after the normalization process has a higher confidence level to determine the focusing method.
在一个示例中,处理器501用于基于第三对焦方法确定所述第三镜头位置,包括:驱动镜头沿第一方向和/或第二方向移动至少两个位置,其中所述第一方向和所述第二方向为相反的方向;获取所述镜头在各个位置处获取的影像数据信息;基于各个影像数据信息的清晰度,确定第三镜头位置,其中,所述第三镜头位置用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态。In one example, the processor 501 is configured to determine the third lens position based on the third focusing method, comprising: driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the The second direction is the opposite direction; the image data information obtained by the lens at each position is acquired; the third lens position is determined based on the clarity of each image data information, wherein the third lens position is used to make The shooting target can be in focus in the shooting screen of the shooting device.
在一个示例中,处理器501用于基于各个影像数据信息的清晰度,确定第三镜头位置,包括:基于各个影像数据信息的清晰度确定用于对焦的第一曲线;基于所述第一曲线确定所述第三镜头位置。可选地,所述第三镜头位置包括各个影像数据信息中清晰度最高的影像数据信息对应的镜头位置。In an example, the processor 501 is configured to determine the third lens position based on the sharpness of each image data information, including: determining a first curve for focusing based on the sharpness of each image data information; based on the first curve The third lens position is determined. Optionally, the third lens position includes a lens position corresponding to the image data information with the highest definition in each image data information.
在一个示例中,所述第一方向和所述第二方向平行于所述拍摄设备的镜头的光轴,或者,所述第一方向和所述第二方向和所述拍摄设备的镜头的光轴重合。In one example, the first direction and the second direction are parallel to the optical axis of the lens of the photographing device, or the first direction and the second direction and the light of the lens of the photographing device Axes coincide.
在一个示例中,处理器501用于基于所述第一对焦方法确定所述第一镜头位置,包括:通过距离传感器确定所述拍摄目标与所述拍摄设备之间的距离数据;根据所述距离数据计算对焦物距;根据所述对焦物距计算所述目标像距,并根据所述目标像距确定所述第一镜头位置。可选地,所述距离传感器的采集数据的信噪比与所述第一置信度呈正相关。In an example, the processor 501 is configured to determine the first lens position based on the first focusing method, including: determining distance data between the shooting target and the shooting device through a distance sensor; according to the distance The focal object distance is calculated from the data; the target image distance is calculated according to the focal object distance, and the first lens position is determined according to the target image distance. Optionally, the signal-to-noise ratio of the collected data of the distance sensor is positively correlated with the first confidence level.
在一个示例中,处理器501用于基于所述第二对焦方法确定所述第二镜头位置,包括:控制所述拍摄设备在第一位置和第二位置分别对所述拍摄目标进行拍摄,所述第一位置不同于所述第二位置;在所述第一位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第一模糊度;在所述第二位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第二模糊度;根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置。In one example, the processor 501 is configured to determine the second lens position based on the second focusing method, including: controlling the shooting device to shoot the shooting target at the first position and the second position, respectively, where the first position is different from the second position; when the shooting target is shot at the first position, the first blur degree of the lens of the shooting device is obtained; the shooting is performed at the second position When the target is photographed, a second blur degree of the lens of the photographing device is acquired; the second lens position is determined according to the first blur degree and the second blur degree.
在一个示例中,处理器501用于根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置,包括:根据所述第一模糊度和所述第二模糊度确定用于对焦的第二曲线;根据所述第二曲线确定所述第二镜头位置。可选地,第二置信度与所述曲线的曲率呈正相关。In an example, the processor 501 is configured to determine the second lens position according to the first blurriness and the second blurriness, including: The second curve for focusing; the position of the second lens is determined according to the second curve. Optionally, the second confidence level is positively related to the curvature of the curve.
在一个示例中,处理器501用于获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,还包括:响应于用户通过用户交互界面输入的感兴趣区域的选择指令,获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述感兴趣区域中包括所述拍摄目标。In one example, the processor 501 is configured to acquire the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, and further includes: responding to user input through the user interaction interface The selection instruction of the region of interest, obtains the first lens position and the second lens position for enabling the shooting target to be in the in-focus state in the shooting screen of the shooting device, wherein the region of interest includes the shooting target. .
在一个示例中,所述拍摄设备的镜头耦合有跟焦器电机,所述跟焦器电机用于驱动所述拍摄设备的镜头移动,以使所述拍摄设备由当前镜头位置调节至所述第一镜头位置或所述第二镜头位置或所述第三镜头位置。可选地,所述拍摄设备与所述跟焦器电机承载于云台。In one example, a follow focus motor is coupled to the lens of the photographing device, and the follow focus motor is used to drive the lens of the photographing device to move, so that the photographing device is adjusted from the current lens position to the first A lens position or the second lens position or the third lens position. Optionally, the photographing device and the follow focus motor are carried on the gimbal.
在一个示例中,所述拍摄设备还包括显示装置,所述拍摄设备与所述云台通信连接,其中:所述显示装置设于所述云台的手持部;或所述显示装置可拆卸地设置在所述云台的安装座上,所述显示装置与所述云台通信连接。In an example, the photographing device further includes a display device, the photographing device is connected in communication with the pan/tilt, wherein: the display device is provided on the hand-held part of the pan/tilt; or the display device is detachable The display device is arranged on the mounting seat of the pan/tilt, and the display device is connected in communication with the pan/tilt.
在一个示例中,所述跟焦器电机与所述云台通信连接,所述跟焦器电机的操作件设于所述云台的手持部,所述操作件用于接收用户针对所述跟焦器电机的控制指令。In one example, the follow focus motor is connected in communication with the pan/tilt, an operating member of the follow focus motor is provided on a hand-held part of the pan/tilt, and the operating member is used to receive the user's response to the follow focus. Control commands for the focuser motor.
在一个示例中,所述显示装置为所述拍摄设备的用户交互界面,或,所述显示装置与所述拍摄设备通信连接。In one example, the display device is a user interface of the photographing device, or the display device is connected in communication with the photographing device.
具体细节本实施例中不再赘述,可以参照前文的对焦方法和前文中拍摄系统的相关内容。The specific details will not be repeated in this embodiment, and reference may be made to the foregoing focusing method and the foregoing related content of the photographing system.
本申请实施例第三方面提供了一种拍摄系统,该拍摄系统包括云台和前文所述的拍摄设备;所述云台用于承载所述拍摄设备。具体拍摄系统的描述可以参考前文中的相关内容,在此不再重复。A third aspect of the embodiments of the present application provides a shooting system, where the shooting system includes a pan/tilt and the aforementioned shooting device; the pan/tilt is used to carry the shooting device. For the description of the specific shooting system, reference may be made to the related content in the foregoing, which will not be repeated here.
其中,本实施例的云台,可以用于执行本申请上述对焦方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The pan/tilt in this embodiment can be used to implement the technical solutions of the above focusing method embodiments of the present application, and the implementation principles and technical effects thereof are similar, and will not be repeated here.
需要说明的是,本申请上述对焦方法实施例的技术方案还可以通过组合设备来执行完成。例如,方法实施例中提供的对焦方法的部分步骤可以通过云台执行,另一部分步骤可以通过跟焦器电机来执行或者用户手动来执行。本申请实施例对此不做限定。It should be noted that, the technical solutions of the above-mentioned focusing method embodiments of the present application can also be implemented by combining devices. For example, some steps of the focusing method provided in the method embodiments may be performed by a pan/tilt head, and another part of the steps may be performed by a follow focus motor or manually by a user. This embodiment of the present application does not limit this.
本申请的第四方面还提供了一种计算机存储介质,其上存储有计算机程序。在计算机可读存储介质上可以存储一个或多个计算机程序指令,计算机程序包含至少一段代码,至少一段代码可由计算机执行,以控制计算机执行前文的对焦方法。A fourth aspect of the present application also provides a computer storage medium on which a computer program is stored. One or more computer program instructions may be stored on the computer-readable storage medium, and the computer program contains at least one piece of code, and at least one piece of code can be executed by the computer to control the computer to perform the aforementioned focusing method.
本申请实施例中还提供了一种计算机存储介质,该计算机存储介质中存储有程序指令,程序执行时可包括第一方面的对焦方法的部分或全部步骤。上述可读存储介质可以是由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。可读存储介质可以是通用或专用计算机能够存取的任何可用介质。Embodiments of the present application further provide a computer storage medium, where program instructions are stored in the computer storage medium, and when the program is executed, part or all of the steps of the focusing method of the first aspect may be included. The above-mentioned readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
一种示例性的可读存储介质耦合至处理器,从而使处理器能够从该可读存储介质读取信息,且可向该可读存储介质写入信息。当然,可读存储介质也可以是处理器的组成部分。处理器和可读存储介质可以位于专用集成电路(Application Specific Integrated Circuits,简称:ASIC)中。当然,处理器和可读存储介质也可以作为分立组件存在于设备中。An exemplary readable storage medium is coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium may be located in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). Of course, the processor and the readable storage medium may also exist in the device as discrete components.
计算机程序运行时,可以实现本文的本申请实施例中(由处理器实现)的功能以及/或者其它期望的功能,例如以执行根据本申请实施例的对焦方法的相应步骤,在计算机可读存储介质中还可以存储各种应用程序和各种数据,例如应用程序使用和/或产生的各种数据等。When the computer program runs, the functions in the embodiments of the present application (implemented by the processor) and/or other desired functions can be realized, for example, to execute the corresponding steps of the focusing method according to the embodiments of the present application, and stored in a computer-readable storage Various application programs and various data, such as various data used and/or generated by the application program, can also be stored in the medium.
尽管这里已经参考附图描述了示例实施例,应理解上述示例实施例仅仅是示例性的,并且不意图将本申请的范围限制于此。本领域普通技术人员可以在其中进行各种改变和修 改,而不偏离本申请的范围和精神。所有这些改变和修改意在被包括在所附权利要求所要求的本申请的范围之内。Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above-described example embodiments are exemplary only, and are not intended to limit the scope of the application thereto. Various changes and modifications can be made therein by those of ordinary skill in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of this application as claimed in the appended claims.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个设备,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or May be integrated into another device, or some features may be omitted, or not implemented.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本申请的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that the embodiments of the present application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本申请并帮助理解各个发明方面中的一个或多个,在对本申请的示例性实施例的描述中,本申请的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该本申请的方法解释成反映如下意图:即所要求保护的本申请要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如相应的权利要求书所反映的那样,其发明点在于可以用少于某个公开的单个实施例的所有特征的特征来解决相应的技术问题。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本申请的单独实施例。Similarly, it is to be understood that in the description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, FIG. , or in its description. However, this method of application should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as the corresponding claims reflect, the invention lies in the fact that the corresponding technical problem may be solved with less than all features of a single disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this application.
本领域的技术人员可以理解,除了特征之间相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的替代特征来代替。It will be understood by those skilled in the art that all features disclosed in this specification (including the accompanying claims, abstract and drawings) and any method or apparatus so disclosed may be used in any combination, except that the features are mutually exclusive. Processes or units are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本申请的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the present application within and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
本申请的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用 微处理器或者数字信号处理器(DSP)来实现根据本申请实施例的一些模块的一些或者全部功能。本申请还可以实现为用于执行这里所描述的方法的一部分或者全部的装置程序(例如,计算机程序和计算机程序产品)。这样的实现本申请的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some modules according to the embodiments of the present application. The present application can also be implemented as a program of apparatus (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present application may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本申请进行说明而不是对本申请进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。本申请可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the application, and alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
以上所述,仅为本申请的具体实施方式或对具体实施方式的说明,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of the present application or descriptions of the specific embodiments, and the protection scope of the present application is not limited thereto. Any changes or substitutions should be included within the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (67)

  1. 一种对焦方法,其特征在于,所述方法包括:A focusing method, characterized in that the method comprises:
    获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法确定,所述第二镜头位置为基于第二对焦方法确定,所述第一对焦方法不同于所述第二对焦方法;Acquire a first lens position and a second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, wherein the first lens position is determined based on the first focusing method, and the second lens position is determined based on the first focusing method. The position is determined based on a second focusing method, and the first focusing method is different from the second focusing method;
    基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。A focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and the One of the second lens positions focuses the photographing device, or the photographing device is focused on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
  2. 如权利要求1所述的对焦方法,其特征在于,所述基于预设规则确定对焦方式,包括:The focusing method according to claim 1, wherein determining the focusing mode based on a preset rule comprises:
    获取所述第一镜头位置的第一置信度和所述第二镜头位置的第二置信度;obtaining a first confidence level of the first lens position and a second confidence level of the second lens position;
    基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。The focusing mode is determined based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs.
  3. 如权利要求2所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The focusing method according to claim 2, wherein the determining the focusing method based on the threshold range where the higher of the first confidence level and the second confidence level is located, comprises:
    当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。When the higher confidence level is within the first threshold range, the photographing device is focused based on the first lens position or the second lens position corresponding to the higher confidence level.
  4. 如权利要求3所述的对焦方法,其特征在于,当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦,包括:3. The focusing method according to claim 3, wherein when the higher confidence level is within a first threshold range, a pair of first lens positions or second lens positions corresponding to the higher confidence level is paired The photographing device performs focusing, including:
    当响应于所述置信度较高者处于第一阈值范围内而触发状态机从当前状态切换为目标状态时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。When the state machine is triggered to switch from the current state to the target state in response to the higher confidence being within the range of the first threshold, the first lens position or the second lens position corresponding to the higher confidence Focus on the camera described above.
  5. 如权利要求4所述的对焦方法,其特征在于,所述当前状态包括第一状态、第二状态或第三状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。The focusing method according to claim 4, wherein the current state comprises a first state, a second state or a third state, wherein the first state is before the second state, and the second state is before the second state. The state precedes the third state.
  6. 如权利要求3所述的对焦方法,其特征在于,所述第一阈值范围大于90%,且小于或等于100%。The focusing method of claim 3, wherein the first threshold range is greater than 90% and less than or equal to 100%.
  7. 如权利要求2所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第 二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The focusing method according to claim 2, wherein, determining the focusing mode based on the threshold range where the higher of the first confidence level and the second confidence level is located, comprising:
    当所述置信度较高者处于第二阈值范围内时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦。When the higher confidence level is within the second threshold range, first control the lens of the photographing device to move to the first lens position or the second lens position corresponding to the higher confidence level, and then focus on the third The third lens position determined by the method focuses the photographing device.
  8. 如权利要求7所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The focusing method according to claim 7, wherein the determining the focusing method based on the threshold range where the higher of the first confidence level and the second confidence level is located, comprises:
    当响应于所述置信度较高者处于第二阈值范围内而触发状态机从当前状态切换为第三状态时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述当前状态包括第一状态或第二状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。When the state machine is triggered to switch from the current state to the third state in response to the higher confidence being within the second threshold range, firstly control the lens of the photographing device to move to the first corresponding to the higher confidence a lens position or a second lens position, and then focus the photographing device based on the third lens position determined by the third focusing method, the current state includes a first state or a second state, wherein the first state is at The second state precedes the third state.
  9. 如权利要求2所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The focusing method according to claim 2, wherein the determining the focusing method based on the threshold range where the higher of the first confidence level and the second confidence level is located, comprises:
    当响应于所述置信度较高者处于第三阈值范围内而触发状态机从第一状态切换为第二状态时,先基于所述置信度较高者对应的第一镜头位置或第二镜头位置确定镜头的移动方向,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第三对焦方法按照所述移动方向移动所述拍摄设备的镜头,所述移动方向包括第一方向或第二方向,其中所述第一方向和所述第二方向为相反的方向,所述第一状态位于所述第二状态之前。When the state machine is triggered to switch from the first state to the second state in response to the higher confidence being within the third threshold range, firstly based on the first shot position or the second shot corresponding to the higher confidence The position determines the moving direction of the lens, and then focuses the shooting device based on the position of the third lens determined by the third focusing method, and the third focusing method moves the lens of the shooting device according to the moving direction. Including a first direction or a second direction, wherein the first direction and the second direction are opposite directions, and the first state precedes the second state.
  10. 如权利要求2所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The focusing method according to claim 2, wherein the determining the focusing method based on the threshold range where the higher of the first confidence level and the second confidence level is located, comprises:
    当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,其中,所述第二阈值范围大于所述第三阈值范围,所述第三阈值范围大于所述第四阈值范围。When the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, focus the photographing device based on the third lens position determined by the third focusing method, wherein the The second threshold range is greater than the third threshold range, and the third threshold range is greater than the fourth threshold range.
  11. 如权利要求10所述的对焦方法,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:11. The focusing method according to claim 10, wherein, when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第四阈值范围内而触发状态机从第一状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第一状态之后。When the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence level being within the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method In focus, the fourth state follows the first state.
  12. 如权利要求11所述的对焦方法,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置 对所述拍摄设备进行对焦,包括:11. The focusing method according to claim 11, wherein when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第三阈值范围内或所述第四阈值范围内而触发状态机从第二状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第二状态之后。When the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, the third focus determined based on the third focusing method The lens position focuses the photographing device, and the fourth state follows the second state.
  13. 如权利要求11所述的对焦方法,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:11. The focusing method according to claim 11, wherein when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第二阈值范围内或所述第三阈值范围内或所述第四阈值范围内而触发状态机从第三状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第三状态之后。When the state machine is triggered to switch from the third state to the fourth state in response to the higher confidence being within the second threshold range or the third threshold range or the fourth threshold range, based on The third lens position determined by the third focusing method focuses the photographing device, and the fourth state is subsequent to the third state.
  14. 如权利要求5或8或9所述的对焦方法,其特征在于,所述第一状态包括准备阶段的初始化,所述第二状态包括粗搜索阶段的初始化。The focusing method according to claim 5, 8 or 9, wherein the first state includes initialization of a preparation stage, and the second state includes initialization of a rough search stage.
  15. 如权利要求5或8所述的对焦方法,其特征在于,所述第三状态包括精搜索阶段的初始化。The focusing method according to claim 5 or 8, wherein the third state includes initialization of a fine search phase.
  16. 如权利要求11至13任一项所述的对焦方法,其特征在于,所述第四状态包括精搜索阶段的运行。The focusing method according to any one of claims 11 to 13, wherein the fourth state includes the operation of a fine search phase.
  17. 如权利要求7至13任一项所述的对焦方法,其特征在于,所述第二阈值范围小于或等于90%,且大于70%。The focusing method according to any one of claims 7 to 13, wherein the second threshold range is less than or equal to 90% and greater than 70%.
  18. 如权利要求9至13任一项所述的对焦方法,其特征在于,所述第三阈值范围小于或等于70%,且大于或等于50%。The focusing method according to any one of claims 9 to 13, wherein the third threshold range is less than or equal to 70% and greater than or equal to 50%.
  19. 如权利要求10至13任一项所述的对焦方法,其特征在于,所述第四阈值范围小于50%。The focusing method according to any one of claims 10 to 13, wherein the fourth threshold range is less than 50%.
  20. 如权利要求2至19任一项所述的对焦方法,其特征在于,所述基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,包括:The focusing method according to any one of claims 2 to 19, wherein the focusing is determined based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs. ways, including:
    对所述第一置信度和所述第二置信度进行归一化处理;normalizing the first confidence level and the second confidence level;
    基于所述归一化处理后的第一置信度和所述归一化处理后所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。The focusing mode is determined based on the normalized first confidence level and the threshold range to which the second confidence level after the normalization process belongs to a higher confidence level.
  21. 如权利要求1至20任一项所述的对焦方法,其特征在于,基于所述第三对焦方法确定所述第三镜头位置,包括:The focusing method according to any one of claims 1 to 20, wherein determining the third lens position based on the third focusing method comprises:
    驱动镜头沿第一方向和/或第二方向移动至少两个位置,其中所述第一方向和所述第二方向为相反的方向;driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the second direction are opposite directions;
    获取所述镜头在各个位置处获取的影像数据信息;obtaining image data information obtained by the lens at various positions;
    基于各个影像数据信息的清晰度,确定第三镜头位置,其中,所述第三镜头位置用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态。Based on the clarity of each image data information, a third lens position is determined, wherein the third lens position is used to enable the shooting target to be in focus in the shooting picture of the shooting device.
  22. 如权利要求21所述的对焦方法,其特征在于,所述基于各个影像数据信息的清晰度,确定第三镜头位置,包括:The focusing method according to claim 21, wherein the determining the position of the third lens based on the clarity of each image data information comprises:
    基于各个影像数据信息的清晰度确定用于对焦的第一曲线;determining a first curve for focusing based on the sharpness of each image data information;
    基于所述第一曲线确定所述第三镜头位置。The third lens position is determined based on the first curve.
  23. 如权利要求21所述的对焦方法,其特征在于,所述第三镜头位置包括各个影像数据信息中清晰度最高的影像数据信息对应的镜头位置。21. The focusing method according to claim 21, wherein the third lens position comprises a lens position corresponding to the image data information with the highest definition in each image data information.
  24. 如权利要求21所述的对焦方法,其特征在于,所述第一方向和所述第二方向平行于所述拍摄设备的镜头的光轴,或者,所述第一方向和所述第二方向和所述拍摄设备的镜头的光轴重合。The focusing method according to claim 21, wherein the first direction and the second direction are parallel to the optical axis of the lens of the photographing device, or the first direction and the second direction It is coincident with the optical axis of the lens of the photographing device.
  25. 如权利要求1所述的对焦方法,其特征在于,基于所述第一对焦方法确定所述第一镜头位置,包括:The focusing method of claim 1, wherein determining the first lens position based on the first focusing method comprises:
    通过距离传感器确定所述拍摄目标与所述拍摄设备之间的距离数据;Determine the distance data between the shooting target and the shooting device through a distance sensor;
    根据所述距离数据计算对焦物距;calculating the focal object distance according to the distance data;
    根据所述对焦物距计算所述目标像距,并根据所述目标像距确定所述第一镜头位置。The target image distance is calculated according to the focused object distance, and the first lens position is determined according to the target image distance.
  26. 根据权利要求25所述的对焦方法,其特征在于,所述距离传感器的采集数据的信噪比与所述第一置信度呈正相关。The focusing method according to claim 25, wherein the signal-to-noise ratio of the collected data of the distance sensor is positively correlated with the first confidence level.
  27. 根据权利要求1所述的对焦方法,其特征在于,基于所述第二对焦方法确定所述第二镜头位置,包括:The focusing method according to claim 1, wherein determining the second lens position based on the second focusing method comprises:
    控制所述拍摄设备在第一位置和第二位置分别对所述拍摄目标进行拍摄,所述第一位置不同于所述第二位置;controlling the photographing device to photograph the photographing target at a first position and a second position, the first position being different from the second position;
    在所述第一位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第一模糊度;When photographing the photographing target at the first position, acquiring a first blurring degree of the lens of the photographing device;
    在所述第二位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第二模糊度;When shooting the shooting target at the second position, acquiring a second blurring degree of the lens of the shooting device;
    根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置。The second lens position is determined based on the first degree of ambiguity and the second degree of ambiguity.
  28. 根据权利要求27所述的对焦方法,其特征在于,所述根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置,包括:The focusing method according to claim 27, wherein the determining the second lens position according to the first ambiguity and the second ambiguity comprises:
    根据所述第一模糊度和所述第二模糊度确定用于对焦的第二曲线;determining a second curve for focusing based on the first blurriness and the second blurriness;
    根据所述第二曲线确定所述第二镜头位置。The second lens position is determined according to the second curve.
  29. 根据权利要求28所述的对焦方法,其特征在于,所述第二置信度与所述第二曲线的曲率呈正相关。The focusing method according to claim 28, wherein the second confidence level is positively correlated with the curvature of the second curve.
  30. 根据权利要求1所述的对焦方法,其特征在于,所述获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,还包括:The focusing method according to claim 1, wherein the acquiring the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, further comprising:
    响应于用户通过用户交互界面输入的感兴趣区域的选择指令,获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述感兴趣区域中包括所述拍摄目标。In response to the selection instruction of the region of interest input by the user through the user interaction interface, the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting screen of the shooting device are acquired, wherein the sense The photographing target is included in the region of interest.
  31. 一种拍摄设备,其特征在于,所述拍摄设备包括:A photographing device, characterized in that the photographing device comprises:
    存储器,所述存储器存储计算机执行指令;a memory that stores computer-executed instructions;
    至少一个处理器,所述至少一个处理器执行所述存储器存储的计算机执行指令,使得执行所述计算机执行指令时实现如下步骤:At least one processor, the at least one processor executes the computer-executable instructions stored in the memory, so that the following steps are implemented when the computer-executable instructions are executed:
    获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述第一镜头位置为基于第一对焦方法;acquiring a first lens position and a second lens position for enabling the shooting target to be in focus in the shooting picture of the shooting device, wherein the first lens position is based on a first focusing method;
    基于预设规则确定对焦方式,以及基于已确定的所述对焦方式对所述拍摄设备进行对焦,其中,所述对焦方式包括以下方式中的任一种:基于所述第一镜头位置和所述第二镜头位置中的一个对所述拍摄设备进行对焦,或基于所述第一镜头位置、所述第二镜头位置和第三对焦方法确定的第三镜头位置中的一个对所述拍摄设备进行对焦,其中,所述第三对焦方法不同于所述第一对焦方法和所述第二对焦方法。A focusing mode is determined based on a preset rule, and the photographing device is focused based on the determined focusing mode, wherein the focusing mode includes any one of the following modes: based on the first lens position and the One of the second lens positions focuses the photographing device, or the photographing device is focused on the photographing device based on one of the first lens position, the second lens position and the third lens position determined by the third focusing method focusing, wherein the third focusing method is different from the first focusing method and the second focusing method.
  32. 如权利要求31所述的拍摄设备,其特征在于,所述基于预设规则确定对焦方式,包括:The photographing device according to claim 31, wherein the determining a focusing mode based on a preset rule comprises:
    获取所述第一镜头位置的第一置信度和所述第二镜头位置的第二置信度;obtaining a first confidence level of the first lens position and a second confidence level of the second lens position;
    基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。The focusing mode is determined based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs.
  33. 如权利要求32所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The photographing device according to claim 32, wherein, determining the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, comprising:
    当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。When the higher confidence level is within the first threshold range, the photographing device is focused based on the first lens position or the second lens position corresponding to the higher confidence level.
  34. 如权利要求33所述的拍摄设备,其特征在于,当所述置信度较高者处于第一阈值范围内时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备 进行对焦,包括:34. The photographing device according to claim 33, wherein when the higher confidence level is within a first threshold range, the pair of first lens positions or second lens positions corresponding to the higher confidence level is paired The photographing device performs focusing, including:
    当响应于所述置信度较高者处于第一阈值范围内而触发状态机从当前状态切换为目标状态时,基于所述置信度较高者对应的第一镜头位置或第二镜头位置对所述拍摄设备进行对焦。When the state machine is triggered to switch from the current state to the target state in response to the higher confidence being within the range of the first threshold, the first lens position or the second lens position corresponding to the higher confidence Focus on the camera described above.
  35. 如权利要求34所述的拍摄设备,其特征在于,所述当前状态包括第一状态、第二状态或第三状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。The photographing device of claim 34, wherein the current state comprises a first state, a second state or a third state, wherein the first state is before the second state, and the second state The state precedes the third state.
  36. 如权利要求33所述的拍摄设备,其特征在于,所述第一阈值范围大于90%,且小于或等于100%。The photographing device of claim 33, wherein the first threshold range is greater than 90% and less than or equal to 100%.
  37. 如权利要求32所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The photographing device according to claim 32, wherein, determining the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, comprising:
    当所述置信度较高者处于第二阈值范围内时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦。When the higher confidence level is within the second threshold range, first control the lens of the photographing device to move to the first lens position or the second lens position corresponding to the higher confidence level, and then focus on the third The third lens position determined by the method focuses the photographing device.
  38. 如权利要求37所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The photographing device according to claim 37, wherein the determining the focusing mode based on a threshold range in which the higher of the first confidence level and the second confidence level is located comprises:
    当响应于所述置信度较高者处于第二阈值范围内而触发状态机从当前状态切换为第三状态时,先控制所述拍摄设备的镜头移动到所述置信度较高者对应的第一镜头位置或第二镜头位置,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述当前状态包括第一状态或第二状态,其中,所述第一状态在所述第二状态之前,所述第二状态在所述第三状态之前。When the state machine is triggered to switch from the current state to the third state in response to the higher confidence being within the second threshold range, firstly control the lens of the photographing device to move to the first corresponding to the higher confidence a lens position or a second lens position, and then focus the photographing device based on the third lens position determined by the third focusing method, the current state includes a first state or a second state, wherein the first state is at The second state precedes the third state.
  39. 如权利要求32所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The photographing device according to claim 32, wherein, determining the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, comprising:
    当响应于所述置信度较高者处于第三阈值范围内而触发状态机从第一状态切换为第二状态时,先基于所述置信度较高者对应的第一镜头位置或第二镜头位置确定镜头的移动方向,再基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第三对焦方法按照所述移动方向移动所述拍摄设备的镜头,所述移动方向包括第一方向或第二方向,其中所述第一方向和所述第二方向为相反的方向,所述第一状态位于所述第二状态之前。When the state machine is triggered to switch from the first state to the second state in response to the higher confidence being within the third threshold range, firstly based on the first shot position or the second shot corresponding to the higher confidence The position determines the moving direction of the lens, and then focuses the shooting device based on the position of the third lens determined by the third focusing method, and the third focusing method moves the lens of the shooting device according to the moving direction. Including a first direction or a second direction, wherein the first direction and the second direction are opposite directions, and the first state precedes the second state.
  40. 如权利要求32所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中的较高者所在的阈值范围,确定所述对焦方式,包括:The photographing device according to claim 32, wherein, determining the focusing mode based on a threshold range where the higher of the first confidence level and the second confidence level is located, comprising:
    当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时, 基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,其中,所述第二阈值范围大于所述第三阈值范围,所述第三阈值范围大于所述第四阈值范围。When the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, focus the photographing device based on the third lens position determined by the third focusing method, wherein the The second threshold range is greater than the third threshold range, and the third threshold range is greater than the fourth threshold range.
  41. 如权利要求40所述的拍摄设备,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:The photographing device according to claim 40, wherein when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第四阈值范围内而触发状态机从第一状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第一状态之后。When the state machine is triggered to switch from the first state to the fourth state in response to the higher confidence level being within the fourth threshold range, the photographing device is subjected to the third lens position determined based on the third focusing method In focus, the fourth state follows the first state.
  42. 如权利要求41所述的拍摄设备,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:The photographing device according to claim 41, wherein when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第三阈值范围内或所述第四阈值范围内而触发状态机从第二状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第二状态之后。When the state machine is triggered to switch from the second state to the fourth state in response to the higher confidence being within the third threshold range or the fourth threshold range, the third focus determined based on the third focusing method The lens position focuses the photographing device, and the fourth state follows the second state.
  43. 如权利要求41所述的拍摄设备,其特征在于,当所述置信度较高者处于第二阈值范围内或第三阈值范围内或第四阈值范围内时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,包括:The photographing device according to claim 41, wherein when the higher confidence level is within the second threshold range, the third threshold range or the fourth threshold range, the first threshold determined based on the third focusing method Three lens positions are used to focus the shooting device, including:
    当响应于所述置信度较高者处于所述第二阈值范围内或所述第三阈值范围内或所述第四阈值范围内而触发状态机从第三状态切换至第四状态时,基于第三对焦方法确定的第三镜头位置对所述拍摄设备进行对焦,所述第四状态在所述第三状态之后。When the state machine is triggered to switch from the third state to the fourth state in response to the higher confidence being within the second threshold range or the third threshold range or the fourth threshold range, based on The third lens position determined by the third focusing method focuses the photographing device, and the fourth state is subsequent to the third state.
  44. 如权利要求35或38或39所述的拍摄设备,其特征在于,所述第一状态包括准备阶段的初始化,所述第二状态包括粗搜索阶段的初始化。The photographing device of claim 35 or 38 or 39, wherein the first state includes initialization of a preparation phase, and the second state includes initialization of a coarse search phase.
  45. 如权利要求35或38所述的拍摄设备,其特征在于,所述第三状态包括精搜索阶段的初始化。38. The photographing apparatus of claim 35 or 38, wherein the third state includes initialization of a fine search phase.
  46. 如权利要求41至43任一项所述的拍摄设备,其特征在于,所述第四状态包括精搜索阶段的运行。43. The photographing apparatus of any one of claims 41 to 43, wherein the fourth state includes the operation of a fine search phase.
  47. 如权利要求37至43任一项所述的拍摄设备,其特征在于,所述第二阈值范围小于或等于90%,且大于70%。The photographing device according to any one of claims 37 to 43, wherein the second threshold range is less than or equal to 90% and greater than 70%.
  48. 如权利要求39至43任一项所述的拍摄设备,其特征在于,所述第三阈值范围小于或等于70%,且大于或等于50%。The photographing device according to any one of claims 39 to 43, wherein the third threshold range is less than or equal to 70% and greater than or equal to 50%.
  49. 如权利要求40至43任一项所述的拍摄设备,其特征在于,所述第四阈值范围 小于50%。The photographing device of any one of claims 40 to 43, wherein the fourth threshold range is less than 50%.
  50. 如权利要求32至49任一项所述的拍摄设备,其特征在于,所述基于所述第一置信度和所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式,包括:The photographing device according to any one of claims 32 to 49, wherein the focusing is determined based on a threshold range to which a higher confidence level of the first confidence level and the second confidence level belongs. ways, including:
    对所述第一置信度和所述第二置信度进行归一化处理;normalizing the first confidence level and the second confidence level;
    基于所述归一化处理后的第一置信度和所述归一化处理后所述第二置信度中置信度较高者所属的阈值范围,确定所述对焦方式。The focusing mode is determined based on the normalized first confidence level and the threshold range to which the second confidence level after the normalization process belongs to a higher confidence level.
  51. 如权利要求31至50任一项所述的拍摄设备,其特征在于,基于第三对焦方法确定所述第三镜头位置,包括:The photographing device according to any one of claims 31 to 50, wherein determining the third lens position based on a third focusing method comprises:
    驱动镜头沿第一方向和/或第二方向移动至少两个位置,其中所述第一方向和所述第二方向为相反的方向;driving the lens to move at least two positions along a first direction and/or a second direction, wherein the first direction and the second direction are opposite directions;
    获取所述镜头在各个位置处获取的影像数据信息;obtaining image data information obtained by the lens at various positions;
    基于各个影像数据信息的清晰度,确定第三镜头位置,其中,所述第三镜头位置用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态。Based on the clarity of each image data information, a third lens position is determined, wherein the third lens position is used to enable the shooting target to be in focus in the shooting picture of the shooting device.
  52. 如权利要求51所述的拍摄设备,其特征在于,所述基于各个影像数据信息的清晰度,确定第三镜头位置,包括:The photographing device according to claim 51, wherein the determining the position of the third lens based on the definition of each image data information comprises:
    基于各个影像数据信息的清晰度确定用于对焦的第一曲线;determining a first curve for focusing based on the sharpness of each image data information;
    基于所述第一曲线确定所述第三镜头位置。The third lens position is determined based on the first curve.
  53. 如权利要求51所述的拍摄设备,其特征在于,所述第三镜头位置包括各个影像数据信息中清晰度最高的影像数据信息对应的镜头位置。51. The photographing device according to claim 51, wherein the third lens position comprises a lens position corresponding to the image data information with the highest definition in each image data information.
  54. 如权利要求51所述的拍摄设备,其特征在于,所述第一方向和所述第二方向平行于所述拍摄设备的镜头的光轴,或者,所述第一方向和所述第二方向和所述拍摄设备的镜头的光轴重合。The photographing device of claim 51, wherein the first direction and the second direction are parallel to an optical axis of a lens of the photographing device, or the first direction and the second direction It is coincident with the optical axis of the lens of the photographing device.
  55. 如权利要求31所述的拍摄设备,其特征在于,基于所述第一对焦方法确定所述第一镜头位置,包括:The photographing device according to claim 31, wherein determining the first lens position based on the first focusing method comprises:
    通过距离传感器确定所述拍摄目标与所述拍摄设备之间的距离数据;Determine the distance data between the shooting target and the shooting device by using a distance sensor;
    根据所述距离数据计算对焦物距;calculating the focal object distance according to the distance data;
    根据所述对焦物距计算所述目标像距,并根据所述目标像距确定所述第一镜头位置。The target image distance is calculated according to the focused object distance, and the first lens position is determined according to the target image distance.
  56. 根据权利要求55所述的拍摄设备,其特征在于,所述距离传感器的采集数据的信噪比与所述第一置信度呈正相关。The photographing device according to claim 55, wherein the signal-to-noise ratio of the collected data of the distance sensor is positively correlated with the first confidence level.
  57. 根据权利要求31所述的拍摄设备,其特征在于,基于所述第二对焦方法确定所述第二镜头位置,包括:The photographing device according to claim 31, wherein determining the second lens position based on the second focusing method comprises:
    控制所述拍摄设备在第一位置和第二位置分别对所述拍摄目标进行拍摄,所述第一位置不同于所述第二位置;controlling the photographing device to photograph the photographing target at a first position and a second position, the first position being different from the second position;
    在所述第一位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第一模糊度;When photographing the photographing target at the first position, acquiring a first blurring degree of the lens of the photographing device;
    在所述第二位置对所述拍摄目标进行拍摄时,获取所述拍摄设备的镜头的第二模糊度;When shooting the shooting target at the second position, acquiring a second blurring degree of the lens of the shooting device;
    根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置。The second lens position is determined based on the first degree of ambiguity and the second degree of ambiguity.
  58. 根据权利要求57所述的拍摄设备,其特征在于,所述根据所述第一模糊度和所述第二模糊度确定所述第二镜头位置,包括:The photographing device according to claim 57, wherein the determining the second lens position according to the first blurriness degree and the second blurriness degree comprises:
    根据所述第一模糊度和所述第二模糊度确定用于对焦的第二曲线;determining a second curve for focusing based on the first blurriness and the second blurriness;
    根据所述第二曲线确定所述第二镜头位置。The second lens position is determined according to the second curve.
  59. 根据权利要求58所述的拍摄设备,其特征在于,所述第二置信度与所述第二曲线的曲率呈正相关。The photographing device according to claim 58, wherein the second confidence level is positively correlated with the curvature of the second curve.
  60. 根据权利要求31所述的拍摄设备,其特征在于,所述获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,还包括:The photographing device according to claim 31, wherein the acquiring the first lens position and the second lens position used to enable the photographing target to be in focus in the photographing picture of the photographing device further comprises:
    响应于用户通过用户交互界面输入的感兴趣区域的选择指令,获取用于使得拍摄目标能够在拍摄设备的拍摄画面中处于合焦状态的第一镜头位置和第二镜头位置,其中,所述感兴趣区域中包括所述拍摄目标。In response to the selection instruction of the region of interest input by the user through the user interaction interface, the first lens position and the second lens position for enabling the shooting target to be in focus in the shooting screen of the shooting device are acquired, wherein the sense The photographing target is included in the region of interest.
  61. 根据权利要求31所述的拍摄设备,其特征在于,所述拍摄设备的镜头耦合有跟焦器电机,所述跟焦器电机用于驱动所述拍摄设备的镜头移动,以使所述拍摄设备由当前镜头位置调节至所述第一镜头位置或所述第二镜头位置或所述第三镜头位置。The photographing device according to claim 31, wherein a follow focus motor is coupled to the lens of the photographing device, and the follow focus motor is used to drive the lens of the photographing device to move, so as to make the photographing device move. Adjust from the current lens position to the first lens position or the second lens position or the third lens position.
  62. 根据权利要求61所述的拍摄设备,其特征在于,所述拍摄设备与所述跟焦器电机承载于云台。The photographing device according to claim 61, wherein the photographing device and the follow focus motor are carried on a pan/tilt head.
  63. 根据权利要求62所述的拍摄设备,其特征在于,所述拍摄设备还包括显示装置,所述拍摄设备与所述云台通信连接,其中:The photographing device according to claim 62, wherein the photographing device further comprises a display device, and the photographing device is connected in communication with the PTZ, wherein:
    所述显示装置设于所述云台的手持部;或the display device is arranged on the hand-held part of the pan/tilt; or
    所述显示装置可拆卸地设置在所述云台的安装座上,所述显示装置与所述云台通信连接。The display device is detachably arranged on the mounting seat of the pan/tilt, and the display device is connected in communication with the pan/tilt.
  64. 根据权利要求61所述的拍摄设备,其特征在于,所述跟焦器电机与所述云台通信连接,所述跟焦器电机的操作件设于所述云台的手持部,所述操作件用于接收用户针对所述跟焦器电机的控制指令。The photographing device according to claim 61, wherein the follow focus motor is connected in communication with the pan/tilt, and an operating member of the follow focus motor is provided on a hand-held part of the pan/tilt, and the operation The component is used to receive a user's control command for the follow focus motor.
  65. 根据权利要求63所述的拍摄设备,其特征在于,所述显示装置为所述拍摄设备的用户交互界面,或,所述显示装置与所述拍摄设备通信连接。The photographing device according to claim 63, wherein the display device is a user interface of the photographing device, or the display device is connected in communication with the photographing device.
  66. 一种拍摄系统,其特征在于,包括:云台和权利要求31-65任一项所述的拍摄设备;A photographing system, characterized in that, comprising: a PTZ and the photographing device described in any one of claims 31-65;
    所述云台用于承载所述拍摄设备。The pan/tilt is used to carry the photographing device.
  67. 一种可读存储介质,其特征在于,所述可读存储介质上存储有计算机程序;所述计算机程序在被执行时,实现如权利要求1-30任一项所述对焦方法。A readable storage medium, characterized in that a computer program is stored on the readable storage medium; when the computer program is executed, the focusing method according to any one of claims 1-30 is implemented.
PCT/CN2021/086072 2021-04-09 2021-04-09 Focusing method, photographing device, photographing system, and readable storage medium WO2022213339A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/086072 WO2022213339A1 (en) 2021-04-09 2021-04-09 Focusing method, photographing device, photographing system, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/086072 WO2022213339A1 (en) 2021-04-09 2021-04-09 Focusing method, photographing device, photographing system, and readable storage medium

Publications (1)

Publication Number Publication Date
WO2022213339A1 true WO2022213339A1 (en) 2022-10-13

Family

ID=83544992

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/086072 WO2022213339A1 (en) 2021-04-09 2021-04-09 Focusing method, photographing device, photographing system, and readable storage medium

Country Status (1)

Country Link
WO (1) WO2022213339A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986877A (en) * 2014-05-29 2014-08-13 宇龙计算机通信科技(深圳)有限公司 Image acquiring terminal and image acquiring method
US20160275657A1 (en) * 2015-03-19 2016-09-22 Panasonic Intellectual Property Management Co., Ltd. Imaging apparatus, image processing apparatus and method of processing image
US20170345176A1 (en) * 2016-05-25 2017-11-30 Center For Integrated Smart Sensors Foundation Depth extracting camera system using multi focus image and operation method thereof
CN109274785A (en) * 2017-07-17 2019-01-25 中兴通讯股份有限公司 A kind of information processing method and mobile terminal device
CN112136310A (en) * 2019-08-30 2020-12-25 深圳市大疆创新科技有限公司 Focusing method and assembly of imaging device, imaging device and movable object
CN112154371A (en) * 2019-04-23 2020-12-29 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program
CN112352417A (en) * 2019-10-31 2021-02-09 深圳市大疆创新科技有限公司 Focusing method of shooting device, system and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986877A (en) * 2014-05-29 2014-08-13 宇龙计算机通信科技(深圳)有限公司 Image acquiring terminal and image acquiring method
US20160275657A1 (en) * 2015-03-19 2016-09-22 Panasonic Intellectual Property Management Co., Ltd. Imaging apparatus, image processing apparatus and method of processing image
US20170345176A1 (en) * 2016-05-25 2017-11-30 Center For Integrated Smart Sensors Foundation Depth extracting camera system using multi focus image and operation method thereof
CN109274785A (en) * 2017-07-17 2019-01-25 中兴通讯股份有限公司 A kind of information processing method and mobile terminal device
CN112154371A (en) * 2019-04-23 2020-12-29 深圳市大疆创新科技有限公司 Control device, imaging device, mobile body, control method, and program
CN112136310A (en) * 2019-08-30 2020-12-25 深圳市大疆创新科技有限公司 Focusing method and assembly of imaging device, imaging device and movable object
CN112352417A (en) * 2019-10-31 2021-02-09 深圳市大疆创新科技有限公司 Focusing method of shooting device, system and storage medium

Similar Documents

Publication Publication Date Title
CN109451244B (en) Automatic focusing method and system based on liquid lens
CN109521547B (en) Variable-step-length automatic focusing method and system
US7409149B2 (en) Methods for improved autofocus in digital imaging systems
TWI471630B (en) Auto-focus system and method of a digital camera
JP2012513607A (en) Camera with rotating polarizing filter
JP5263310B2 (en) Image generation apparatus, imaging apparatus, and image generation method
WO2022061519A1 (en) Photographing control method and apparatus, gimbal, and follow focus motor
JP5216137B2 (en) Camera and camera control method
CN117015975A (en) Control method, shooting device and shooting system
WO2021081909A1 (en) Focusing method for photographing device, photographing device, system, and storage medium
JP4710983B2 (en) Image composition device, imaging device, and image composition method
JPH089219A (en) Camera
JP2018137613A (en) Image processing apparatus, imaging apparatus and control method for image processing apparatus
WO2022213339A1 (en) Focusing method, photographing device, photographing system, and readable storage medium
US10248859B2 (en) View finder apparatus and method of operating the same
JP5023750B2 (en) Ranging device and imaging device
WO2022213340A1 (en) Focusing method, photographic device, photographic system and readable storage medium
JP2002214659A (en) Camera with shake correcting function
WO2022061534A1 (en) Photographing control method and apparatus, gimbal, follow focus electric motor, and storage medium
KR20100007444A (en) Monitoring method
JP2009092747A (en) Imaging device and method
JP4865275B2 (en) Focus detection apparatus and imaging apparatus
JP2020046615A (en) Control device, imaging apparatus, control method, program, and storage medium
JP2013135448A (en) Imaging apparatus
WO2023106118A1 (en) Information processing device, information processing method, and program

Legal Events

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

Ref document number: 21935568

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21935568

Country of ref document: EP

Kind code of ref document: A1