CN112188089A - Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly - Google Patents

Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly Download PDF

Info

Publication number
CN112188089A
CN112188089A CN202011001113.5A CN202011001113A CN112188089A CN 112188089 A CN112188089 A CN 112188089A CN 202011001113 A CN202011001113 A CN 202011001113A CN 112188089 A CN112188089 A CN 112188089A
Authority
CN
China
Prior art keywords
target
distance
preview image
base
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011001113.5A
Other languages
Chinese (zh)
Inventor
彭聪
高文俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202011001113.5A priority Critical patent/CN112188089A/en
Publication of CN112188089A publication Critical patent/CN112188089A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/671Focus control based on electronic image sensor signals in combination with active ranging signals, e.g. using light or sound signals emitted toward objects

Landscapes

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

Abstract

The present disclosure relates to a distance acquisition method, a distance acquisition apparatus, a focal length adjustment method, a focal length adjustment apparatus, a ranging assembly, a mobile terminal, and a non-transitory computer-readable storage medium, wherein the distance acquisition method is applied to a ranging assembly, the ranging assembly includes a base and a ranging sensor mounted on the base and adjustable in angle, the method includes: acquiring a target direction of a target; based on the target direction, adjusting the detection direction of the ranging sensor to the target direction through the base, so that the ranging sensor is aligned to the target; and acquiring the distance between the target and the distance measuring sensor. The distance measurement assembly with the adjustable detection direction can adjust the detection direction according to the direction of the target, so that the distance measurement is carried out by aiming at the target, the accurate distance of the target is obtained, and the accurate and reliable distance is ensured.

Description

Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly
Technical Field
The present disclosure relates to the field of image capturing, and in particular, to a distance obtaining method, a distance obtaining apparatus, a focal length adjusting method, a focal length adjusting apparatus, a ranging module, a mobile terminal, and a non-transitory computer-readable storage medium.
Background
Currently, some distance measuring sensors can convert the distance to an object by emitting light and reflecting the light after encountering the object, and the sensors calculate the Time difference or phase difference between the light emission and the light reflection, such as a Time of Flight (TOF) sensor. In terminal equipment such as a mobile phone, the distance measuring sensor can be arranged at a position close to the camera, the distance is obtained through the distance measuring sensor, and the camera realizes focusing based on the distance as a focal length.
However, in the picture acquired by the camera, there may be objects with different distances, and according to different needs or scenes, focusing needs to be performed with one of the target objects as a focus, and the distance of the target object is not the distance detected by the distance measuring sensor, which results in that the shooting focus cannot be accurately acquired, the shot picture is out of focus, and the target is blurred.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a distance acquisition method, a distance acquisition apparatus, a focus adjustment method, a focus adjustment apparatus, a ranging module, a mobile terminal, and a non-transitory computer-readable storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a distance obtaining method applied to a ranging assembly, where the ranging assembly includes a base and a ranging sensor mounted on the base and having an adjustable angle, the method includes: acquiring a target direction of a target; based on the target direction, adjusting the detection direction of the ranging sensor to the target direction through the base, so that the ranging sensor is aligned to the target; and acquiring the distance between the target and the distance measuring sensor.
In one embodiment, the adjusting, by the base, the detection direction of the ranging sensor to the target direction based on the target direction includes: adjusting the detection direction of the distance measuring sensor to a reference direction through the base; adjusting, by the base, a detection direction of the ranging sensor from the reference direction to the target direction based on the target direction.
In one embodiment, the adjusting, by the base, the detection direction of the ranging sensor to the target direction based on the target direction includes: determining an angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor; based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base.
In an embodiment, the method further comprises: and sending the distance to a camera shooting assembly for adjusting the focal length of the camera shooting assembly for shooting the target.
According to a second aspect of the embodiments of the present disclosure, there is provided a focus adjusting method applied to a mobile terminal, where the mobile terminal includes a camera assembly and a ranging assembly, the method including: acquiring a preview image through the camera shooting assembly; determining a target in the preview image based on the preview image; determining a target direction of the target based on the position of the target in the preview image; sending the target direction to the ranging component; receiving the distance between the ranging component and the target acquired by the distance acquisition method according to the first aspect; and adjusting the focal distance of the camera shooting component for shooting the target based on the distance.
In one embodiment, the determining the target in the preview image based on the preview image comprises: and performing target recognition on the preview image based on the preview image, and determining a target in the preview image.
In one embodiment, the determining the target in the preview image based on the preview image comprises: displaying the preview image; receiving a target determination instruction; determining a target in the preview image based on the target determination instruction.
In one embodiment, the determining the target direction of the target based on the position of the target in the preview image comprises: determining a coordinate point of the target in the preview image; determining the position relation between the coordinate point and the center point of the preview image; and determining the target direction of the target based on the position relation.
According to a third aspect of embodiments of the present disclosure, there is provided a ranging assembly comprising: a base; the distance measuring sensor is mounted on the base in an angle-adjustable manner; a controller that acquires a distance by the distance acquisition method according to the first aspect, by the distance measurement sensor.
In one embodiment, the ranging assembly further comprises: a motor disposed on the base; the controller controls the motor to adjust the detection direction of the distance measuring sensor.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a distance obtaining apparatus applied to a distance measuring assembly, the distance measuring assembly includes a base and a distance measuring sensor installed on the base and adjustable in angle, the apparatus includes: a first acquisition unit configured to acquire a target direction of a target; the processing unit is used for adjusting the detection direction of the ranging sensor to the target direction through the base based on the target direction so that the ranging sensor is aligned to the target; the first acquisition unit is further used for acquiring the distance between the target and the first acquisition unit through the ranging sensor.
In an embodiment, the processing unit is further configured to: adjusting the detection direction of the distance measuring sensor to a reference direction through the base; adjusting, by the base, a detection direction of the ranging sensor from the reference direction to the target direction based on the target direction.
In an embodiment, the processing unit is further configured to: determining an angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor; based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base.
In one embodiment, the apparatus further comprises: and the first sending unit is used for sending the distance to a camera shooting assembly and adjusting the focal length of the camera shooting assembly for shooting the target.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a focal length adjusting apparatus applied to a mobile terminal, the mobile terminal including a camera assembly and a distance measuring assembly, the apparatus including: the second acquisition unit is used for acquiring a preview image through the camera shooting assembly; a target determination unit configured to determine a target in the preview image based on the preview image; an angle determining unit configured to determine a target direction of the target based on a position of the target in the preview image; a second sending unit for sending the target direction to the ranging component; a receiving unit, configured to receive a distance between the ranging component and the target, where the distance is obtained by the distance obtaining method according to the first aspect; and the focal length adjusting unit is used for adjusting the focal length of the target shot by the shooting assembly based on the distance.
In an embodiment, the object determination unit determines the object in the preview image by: and performing target recognition on the preview image based on the preview image, and determining a target in the preview image.
In an embodiment, the object determination unit determines the object in the preview image by: displaying the preview image; receiving a target determination instruction; determining a target in the preview image based on the target determination instruction.
In an embodiment, the angle determination unit determines the target direction of the target by: determining a coordinate point of the target in the preview image; determining the position relation between the coordinate point and the center point of the preview image; and determining the target direction of the target based on the position relation.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a mobile terminal including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the focus adjustment method as described in the foregoing second aspect is performed.
According to a seventh aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a mobile processor, implement the distance acquisition method according to the first aspect or the focus adjustment method according to the second aspect.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the distance measurement assembly with the adjustable detection direction can adjust the detection direction according to the direction of the target, so that the distance measurement is carried out by aiming at the target, the accurate distance of the target is obtained, and the accurate and reliable distance is ensured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic diagram illustrating a structure of a mobile terminal according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating a principle of ranging and adjusting a focal length in a related art according to an exemplary embodiment.
FIG. 3 is a schematic diagram illustrating a ranging assembly according to an exemplary embodiment.
FIG. 4 is a schematic diagram illustrating a ranging and focus adjustment principle according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a distance acquisition method according to an example embodiment.
FIG. 6 is a schematic diagram illustrating one target direction according to an exemplary embodiment.
Fig. 7 is a flow chart diagram illustrating another distance acquisition method according to an example embodiment.
Fig. 8 is a flowchart illustrating a focus adjustment method according to an exemplary embodiment.
Fig. 9 is a schematic block diagram illustrating a distance acquisition device according to an exemplary embodiment.
Fig. 10 is a schematic block diagram illustrating another distance acquisition device according to an exemplary embodiment.
Fig. 11 is a schematic block diagram illustrating a focus adjustment apparatus according to an exemplary embodiment.
FIG. 12 is a block diagram illustrating an apparatus in accordance with an example embodiment.
FIG. 13 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
In some related arts, as shown in fig. 1, in a mobile terminal 100 such as a mobile phone, a ranging sensor 110 is disposed in the vicinity of a camera 120, and during shooting, as shown in fig. 2, a distance L1 is acquired by the ranging sensor 110, and the camera 120 is focused based on the distance L1. However, in the picture taken by the camera 120, there may be objects of different distances, such as the first object 210 and the second object 220 shown in fig. 2, wherein the first object 210 faces the camera 120 and the ranging sensor 110. At this time, the distance L1 measured by the ranging sensor 110 is the distance from the facing first object 210. However, in the picture captured by the camera 120, the target object may be the second object 220, the focus needs to be placed on the second object 220 to meet the actual shooting requirement, and the distance L2 between the target object and the second object 220 needs to be acquired. However, the position and angle of the distance measuring sensor 110 are fixed, and only the object distance in the opposite direction can be detected, and when it is necessary to focus on another target, the distance measuring sensor 110 cannot acquire the corresponding distance, and if the distance L1 acquired by the distance measuring sensor 110 is taken as the focal length, the image of the target is not in focus, and the screen is blurred.
In order to solve the existing problems, the embodiment of the present disclosure provides a ranging assembly 300, as shown in fig. 3, the ranging assembly 300 may be applied to a mobile terminal, and is installed at a position close to a camera, and a distance between the ranging assembly 300 and a target is acquired as a focal length of focusing of the camera. Ranging assembly 300 may include a base 310, a ranging sensor 320, and a controller 330. Wherein the base 310 may be used to fix with a mobile terminal or other devices. The distance measuring sensor 320 is installed on the base 310, and a detection direction of the distance measuring sensor 320 may be adjusted by the base 310. The range sensor 320 may be a Time of Flight (TOF) sensor or other optical sensor capable of detecting a distance, but the distance detected by the range sensor 320 needs to be aligned with the detection direction of the range sensor 320, so that the distance cannot be accurately detected when a certain angle exists between the target to be detected and the detection direction of the range sensor 320. Therefore, in the embodiment of the present disclosure, the controller 330 may be configured to control the base 310 to adjust the detection direction of the distance measuring sensor 320, so as to be able to face a target requiring a detection distance, and ensure that the obtained distance is accurate and reliable. The controller 330 may be a Micro Controller Unit (MCU) that controls the base 310 and may also control the distance measuring sensor 320 to measure distance. In some embodiments, the ranging assembly 300 may include a motor or other driving mechanism disposed on the base 310, and the motor may be controlled by the controller 330 to adjust the detection direction of the ranging sensor 320.
Generally, the Field of View (FOV) of the camera is generally 120 degrees, and the object to be photographed, i.e. the object to be focused, is generally at the center of the FOV, so the adjustable angle range of the distance measuring sensor 320 may be about 30 degrees, or may be set to 45 degrees to meet the adjustment requirement of a larger angle.
Referring to fig. 4, the first object 210 and the second object 220 exist in the field angle of the camera 120, wherein the second object 220 is a target for shooting, that is, a focus needs to be placed on the second object 220, at this time, the detection direction of the ranging sensor 320 is adjusted to be aligned with the second object for detection, so that the obtained distance L2 is the actual distance from the second object 220, and the distance L2 is used as a shooting focal length, thereby ensuring that the focus falls on the second object 220, and meeting the shooting requirement.
Applied to the ranging assembly of any of the above embodiments, the present disclosure provides a distance obtaining method 40, as shown in fig. 5, the distance obtaining method 40 includes steps S41-S43, which are described in detail below.
In step S41, the target direction of the target is acquired.
The target direction of the target may be obtained by receiving a control signal sent by a processor of the mobile terminal, and the determination of the target direction may be determined based on a preview image acquired by a camera assembly of the mobile terminal, which is described in detail later. The target can be an object needing focusing in the image to be shot, including a person, a scene and the like. The target direction can be expressed in various ways, and in one embodiment, the target direction can be determined by two angle values, such as a first angle α and a second angle β, as shown in fig. 6, and the relative position of the target can be determined by the two angle values. The first angle α is an angle between a lens center of the camera 120 or a center of the distance measuring sensor as a center point 121, the center point 121 and the target 221 is connected by a line a, the line a is an angle between a normal B of the lens or a reference line parallel to the center of the distance measuring sensor and the normal, and the angle is the first angle α; the second angle β may be an angle determined by projecting the connection line a onto a plane F perpendicular to the normal of the lens and using the central point or the projection point 122 thereof as the origin of polar coordinates, and is the second angle β. Through the two angles, the relative direction of the target in the space relative to the lens or the ranging sensor can be determined. In addition, in actual setting, the distance measuring sensor is arranged close to the lens of the camera, and compared with the actual shooting distance, the distance between the distance measuring sensor and the lens can be ignored, so that the technical scheme of the embodiment of the disclosure can be realized by adopting any one of the distance measuring sensor and the lens as a reference.
In step S42, the detection direction of the distance measuring sensor is adjusted to the target direction by the base based on the target direction, so that the distance measuring sensor is aligned with the target.
After the target direction is obtained, the detection direction of the distance measuring sensor can be adjusted through the control base, so that the distance measuring sensor is aligned to the target. The detection direction can also be determined by two angle values corresponding to the target direction, and respectively corresponds to the first angle alpha and the second angle beta, and the detection direction of the distance measuring sensor is consistent with the direction of the target by respectively adjusting, so that the target can be aligned to detect, and the error caused by the inconsistency between the target and the actual detected object of the distance measuring sensor is avoided.
In step S43, the distance to the target is acquired by the ranging sensor.
After the detection direction of the distance measuring sensor is aligned to the target, the distance between the target and the distance measuring sensor can be obtained by detecting through the distance measuring sensor, the obtained distance is obtained after the detection direction is adjusted, and the reliability of the detection distance of the distance measuring sensor can be guaranteed.
In the embodiment of the present disclosure, as shown in fig. 7, the distance obtaining method 40 may further include: and step S44, sending the distance to the camera assembly for adjusting the focal distance of the camera assembly for shooting the target. In this embodiment, the distance that obtains through range sensor can be used for the subassembly of making a video recording to confirm the focus when shooing the target, because range sensor's detection direction has aimed at the target and has surveyed the distance again, consequently this distance is accurate, reliable to guaranteed the subassembly of making a video recording when shooing this target, the accuracy of adjustment focus, consequently, can make the target be located the focus, the target is guaranteed clearly in the image of shooing, has improved the quality of image.
In some embodiments of the present disclosure, step S42 may include: adjusting the detection direction of the distance measuring sensor to a reference direction through the base; based on the target direction, the detection direction of the ranging sensor is adjusted from the reference direction to the target direction through the base. In this embodiment, the distance measuring sensor may be centered by the base, that is, the detection direction is parallel to the normal of the lens of the camera, that is, the reference direction. Since the target direction can be determined by two angles, which are both angle values with respect to the lens normal direction, i.e. the reference direction (the aforementioned first angle α and second angle β). Therefore, before the detection direction of the ranging sensor is adjusted to the target direction, or in the case of no detection, the detection direction of the ranging sensor can be returned to the reference direction, and thus, the detection direction thereof is adjusted to the target direction again without additional calculation cost.
In other embodiments of the present disclosure, step S42 may also include: determining the angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor; based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base. In this embodiment, different from the previous embodiment, the angles of the ranging sensor are adjusted twice, and by calculating the relative relationship between the current detection direction and the target direction, the first angle α and the second angle β of the target direction may be determined and the corresponding angle values of the detection direction may be determined to be different, so that two angle differences between the detection direction and the target direction may be obtained, that is, the angle to be adjusted is the angle to be adjusted, that is, the angle to be adjusted at two angles. On the basis, the detection direction of the distance measuring sensor is directly adjusted to the target direction without twice adjustment, and although the calculation cost is needed, the adjustment cost is saved.
Based on the same inventive concept, the embodiment of the present disclosure further provides a focal length adjusting method 50 applied to a mobile terminal, wherein the mobile terminal may include a camera assembly having a camera for capturing an image and capable of changing a focal length, and a distance measuring assembly 300 according to any of the foregoing embodiments, wherein the distance measuring sensor 320 of the distance measuring assembly 300 may be disposed adjacent to the camera for capturing. The focus adjustment method 50 may include steps S51-S56, as shown in fig. 8, which are described in detail below.
In step S51, a preview image is acquired by the camera module.
When the mobile terminal shoots, some situations are that a real-time image is obtained through a camera assembly, previewing is carried out through a display screen, and the image is shot under the condition that a user confirms shooting; in other cases, a real-time image is acquired through the camera module, preview is not performed through the display screen, only parameter confirmation such as light and focal length is performed in the background, and shooting is performed after the parameters are confirmed in the preview image.
In step S52, based on the preview image, an object in the preview image is determined.
After the preview image is obtained, determining a target in the preview image, wherein the target is a target needing focusing and can be a person, a scene or an object. In the captured image, the object in focus is the sharpest in focus, while the scene away from focus appears blurred. Therefore, according to the shooting requirements, a subject to be shot needs to be focused, that is, the focal distance is confirmed according to the distance of the subject, and for some shooting effects, the focal point needs to be intentionally positioned on a certain target, so that the shot image is partially blurred.
In some embodiments, step S52 may include: and performing target recognition on the preview image based on the preview image, and determining a target in the preview image. In this embodiment, after the preview image is obtained in real time, the preview image may be subjected to target recognition by means of a neural network, and after the target recognition, it is determined that some specific targets, such as a human face, a mountain peak, and the like, exist in the preview image, and the target may be used as the target in the preview image. The mode can automatically identify and judge some common shooting objects, and the focusing operation is performed, so that automatic focusing is realized, and convenience is brought to users.
In other embodiments, step S52 may also include: displaying the preview image; receiving a target determination instruction; based on the target determination instruction, a target in the preview image is determined. In this embodiment, the preview image needs to be displayed through a display screen of the mobile terminal, where a current focus position or a target may be marked, and the current focus position or the target may be the center of the preview image, may also be confirmed based on the method in the previous embodiment, or may be the detection direction of the current distance measuring sensor. The user can judge according to the displayed content, and in some cases, the current focus position or target is not the position or target that the user needs to focus on, and the adjustment can be performed according to the instruction of the user, for example, the user can directly click on the preview image through the touch screen, and the click position is the position or target that needs to focus on. Therefore, the selection is convenient, various requirements of a user can be met, and particularly, when the image with a special effect needs to be shot, the focus of the image can be confirmed according to the instruction of the user.
In step S53, the target direction of the target is determined based on the position of the target in the preview image.
After the position of the target in the preview image is determined, the target direction of the target can be determined. Because the Field of View (FOV) of the camera module is fixed, each point (which may be a pixel point) in the acquired image has a corresponding relationship with the direction in the Field of View. Thus, it can be determined by the position in the preview image that the position corresponds to the relative direction to the camera assembly in the actual scene.
In one embodiment, step S53 may include: determining a coordinate point of a target in a preview image; determining the position relation between the coordinate point and the center point of the preview image; based on the positional relationship, a target direction of the target is determined. In this embodiment, the corresponding relationship between each point in the preview image and the target direction may be preset, and then the target direction of the target may be determined after the coordinate point of the target is confirmed; or converting the coordinate point of the target according to the angle of view and the polar coordinate relationship between the position and the image center to obtain the corresponding target direction. The coordinate point of the target in the image may be a central point of the target, or may be a certain point of key points obtained by the target through target recognition, for example, a face target obtained by face recognition, and a nose tip point in the key points of the face is taken as the coordinate point of the target. The method and the device can quickly, conveniently and accurately determine the target direction in the actual scene through the target in the preview image.
In step S54, the target direction is sent to the ranging component.
After the target direction is determined from the preview image, the target direction is sent to a ranging assembly, such as the controller 330 in the ranging assembly 300 in the previous embodiment. The controller 330 of the distance measuring module 300 may be a microprocessor, and may not have the calculation capability for target identification and target direction confirmation in the foregoing steps, so that the calculation may be performed by the processor of the mobile phone, and after the target direction is obtained, the target direction is sent to the distance measuring module, thereby reducing the calculation cost and hardware cost of the distance measuring module.
In step S55, the distance to the target acquired by the ranging component through the distance acquisition method 40 of any of the foregoing embodiments is received. As described in the foregoing embodiment, after the ranging assembly acquires the target direction, the detection direction of the ranging sensor is adjusted by the base, so that the detection direction of the ranging sensor is consistent with the target direction, that is, the ranging sensor is aligned with the target, and thus, the accurate and reliable distance to the target can be obtained.
In step S56, the focal length of the image pickup assembly for photographing the object is adjusted based on the distance.
After the accurate distance between the target and the object is obtained, the focal length of the object can be used, so that focusing can be performed according to the focal length, the focal point falls on the object, the clarity of the object can be guaranteed, and an image effect required by a user can be shot.
Based on the same concept, the embodiment of the present disclosure also provides a distance obtaining apparatus 400.
It is understood that the distance obtaining apparatus 400 provided by the embodiment of the present disclosure includes a hardware structure and/or a software module for performing the above functions. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Fig. 9 is a block diagram illustrating a distance acquisition apparatus 400 according to an exemplary embodiment. Referring to fig. 9, distance acquisition device 400 is applied to the range finding subassembly, and the range finding subassembly includes the base to and install in base and angularly adjustable range sensor, distance acquisition device 400 includes: a first obtaining unit 410 for obtaining a target direction of a target; the processing unit 420 is configured to adjust the detection direction of the ranging sensor to a target direction through the base based on the target direction, so that the ranging sensor is aligned with the target; the first acquiring unit 410 is further configured to acquire a distance to the target through the ranging sensor.
In an embodiment, the processing unit 420 is further configured to: adjusting the detection direction of the distance measuring sensor to a reference direction through the base; based on the target direction, the detection direction of the ranging sensor is adjusted from the reference direction to the target direction through the base.
In an embodiment, the processing unit 420 is further configured to: determining the angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor; based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base.
In one embodiment, as shown in fig. 10, the distance obtaining apparatus 400 further includes: and a first sending unit 430, configured to send the distance to the camera assembly, and configured to adjust a focal length of the camera assembly to shoot the target.
With respect to the distance acquisition apparatus 400 in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same concept, the embodiment of the present disclosure also provides a focal length adjustment device 500.
It is understood that the focal length adjustment device 500 provided by the embodiment of the present disclosure includes a hardware structure and/or a software module for performing the above functions. The disclosed embodiments can be implemented in hardware or a combination of hardware and computer software, in combination with the exemplary elements and algorithm steps disclosed in the disclosed embodiments. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
Fig. 11 is a block diagram illustrating a focus adjustment apparatus 500 according to an exemplary embodiment. Referring to fig. 11, a focus adjustment apparatus 500 is applied to a mobile terminal, the mobile terminal includes a camera assembly and a distance measurement assembly, and the focus adjustment apparatus 500 includes: a second acquiring unit 510, configured to acquire a preview image through the camera module; a target determination unit 520 for determining a target in the preview image based on the preview image; an angle determining unit 530 for determining a target direction of the target based on the position of the target in the preview image; a second sending unit 540, configured to send the target direction to the ranging component; a receiving unit 550, configured to receive a distance between the target and the ranging component acquired by the distance acquiring method according to any of the foregoing embodiments; and a focal length adjusting unit 560 for adjusting a focal length of the image pickup assembly to photograph the target based on the distance.
In an embodiment, the target determination unit 520 determines the target in the preview image by: and performing target recognition on the preview image based on the preview image, and determining a target in the preview image.
In an embodiment, the target determination unit 520 determines the target in the preview image by: displaying the preview image; receiving a target determination instruction; based on the target determination instruction, a target in the preview image is determined.
In an embodiment, the angle determination unit 530 determines the target direction of the target by: determining a coordinate point of a target in a preview image; determining the position relation between the coordinate point and the center point of the preview image; based on the positional relationship, a target direction of the target is determined.
With respect to the focal length adjusting apparatus 500 in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
Fig. 12 is a block diagram illustrating an apparatus for distance acquisition or focus adjustment according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 12, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices 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 disks.
Power component 806 provides power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Fig. 13 is a block diagram illustrating an apparatus 1100 for image processing according to an example embodiment. For example, the apparatus 1100 may be provided as a server. Referring to fig. 13, the apparatus 1100 includes a processing component 1122 that further includes one or more processors and memory resources, represented by memory 1132, for storing instructions, such as application programs, executable by the processing component 1122. The application programs stored in memory 1132 may include one or more modules that each correspond to a set of instructions. Additionally, processing component 1122 is configured to execute instructions to perform the above-described method for lithium battery activation charging
The apparatus 1100 may also include a power component 1126 configured to perform power management of the apparatus 1100, a wired or wireless network interface 1150 configured to connect the apparatus 1100 to a network, and an input/output (I/O) interface 1158. The apparatus 1100 may operate based on an operating system stored in the memory 1132, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
It is understood that "a plurality" in this disclosure means two or more, and other words are analogous. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It will be further understood that the terms "first," "second," and the like are used to describe various information and that such information should not be limited by these terms. These terms are only used to distinguish one type of information from another and do not denote a particular order or importance. Indeed, the terms "first," "second," and the like are fully interchangeable. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure.
It will be further understood that the terms "central," "longitudinal," "lateral," "front," "rear," "upper," "lower," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in an orientation or positional relationship indicated in the drawings for convenience in describing the present embodiment and to simplify the description, but do not indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation.
It will be further understood that, unless otherwise specified, "connected" includes direct connections between the two without the presence of other elements, as well as indirect connections between the two with the presence of other elements.
It is further to be understood that while operations are depicted in the drawings in a particular order, this is not to be understood as requiring that such operations be performed in the particular order shown or in serial order, or that all illustrated operations be performed, to achieve desirable results. In certain environments, multitasking and parallel processing may be advantageous.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (20)

1. A distance obtaining method is characterized by being applied to a distance measuring assembly, wherein the distance measuring assembly comprises a base and a distance measuring sensor which is arranged on the base and has an adjustable angle, and the method comprises the following steps:
acquiring a target direction of a target;
based on the target direction, adjusting the detection direction of the ranging sensor to the target direction through the base, so that the ranging sensor is aligned to the target;
and acquiring the distance between the target and the distance measuring sensor.
2. The method according to claim 1, wherein the adjusting, by the base, the detection direction of the ranging sensor to the target direction based on the target direction includes:
adjusting the detection direction of the distance measuring sensor to a reference direction through the base;
adjusting, by the base, a detection direction of the ranging sensor from the reference direction to the target direction based on the target direction.
3. The method according to claim 1, wherein the adjusting, by the base, the detection direction of the ranging sensor to the target direction based on the target direction includes:
determining an angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor;
based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base.
4. The distance acquisition method according to claim 1, characterized in that the method further comprises:
and sending the distance to a camera shooting assembly for adjusting the focal length of the camera shooting assembly for shooting the target.
5. A focal length adjusting method is applied to a mobile terminal, the mobile terminal comprises a camera shooting assembly and a distance measuring assembly, and the method comprises the following steps:
acquiring a preview image through the camera shooting assembly;
determining a target in the preview image based on the preview image;
determining a target direction of the target based on the position of the target in the preview image;
sending the target direction to the ranging component;
receiving the distance between the distance measurement component and the target acquired by the distance acquisition method according to any one of claims 1 to 4;
and adjusting the focal distance of the camera shooting component for shooting the target based on the distance.
6. The focus adjustment method of claim 5, wherein the determining the target in the preview image based on the preview image comprises:
and performing target recognition on the preview image based on the preview image, and determining a target in the preview image.
7. The focus adjustment method of claim 5, wherein the determining the target in the preview image based on the preview image comprises:
displaying the preview image;
receiving a target determination instruction;
determining a target in the preview image based on the target determination instruction.
8. The focus adjustment method of claim 5, wherein the determining a target direction of the target based on the position of the target in the preview image comprises:
determining a coordinate point of the target in the preview image;
determining the position relation between the coordinate point and the center point of the preview image;
and determining the target direction of the target based on the position relation.
9. A ranging assembly, comprising:
a base;
the distance measuring sensor is mounted on the base in an angle-adjustable manner;
a controller which acquires a distance by the distance measuring sensor by the distance acquisition method according to any one of claims 1 to 4.
10. The ranging assembly of claim 9, further comprising:
a motor disposed on the base;
the controller controls the motor to adjust the detection direction of the distance measuring sensor.
11. The utility model provides a distance acquisition device which characterized in that is applied to the range finding subassembly, the range finding subassembly includes the base, and install in base and angularly adjustable range sensor, the device includes:
a first acquisition unit configured to acquire a target direction of a target;
the processing unit is used for adjusting the detection direction of the ranging sensor to the target direction through the base based on the target direction so that the ranging sensor is aligned to the target;
the first acquisition unit is further used for acquiring the distance between the target and the first acquisition unit through the ranging sensor.
12. The distance acquisition device according to claim 11, wherein the processing unit is further configured to:
adjusting the detection direction of the distance measuring sensor to a reference direction through the base;
adjusting, by the base, a detection direction of the ranging sensor from the reference direction to the target direction based on the target direction.
13. The distance acquisition device according to claim 11, wherein the processing unit is further configured to:
determining an angle to be adjusted of the ranging sensor based on the target direction and the current detection direction of the ranging sensor;
based on the angle to be adjusted, the detection direction of the distance measuring sensor is adjusted to the target direction through the base.
14. The distance acquisition apparatus according to claim 11, characterized in that said apparatus further comprises:
and the first sending unit is used for sending the distance to a camera shooting assembly and adjusting the focal length of the camera shooting assembly for shooting the target.
15. The utility model provides a focus adjusting device which characterized in that is applied to mobile terminal, mobile terminal includes camera subassembly and range finding subassembly, the device includes:
the second acquisition unit is used for acquiring a preview image through the camera shooting assembly;
a target determination unit configured to determine a target in the preview image based on the preview image;
an angle determining unit configured to determine a target direction of the target based on a position of the target in the preview image;
a second sending unit for sending the target direction to the ranging component;
a receiving unit, configured to receive a distance between the target and the ranging component acquired by the distance acquisition method according to any one of claims 1 to 4;
and the focal length adjusting unit is used for adjusting the focal length of the target shot by the shooting assembly based on the distance.
16. The focus adjustment apparatus according to claim 15, wherein the target determination unit determines the target in the preview image by:
and performing target recognition on the preview image based on the preview image, and determining a target in the preview image.
17. The focus adjustment apparatus according to claim 15, wherein the target determination unit determines the target in the preview image by:
displaying the preview image;
receiving a target determination instruction;
determining a target in the preview image based on the target determination instruction.
18. The focal length adjustment device according to claim 15, wherein the angle determination unit determines the target direction of the target by:
determining a coordinate point of the target in the preview image;
determining the position relation between the coordinate point and the center point of the preview image;
and determining the target direction of the target based on the position relation.
19. A mobile terminal, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the focus adjustment method of any of claims 5-8.
20. A non-transitory computer readable storage medium, instructions in which, when executed by a processor, implement the distance acquisition method of any one of claims 1-4 or the focus adjustment method of any one of claims 5-8.
CN202011001113.5A 2020-09-22 2020-09-22 Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly Pending CN112188089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011001113.5A CN112188089A (en) 2020-09-22 2020-09-22 Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011001113.5A CN112188089A (en) 2020-09-22 2020-09-22 Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly

Publications (1)

Publication Number Publication Date
CN112188089A true CN112188089A (en) 2021-01-05

Family

ID=73956770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011001113.5A Pending CN112188089A (en) 2020-09-22 2020-09-22 Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly

Country Status (1)

Country Link
CN (1) CN112188089A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113634961A (en) * 2021-10-18 2021-11-12 武汉逸飞激光股份有限公司 Method and device for obtaining welding focal length compensation value, electronic equipment and storage medium
CN115086549A (en) * 2022-05-06 2022-09-20 深圳市格灵精睿视觉有限公司 Photographing method, photographing apparatus, computer device, and storage medium
CN116736937A (en) * 2022-09-30 2023-09-12 荣耀终端有限公司 Notebook computer and input operation acquisition method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104822020A (en) * 2015-03-31 2015-08-05 深圳市莫孚康技术有限公司 Automatic follow focus device based on video target tracking
CN105874384A (en) * 2016-01-06 2016-08-17 深圳市莫孚康技术有限公司 Focus following system and method based on multiple distance measuring modes, and shooting system
WO2019231174A1 (en) * 2018-06-01 2019-12-05 한화테크윈 주식회사 Monitoring system and operation method thereof
CN111314597A (en) * 2018-12-11 2020-06-19 北京小米移动软件有限公司 Terminal, focusing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104822020A (en) * 2015-03-31 2015-08-05 深圳市莫孚康技术有限公司 Automatic follow focus device based on video target tracking
CN105874384A (en) * 2016-01-06 2016-08-17 深圳市莫孚康技术有限公司 Focus following system and method based on multiple distance measuring modes, and shooting system
WO2019231174A1 (en) * 2018-06-01 2019-12-05 한화테크윈 주식회사 Monitoring system and operation method thereof
CN111314597A (en) * 2018-12-11 2020-06-19 北京小米移动软件有限公司 Terminal, focusing method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113634961A (en) * 2021-10-18 2021-11-12 武汉逸飞激光股份有限公司 Method and device for obtaining welding focal length compensation value, electronic equipment and storage medium
CN113634961B (en) * 2021-10-18 2021-12-28 武汉逸飞激光股份有限公司 Method and device for obtaining welding focal length compensation value, electronic equipment and storage medium
CN115086549A (en) * 2022-05-06 2022-09-20 深圳市格灵精睿视觉有限公司 Photographing method, photographing apparatus, computer device, and storage medium
CN115086549B (en) * 2022-05-06 2024-04-30 深圳市格灵精睿视觉有限公司 Shooting method, shooting device, computer equipment and storage medium
CN116736937A (en) * 2022-09-30 2023-09-12 荣耀终端有限公司 Notebook computer and input operation acquisition method

Similar Documents

Publication Publication Date Title
US10375296B2 (en) Methods apparatuses, and storage mediums for adjusting camera shooting angle
CN111314597B (en) Terminal, focusing method and device
KR101712301B1 (en) Method and device for shooting a picture
CN112188089A (en) Distance acquisition method and device, focal length adjustment method and device, and distance measurement assembly
CN110557547B (en) Lens position adjusting method and device
EP3145170A1 (en) Method and apparatus for controlling positioning of camera device, camera device and terminal device
EP3352453B1 (en) Photographing method for intelligent flight device and intelligent flight device
US10191708B2 (en) Method, apparatrus and computer-readable medium for displaying image data
CN114009003A (en) Image acquisition method, device, equipment and storage medium
CN105959594B (en) The light measuring method and device of photographic equipment
CN113364965A (en) Shooting method and device based on multiple cameras and electronic equipment
CN112202962A (en) Screen brightness adjusting method and device and storage medium
CN106973275A (en) The control method and device of projector equipment
CN114339022B (en) Camera shooting parameter determining method and neural network model training method
CN106483740B (en) Projector focusing method and device
CN114422687B (en) Preview image switching method and device, electronic equipment and storage medium
KR20210157289A (en) Method and apparatus for displaying captured preview image, and medium
CN112824933A (en) Distance measuring method, distance measuring device and electronic equipment
CN107707819B (en) Image shooting method, device and storage medium
CN110996047A (en) Pet tracking shooting method, device and system and computer readable storage medium
CN112804462B (en) Multi-point focusing imaging method and device, mobile terminal and storage medium
CN113138384B (en) Image acquisition method and device and storage medium
CN109447929B (en) Image synthesis method and device
CN109862252B (en) Image shooting method and device
CN115118844A (en) Mobile device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105

RJ01 Rejection of invention patent application after publication