WO2021077270A1 - 一种获取目标距离的方法、控制装置及移动平台 - Google Patents

一种获取目标距离的方法、控制装置及移动平台 Download PDF

Info

Publication number
WO2021077270A1
WO2021077270A1 PCT/CN2019/112383 CN2019112383W WO2021077270A1 WO 2021077270 A1 WO2021077270 A1 WO 2021077270A1 CN 2019112383 W CN2019112383 W CN 2019112383W WO 2021077270 A1 WO2021077270 A1 WO 2021077270A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
distance
imaging
information
image
Prior art date
Application number
PCT/CN2019/112383
Other languages
English (en)
French (fr)
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/CN2019/112383 priority Critical patent/WO2021077270A1/zh
Priority to CN201980030589.0A priority patent/CN112136312A/zh
Publication of WO2021077270A1 publication Critical patent/WO2021077270A1/zh

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
    • 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/66Remote control of cameras or camera parts, e.g. by remote control devices

Definitions

  • the present invention relates to the field of computer application technology, in particular to a method, a control device and a mobile platform for obtaining a target distance.
  • a brief scheme adopted for tracking a target object includes: determining whether the target object is approaching or walking away by judging the size change of the target object in the image. For example, when the size of the target object in the image becomes smaller, it can be considered that the target object is far away from the camera device relative to the camera device, and vice versa, it is closer to the camera device. This method can quickly determine whether the target object is far away or close to the camera. How to determine the distance of a target object relative to the camera device relatively more accurately has become a hot issue of research.
  • the present application provides a method, a control device, and a mobile platform for obtaining a target distance, which can more accurately determine the distance between the object to be photographed and the camera device compared to determining the direction of movement of the user based only on the image size.
  • an embodiment of the present invention provides a method for obtaining a target distance, and the method includes:
  • an embodiment of the present invention provides a control device, the control device including: a storage device and a processor;
  • the storage device is used to store program instructions
  • the processor can call the program instructions for
  • an embodiment of the present invention provides a mobile platform, the mobile platform including: a power assembly, a storage device, and a controller;
  • the power assembly is used to drive the mobile platform to move
  • Program instructions are stored in the storage device in the storage device;
  • the processor calls the program instructions for
  • an embodiment of the present invention provides a control device.
  • the device has the function of realizing the method for obtaining the target distance described in the first aspect.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the control device may include: a receiving module, a processing module, a correction module, and a control module.
  • the receiving module is used to receive image frames and adjacent image frames from the shooting device;
  • the processing module is used to determine the distance change information of the target object according to the imaging feature information of the target object in the image, and the image is determined by the It is collected by a photographing device;
  • the target object is focused by the photographing device, and the object distance between the target object and the photographing device when in focus is obtained; the determination is made according to the object distance and the distance change information
  • the distance information between the target object and the mobile platform; and the control device may optionally further include a control module for controlling the mobile platform to follow the movement of the target object;
  • the control module further It can be used to control the camera to focus on the target object, so that the drone can obtain the object distance between the target object and the camera.
  • the drone can combine the imaging characteristics of the target object in the image and the object distance determined by the shooting device during focusing to comprehensively determine the more accurate distance of a target object relative to the shooting device and other equipment. Information, and then can better determine whether the target object to be photographed is moving away from the camera device or moving closer to the camera device according to needs, so as to better implement functions such as tracking the target object in the follow-up.
  • FIG. 1 is a schematic diagram of the architecture of a system for obtaining a target distance according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for obtaining a target distance according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another method for obtaining a target distance according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of another method for obtaining a target distance according to an embodiment of the present invention.
  • FIG. 5a is a schematic diagram of focusing on a target object in an image frame according to an embodiment of the present invention.
  • 5b is a schematic diagram of focusing on a target object in adjacent image frames of an image frame according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of interaction between a control device and a photographing device according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a Gaussian imaging formula provided by an embodiment of the present invention.
  • Figure 8 is a schematic structural diagram of a control device provided by an embodiment of the present invention.
  • Fig. 9 is a schematic structural diagram of a control device provided by an embodiment of the present invention.
  • the embodiment of the present invention provides a solution that can obtain the target distance of a target object to be photographed compared to the camera device or the mobile platform.
  • the camera device can collect images of the surrounding environment, and the image frames included in these images At least one target object that needs to be tracked can be detected in.
  • the shooting device can send the collected images to the mobile platform as needed.
  • the camera device can be mounted on a mobile platform.
  • the mobile platform after the mobile platform receives the image, it can obtain the distance change information of the target object according to the imaging characteristic information of the target object in the image, such as the contour shape and the imaging size.
  • the device or mobile platform has changed the distance to or away from it.
  • the object distance between the target object and the shooting device when the camera is in focus calculated when the camera is focusing on the target object can be further combined to obtain the distance between the target object and the mobile platform information.
  • the mobile platform after the mobile platform obtains the distance change information, it can also detect whether the distance change information can determine whether the target object is close to or far from the camera or mobile platform; if so, the mobile platform can directly control the distance based on the distance change information.
  • the camera device performs focusing operations on the target object, and can simultaneously control the camera device and/or the mobile platform to realize functions such as tracking the target object.
  • the mobile platform can control the camera device to focus on the target object, and obtain the object distance between the target object and the camera device when in focus And can use the object distance to correct the distance change information, so as to obtain accurate distance information of the target object, and then can simultaneously or sequentially control the mobile platform to follow the target object to move, and control the camera to focus on the target object operating.
  • the object distance of the target object collected by the camera is used to assist the distance change information of the target object, and the accurate distance information of the target object can be obtained, so as to better realize the real-time tracking of the target object and other functions.
  • the scheme does not add additional hardware equipment, which can reduce the waste of resources.
  • the solution for obtaining the target distance mentioned in the embodiments of this application can be applied to mobile platforms such as unmanned aerial vehicles and self-driving cars. These mobile platforms can be equipped with cameras, cameras, and even mobile phones with shooting environments.
  • the image camera device measures relatively accurate distance information to the target object based on the captured image and the focus of the camera device, thereby realizing the detection and tracking of the target object.
  • the embodiment of the present invention takes a scene in which a drone is tracking a target object as an example for description, which does not constitute a limitation to the present invention.
  • FIG. 1 is a schematic structural diagram of a control system for obtaining distance according to an embodiment of the present invention.
  • the system mainly includes: an aircraft 101, a photographing device 102, and the like.
  • the aircraft 101 and the camera 102 may be integrated, or may be of a separate design.
  • the aircraft 101 is mainly directly or indirectly connected to the camera device 102 through a control device, and at least the image captured by the camera device 102 and the related parameters of the camera device 102 after focusing can be obtained, for example, the camera device 102 The parameters such as the focal length or the object distance and other parameters directly calculated by the imaging device 102.
  • the aircraft 101 uses the control device to determine the camera device or the target distance between the aircraft and the person to be detected (hereinafter referred to as the target object 103) shown in FIG. 1.
  • the control device is at least Including the processor and storage device.
  • the control device may be set in the aircraft 101 shown in FIG. 1, that is, the control device is configured inside the aircraft 101, and the camera is installed on the drone and used for collecting data.
  • the image of the surrounding environment is sent to the aircraft 101 to facilitate the control device in the aircraft 101 to perform corresponding distance detection processing.
  • the control device can obtain the imaging feature information of the target object based on the image, and obtain the distance change information according to the imaging feature information of the target object; in addition, the control device can also receive the object distance of the target object collected by the shooting device and base it on The object distance and distance change information obtain the distance information between the target object and the mobile platform or the photographing device.
  • control device may also be set on the camera device, and obtain the distance between the target object and the camera device 102 or the aircraft 101 directly based on the image collected by the camera device and the object distance determined by focusing. information. At this time, the control device may send the obtained distance information about the target object to the aircraft, so that the aircraft can perform corresponding flight processing, such as flying toward the target object and flying away from the target object.
  • control device may also be provided on a remote control for controlling the aircraft 101, and the shooting device 102 transmits the collected images and the object distance of the target object to the control in the remote control through wireless transmission.
  • the control device can obtain the distance information of the target object based on the object distance and distance change information of the target object. Then the control device sends the distance information to the aircraft 101 wirelessly again to facilitate the aircraft 101 to follow the movement of the target object and control the camera 102 to perform focus control on the target object.
  • control device may even be a separate device.
  • the separate control device can receive the image and object distance collected from the shooting device through limited or wireless transmission, and is based on the object distance of the target object. And the distance change information to obtain the distance information of the target object. Then the control device sends the distance information of the target object to the aircraft 101 through limited or wireless transmission, so that the aircraft 101 can track the target object and control the camera 102 to perform a focusing operation on the target object.
  • the control device after the control device obtains the object distance between the target object and the mobile platform or the camera through the camera 102, it can also search the currently acquired image frames based on the object distance.
  • the target object If the target object is not found in the currently collected image frame, that is, the drone has not detected the target object currently, then the history of the target object in the historical image frame collected in history is acquired Imaging feature information, such as historical imaging features such as historical contour shape and historical imaging size of the target object, and historical object distance of the target object corresponding to the historical image frame; and based on the historical object distance of the target object And the historical imaging feature information, searching for the target object in the currently acquired image frame.
  • the process of determining the distance information of a certain target object may refer to the following description of the embodiment corresponding to FIG. 2.
  • FIG. 2 is a schematic flowchart of a method for obtaining a target distance according to an embodiment of the present invention.
  • the method for obtaining a target distance in the embodiment of the present application can be implemented by the control device mentioned in the above embodiment.
  • the method can specifically include the following steps.
  • S201 Determine distance change information of the target object according to the imaging feature information of the target object in the image. After acquiring the image captured by the shooting device, the imaging feature information of the target object in the first image frame and the second image frame sequentially collected in the image can be compared, for example, comparing the target object in the first image frame and the second image frame Whether the imaging feature information such as the contour shape or the imaging size in the image changes, the distance change information of the target object can be obtained according to the change.
  • the imaging size in the second image frame is larger than the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform is reduced, that is, the target The object is moving closer to the camera or the mobile platform; if the imaging size in the second image frame is smaller than the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform has increased, that is Say, the target object is moving away from the camera or mobile platform.
  • the image characteristics of the target object to be tracked that have been identified and stored can be used according to the difference between the currently received image and the target object to be tracked.
  • the image features are compared to determine the target object in the image.
  • the recognition of the target object in the image can also use other image recognition technology for recognition and determination.
  • S202 Focusing on the target object by the photographing device, and acquiring an object distance between the target object and the photographing device when the focus is achieved.
  • the shooting device can automatically focus on the target object, so that a clearer image of the target object can be obtained when the focus is achieved.
  • the focusing process of the camera will not be described here.
  • the camera after obtaining the moving direction (distance change information) of the target object relative to the mobile platform, the camera can also be controlled to perform a focusing operation on the target object according to the distance change information, so that the target object can be clearly imaged , And then get the object distance of the target object when the focus is achieved.
  • the focus can be far away, and vice versa. That is to say, the distance change information can play a certain auxiliary role.
  • the distance change information can accurately determine the distance change of the target object relative to the camera device, it can better assist the camera device to focus on the target object.
  • the distance change information includes the moving direction of the target object relative to the mobile platform; it is also possible to control the lens of the photographing device to perform a movement corresponding to the moving direction of the target object , So that the camera can focus on the target object, so as to obtain the object distance between the target object and the camera when the camera is in focus.
  • the lens needs to be moved back and forth to test whether the imaging parameters meet the preset focusing conditions under different image point distances (distances between the lens and the sensor). Since the distance between the target object and the camera is unpredictable, it is necessary to perform the focusing operation of moving the lens back and forth many times to try to find the focal point. The focusing operation of moving the lens back and forth causes the focusing process to last a long time. In addition, the image quality is not high during the focusing process, which will also reduce the accuracy of target tracking.
  • a control instruction can be sent to the shooting device.
  • the control instruction is used to control the lens of the shooting device to rotate and move back and forth corresponding to the movement direction of the target object.
  • the movement direction of the target object can predict the target to a certain extent.
  • the distance between the subject and the shooting device changes, so the lens can be controlled to move in one direction to measure the focal point.
  • the above implementation can enable the target object to be in focus faster in the image frame and form a clear image. For example, when the target object moves away from the camera or the mobile platform, an instruction to control the stretching of the camera lens is sent, so that the camera can focus on the target faster and find the focal point.
  • the specific implementation manner of obtaining the object distance between the target object and the photographing device may be: obtaining the image distance and focal length of the photographing device when the target object is in focus, and then according to The image distance and focal length of the target object are calculated based on the Gaussian imaging formula to obtain the object distance of the target object.
  • the Gaussian imaging formula may be:
  • a is the object distance
  • b is the image distance
  • f is the focal length.
  • the image distance b and focal length f of the target object are known, and the object distance a can be calculated according to the Gaussian imaging formula, and then the distance information of the target object can be obtained based on the object distance a, so as to realize accurate tracking of the target object.
  • the parameters given by the Gaussian imaging formula can be adjusted according to specific imaging parameters, which are not limited in the embodiment of the present invention.
  • S203 Determine the distance information between the target object and the mobile platform according to the object distance and the distance change information.
  • the distance change information may indicate the approximate moving direction of the target object relative to the mobile platform.
  • the object distance can be used to correct the distance change information to obtain the target object and the camera. More accurate distance information between mobile platforms is described.
  • the obtained distance information can still be understood as information used to indicate the distance change between the target object and the camera or mobile platform, but the distance information is more than the mentioned distance change information. Is accurate.
  • the object distance between the target object and the shooting device or the mobile platform can also be calculated, and based on the target object and the shooting device or the mobile platform.
  • the distance change information and the object distance between the mobile platforms obtain the distance information, which indicates the accurate distance between the target object and the camera or the mobile platform, so that the drone can accurately track the target object.
  • FIG. 3 is a schematic flowchart of another method for obtaining a target distance according to an embodiment of the present invention.
  • the method for obtaining a target distance in the embodiment of the present application can be achieved by the method mentioned in the above embodiment.
  • the method is implemented by the control device, and the method may specifically include the following steps.
  • S301 Determine distance change information of the target object according to the imaging feature information of the target object in the image.
  • S302 Focusing on the target object by the photographing device, and acquiring an object distance between the target object and the photographing device when the focus is achieved.
  • step S303 Determine the distance information between the target object and the mobile platform according to the object distance and the distance change information. It should be noted that the specific implementation of step S301, step S302, and step S303 can refer to the description of step S201, step S202, and step S203 in FIG. 2, which will not be repeated here. After the distance information is obtained in step S303, the following steps S304 and S305 may optionally be performed to achieve target tracking and subsequent auxiliary focusing, such as the next image frame.
  • S304 Control the mobile platform to follow the target object to move according to the distance information. After the distance information of the target object is known, the mobile platform can be controlled to move in the direction of movement of the target object based on the distance information, and the distance information can indicate that the target object is approaching or moving away relative to the mobile platform.
  • S305 Control the photographing device to focus on the target object according to the distance information. After the accurate distance information of the target object is known, a control instruction can be sent to the shooting device, so that the shooting device can focus on the target object after the movement, so that the target object can be clearly imaged in the image frame.
  • step S304 and step S305 is in no particular order, that is, the aircraft executes "based on the distance information to control the mobile platform to move in the direction of the target object's movement" and "based on the distance information to control the camera to move the camera.
  • the process of "focusing on the target object” does not matter in sequence. It can be understood that, based on the distance information, the mobile platform can be controlled to move in the direction in which the target object moves, and then the process of controlling the shooting device to focus on the target object according to the distance information is performed. It is also possible to control the camera to focus on the target object according to the distance information, and then control the mobile platform to move in the direction of the target object based on the distance information.
  • the process of controlling the moving platform to move in the direction of the target object based on the distance information and the process of controlling the camera to focus on the target object based on the distance information can also be performed at the same time, which is not limited in the embodiment of the present invention.
  • the object distance between the target object and the shooting device from the camera can also be obtained, and the object distance can be used to determine the distance change information. Correction is performed to obtain accurate distance information of the target object, and it is convenient for the mobile platform to focus and track the target object according to the accurate distance information, thereby realizing accurate tracking of the target object.
  • FIG. 4 is a schematic flowchart of another method for obtaining a target distance provided by an embodiment of the present invention.
  • the method for obtaining a target distance in the embodiment of the present application can be controlled by the control mentioned in the above embodiment.
  • the method may specifically include the following steps.
  • S401 Determine distance change information of the target object according to the imaging feature information of the target object in the image.
  • the imaging feature information of the target object in the multiple image frames meets the imaging change condition. It is worth noting that the distance change information obtained according to the imaging feature information of the target object may not accurately reflect the movement of the target object. For example, when the target object suddenly squats down, the imaging size of the target object changes greatly at this time, but The distance between the target object and the camera or mobile platform has not actually changed. At this time, if the target object is tracked according to the obtained distance change information, there may be disadvantages such as missing the target object and following the wrong target object. Therefore, In the embodiment of the present invention, the imaging feature information is compared with the imaging change conditions to determine whether the distance change information needs to be supplemented and corrected.
  • the imaging feature information of the target object in the multiple image frames that satisfies the imaging change condition may be: the first aspect, the contour shape of the target object in the current image frame, and the target object in the current image frame
  • the similarity between the contour shapes in adjacent image frames is less than the preset similarity threshold, otherwise it does not meet the imaging change condition.
  • the imaging change condition can also be considered as meeting the imaging change condition if it is less than or equal to the preset similarity threshold And/or, in the second aspect, the difference between the imaging size of the target object in the current image frame and the imaging size of the target object in adjacent image frames of the current image frame is less than the preset size threshold, and vice versa If the imaging change condition is not met, of course, it can also be considered that the size threshold is less than or equal to the preset size threshold to meet the imaging change condition. In other words, it is also possible to determine whether the imaging feature information meets the imaging change condition based on the continuity of the pixel change of the target object in the image. If it is not continuous, the imaging change condition is not satisfied, and if it changes continuously, the imaging change condition is satisfied. .
  • the photographing device when the photographing device collects the current image frame, it may first determine the adjacent image frames of the current image frame, and compare the current image frame with the adjacent image frames. Further, by calculating the pixel characteristics of the target object in the current image frame and the pixel characteristics of the target object in the adjacent image frame, the contour shape of the target object in the current image frame and the adjacent image frame are obtained. Contour shapes in the frame.
  • the similarity between the contour shape of the target object in the current image frame and the contour shape of the target object in the adjacent image frame is less than (or less than or equal to) a preset similarity threshold, then Explain that the pixel point changes of the target object in the current image frame and adjacent image frames are not continuous, that is, the contour shape of the target object in the current image frame is different from the contour shape of the target object in the adjacent image frame. Big difference.
  • the pixel point feature may include features such as the imaging center, image height, or number of pixels of the target object.
  • the imaging center can be used to characterize the location of the imaging.
  • the image height or the number of pixels can be used to characterize the imaging size. Taking the number of pixels as an example, the number of pixels corresponding to the target object determined in the current frame is 1000 pixels, while the number of pixels corresponding to the target object determined in the previous frame is 20,000 pixels, indicating that the number of pixels has been compared. A large jump may cause an error in the target object identified in the current frame.
  • Figure 5a and Figure 5b Take Figure 5a and Figure 5b as an example for illustration, assuming that the preset similarity threshold is 90%, where Figure 5a is the current image frame captured by the camera, and Figure 5b is the current image frame captured by the camera.
  • the adjacent image frame, the adjacent image frame may be, for example, the previous image frame or the image frame with a shooting interval of 0.5 seconds, and the target object is a human object in the current image frame.
  • the target user is standing normally, while in Fig. 5b, the target user jumps up, causing the target user’s contour shape or size in the image to change, but does not actually move.
  • the embodiment of the present invention does not limit the preset similarity threshold and the preset size threshold.
  • the imaging change conditions it is considered that the target object has indeed walked far or walked in, and the following S403 and S404 will be executed, or only one of the steps will be executed. If the imaging change conditions are not met, it is considered uncertain Whether the target object has walked far or walked in, the following S405 to S408 will be executed at this time.
  • S403 Control the mobile platform to follow the target object to move according to the distance change information. That is, when it is known that the imaging characteristic information of the target object meets the imaging change condition, the mobile platform can be controlled to follow the target object to move according to the distance change information of the target object.
  • S404 Control the photographing device to focus on the target object according to the distance change information.
  • the focus can be performed directly based on the distance change information, so that the target object is clearly imaged in the image frame.
  • step S403 and step S404 are in no particular order, and the specific implementation of S403 and S404 can refer to the description of step S304 and step S305 in FIG. 3.
  • S405 Focusing on the target object by the shooting device, and acquiring the object distance between the target object and the shooting device when the focus is in focus.
  • a focus control instruction may be sent to the photographing device, so that the photographing device focuses on the target object to obtain the object distance between the target object and the photographing device, and receive the object distance from the photographing device.
  • the object distance collected by the device, where the object distance reflects the distance information between the current target object and the photographing device.
  • S406 Determine the distance information between the target object and the mobile platform according to the object distance and the distance change information.
  • S407 Control the mobile platform to follow the target object to move according to the distance information.
  • S408 Control the photographing device to focus on the target object according to the distance information.
  • S407 and S408 are in no particular order, or only S407 is executed, or only S408 is executed, and the specific implementation of S407 and S408 can refer to the description of step S304 and step S305 in FIG. 3.
  • the distance change information of the target object can also be detected whether the imaging feature information of the target object in the multiple image frames meets the imaging conditions. If the imaging change conditions are met, the distance can be determined according to the The change information directly controls the focusing operation of the photographing device, which can save the time for processing the distance change information of the target object, thereby improving the tracking speed of the target object. If the imaging conditions are not satisfied, the object distance about the target object collected from the photographing device is acquired, and the distance change information is corrected by using the object distance, so as to obtain accurate distance information of the target object.
  • the drone can help the drone to accurately track the target object, and avoid the problem of uncertainty in the distance information of the target object, resulting in the inability to accurately track the target object.
  • FIG. 6 is a schematic structural diagram of a mobile platform provided by an embodiment of the present invention.
  • the mobile platform may include a camera 601, a control device 602, and the like.
  • the photographing device 601 sends the collected image frames and adjacent image frames to the control device 602, and correspondingly, the control device 602 receives the image frames and adjacent image frames collected from the photographing device 601 , And perform feature extraction on the image frame to obtain the target object to be tracked.
  • the photographing device 601 may also send the collected image frames and the calculated object distance to the control device 602.
  • the control device 602 receives the image frame and the object distance from the photographing device 601, and performs Such as the above-mentioned related processing, so as to obtain more accurate distance information about the target object.
  • the mobile platform can track the target object more accurately, and can also assist the focusing operation of the camera 601.
  • the present invention performs information interaction between the information (image and object distance) collected by the camera 601 and the control device 602, so that the drone can initially obtain the distance change information of the target object according to the information from the camera.
  • the object distance of 601 is used to correct the distance change information, obtain accurate distance information of the target object, and help the drone to accurately track the target object.
  • FIG. 7 is a schematic diagram of a Gaussian imaging formula according to an embodiment of the present invention.
  • the principle diagram of the Gaussian imaging formula includes: a target object 701, a focusing lens 702, and an image sensor 703.
  • the Gaussian imaging formula is:
  • a is the object distance
  • b is the image distance
  • f is the focal length.
  • the principle of the Gaussian imaging formula is: the sum of the reciprocal of the object distance of the target object and the reciprocal of the image distance is equal to the reciprocal of the focal length.
  • control device may obtain the object distance based on the image distance and focal length of the imaging device when focusing on the target object, and based on a Gaussian imaging formula.
  • the parameters given by the Gaussian imaging formula can be adjusted according to the lens parameters, which is not limited in the embodiment of the present invention.
  • control device when the control device receives the image distance and focal length of the target object collected from the shooting device, it can also obtain the object distance between the target object and the shooting device based on the Gaussian imaging formula, so as to obtain the accuracy of the target object.
  • the distance information enables the drone to accurately track the target object.
  • FIG. 8 is a schematic structural diagram of a control device provided by an embodiment of the present invention.
  • the control device can be used to implement some or all of the steps in the method embodiment shown in FIG. 2 to FIG. 4, so
  • the control device may at least include a receiving module 801, a processing module 802, a correction module 803, and a control module 804, where:
  • the receiving module 801 is configured to: receive image frames and adjacent image frames collected from a photographing device;
  • the receiving module 801 is further configured to: receive the object distance obtained by the photographing device in the process of focusing control on the target object;
  • the processing module 802 is configured to: process the image frame and the adjacent image frame of the image frame to obtain the distance change information of the target object;
  • the processing module 802 is further configured to: determine the object distance of the target object according to the distance change information of the target object;
  • the correction module 803 is configured to correct the distance change information according to the object distance to obtain accurate distance information between the target object and the mobile platform.
  • control module 804 is configured to control the mobile platform to follow the target object to move according to the distance information.
  • control module 804 is configured to: control the photographing device to focus on the target object according to the distance information.
  • control module 804 is configured to: control the lens of the shooting device to perform a movement corresponding to the moving direction of the target object, so that the shooting device can focus on the target object;
  • the processing module 802 is configured to search for the target object in the currently acquired image frame based on the object distance.
  • the processing module 802 is configured to: if the target object is not found in the currently acquired image frame, acquire the historical imaging feature of the target object in the historical image frame acquired in history Information, the historical object distance of the target object corresponding to the historical image frame;
  • the target object is searched in the currently acquired image frame.
  • the processing module 802 is configured to: detect whether the imaging feature information of the target object in the plurality of image frames meets the imaging change condition;
  • the processing module 802 is configured to: if it is satisfied, control the focusing operation of the photographing device according to the distance change information.
  • the processing module 802 is configured to: compare the imaging size of the target object in the first image frame and the second image frame sequentially collected in the image;
  • the imaging size in the second image frame is greater than the imaging size in the first image frame, determining that the distance change information indicates that the distance between the target object and the mobile platform is reduced;
  • the imaging size in the second image frame is smaller than the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform has increased.
  • the processing module 802 is configured to obtain the object distance according to the image distance and the focal length of the imaging device when the target object is in focus, and based on a Gaussian imaging formula.
  • FIG. 9 is a schematic structural diagram of a control device provided by an embodiment of the present application.
  • the control device 900 in the embodiment of the present invention includes a storage device 901 and a processor 902.
  • the storage device 901 may include a volatile memory (volatile memory), such as random-access memory (RAM); the storage device 901 may also include a non-volatile memory (non-volatile memory), such as fast Flash memory (flash memory), solid-state drive (SSD), etc.; the storage device 901 may also include a combination of the foregoing types of memories.
  • volatile memory volatile memory
  • non-volatile memory such as fast Flash memory (flash memory), solid-state drive (SSD), etc.
  • flash memory flash memory
  • SSD solid-state drive
  • the processor 902 may be a central processing unit (CPU).
  • the processor 902 may further include a hardware chip.
  • the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), etc.
  • the above-mentioned PLD may be a field-programmable gate array (FPGA), a general array logic (generic array logic, GAL), and the like.
  • control device in the embodiment of the present invention can be used to implement the methods implemented in the embodiments of the present application shown in FIGS. 2 to 4 through the processor 902.
  • the embodiments of the present application are shown.
  • the embodiments of the present application shown in FIGS. 2 to 4 please refer to the embodiments of the present application shown in FIGS. 2 to 4 for specific implementation.
  • a program code is stored in the storage device 901, and the processor 902 calls the program code in the memory.
  • the processor 902 is configured to: determine according to the imaging characteristic information of the target object in the image The distance change information of the target object, wherein the image is collected by the shooting device; the target object is focused by the shooting device to obtain the object distance between the target object and the shooting device when the focus is in focus; the object distance is changed according to the object distance and distance Information to determine the distance between the target object and the mobile platform. Based on the distance information, control the mobile platform to follow the target object to move, and/or control the shooting device to focus on the target object based on the distance information.
  • the processor 902 is configured to: control the mobile platform to follow the target object to move according to the distance information.
  • the processor 902 is configured to: control the photographing device to focus on the target object according to the distance information.
  • the processor 902 is configured to: control the lens of the photographing device to perform a movement corresponding to the moving direction of the target object, so that the photographing device can focus on the target object; Obtain the object distance between the target object and the photographing device when the focus is achieved.
  • the processor 902 is configured to search for the target object in the currently acquired image frame based on the object distance.
  • the processor 902 is configured to: if the target object is not found in the currently acquired image frames, acquire the historical imaging of the target object in the historical image frames acquired in the past. Feature information, the historical object distance of the target object corresponding to the historical image frame; based on the historical object distance of the target object and the historical imaging feature information, in the currently collected image frame Search for the target object in.
  • the processor 902 is configured to: detect whether the imaging feature information of the target object in the plurality of image frames meets the imaging change condition; The object is focused, and the object distance between the target object and the photographing device when in focus is obtained.
  • the processor 902 is configured to: if it is satisfied, control the focusing operation of the photographing device according to the distance change information.
  • the processor 902 is configured to: compare the imaging size of the target object in the first image frame and the second image frame sequentially collected in the image; if the imaging size of the second image frame is If the size is larger than the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform is reduced; if the imaging size in the second image frame is smaller than the Based on the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform has increased.
  • the processor 902 is configured to obtain the object distance according to the image distance and the focal length of the imaging device when the target object is in focus, and based on a Gaussian imaging formula.
  • the control device provided in this embodiment can execute the method for obtaining the target distance mentioned in the foregoing embodiment through the processor 902, and the execution mode and beneficial effects are similar, and will not be repeated here.
  • the embodiment of the present invention also provides a mobile platform, which includes: a power component, a storage device, and a controller; the power component is used to drive the mobile platform to move; the power component may be, for example, a motor or an electronic regulator used in a rotary wing drone. Speed gear and other components. Or, the power component may be, for example, an automobile power system built around an engine in an unmanned car, or the like.
  • Program instructions are stored in the storage device
  • the controller calls the program instructions for determining the distance change information of the target object according to the imaging characteristic information of the target object in the image, and the image is collected by the shooting device;
  • the controller is used to control the mobile platform to follow the target object to move according to the distance information.
  • the controller is configured to: control the photographing device to focus on the target object according to the distance information.
  • the controller is used to: control the lens of the photographing device to perform a movement corresponding to the moving direction of the target object, so that the photographing device can focus on the target object; The object distance between the target object and the photographing device when in focus.
  • the controller is configured to search for the target object in the currently collected image frame based on the object distance.
  • the controller is configured to: if the target object is not found in the currently collected image frames, obtain historical imaging feature information of the target object in the historical image frames collected in the past , The historical object distance of the target object corresponding to the historical image frame;
  • the target object is searched in the currently acquired image frame.
  • the controller is configured to: detect whether the imaging feature information of the target object in the plurality of image frames meets the imaging change condition;
  • the controller is configured to: if it is satisfied, control the focusing operation of the photographing device according to the distance change information.
  • the controller is configured to: compare the imaging size of the target object in the first image frame and the second image frame sequentially collected in the image;
  • the imaging size in the second image frame is greater than the imaging size in the first image frame, determining that the distance change information indicates that the distance between the target object and the mobile platform is reduced;
  • the imaging size in the second image frame is smaller than the imaging size in the first image frame, it is determined that the distance change information indicates that the distance between the target object and the mobile platform has increased.
  • the controller is used to obtain the object distance according to the image distance and focal length of the imaging device when the target object is in focus, and based on a Gaussian imaging formula.
  • the mobile platform provided in this embodiment can execute the method for obtaining the target distance provided in the foregoing embodiment, and its execution mode and beneficial effects are similar, and will not be repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division, and there may be other divisions in actual implementation, for example, multiple modules or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or modules, and may be in electrical, mechanical or other forms.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, or in the form of hardware plus software functional modules.
  • the above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer readable storage medium.
  • the above-mentioned software function module is stored in a storage medium, and includes several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) execute the method described in the various embodiments of the present invention. Part of the steps.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other media that can store program code .

Landscapes

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

Abstract

一种获取目标距离的方法、控制装置及移动平台。其中,该方法具体包括:根据目标对象在影像中的成像特征信息,确定目标对象的距离变化信息;并检测目标对象的成像特征信息是否满足成像变化条件,若满足,则根据距离变化信息控制拍摄装置的对焦操作,若不满足,则通过拍摄装置对目标对象进行对焦,获取物距;然后根据物距和距离变化信息,得到目标对象的距离信息;利用所述距离信息对目标对象进行跟踪和对焦。通过利用拍摄装置采集得到物距和无人机得到的距离变化信息,可获得目标对象准确的距离信息,从而提升无人机跟踪目标对象的准确性。

Description

一种获取目标距离的方法、控制装置及移动平台 技术领域
本发明涉及计算机应用技术领域,尤其涉及一种获取目标距离的方法、控制装置及移动平台。
背景技术
随着科学技术的快速发展,如何选择合适的获取距离信息方案,实现对目标对象的检测、定位以及跟踪,有利于对目标对象的行为进行描述和理解。
当前,对目标对象进行跟踪所采用的一种简要方案包括:通过判断图像中目标对象的尺寸大小变化,确定目标对象是走近或走远。例如,当图像中的目标对象的尺寸变小时,可以认为该目标对象相对于摄像装置而言是远离该摄像装置,反之则是靠近该摄像装置。该方法可以实现对目标对象在远离或者靠近摄像装置方面进行快捷的判断。而如何相对而言更为准确地确定某个目标对象相对于摄像装置的距离成为研究的热点问题。
发明内容
本申请提供一种获取目标距离的方法、控制装置及移动平台,相对于仅基于图像尺寸确定用户运动方向而言,可较为准确地确定拍摄的对象与摄像装置的距离。
第一方面,本发明实施例提供了一种获取目标距离的方法,所述方法包括:
根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
第二方面,本发明实施例提供一种控制装置,所述控制装置包括:存储装 置和处理器;
所述存储装置用于存储程序指令;
所述处理器,可调用所述程序指令,用于
根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
第三方面,本发明实施例提供一种移动平台,所述移动平台包括:动力组件、存储装置和控制器;
所述动力组件用于带动所述移动平台移动;
所述存储装置中所述存储装置中存储有程序指令;
所述处理器,调用所述程序指令,用于
根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
第四方面,本发明实施例提供一种控制装置。该装置具有实现第一方面所述的获取目标距离的方法的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
在一种实现方式中,该控制装置可以包括:接收模块、处理模块、校正模块、控制模块。其中,接收模块用于接收来自拍摄装置的图像帧以及相邻图像帧;处理模块用于根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距; 根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息;并且所述控制装置可选地还可以包括控制模块,该控制模块用于控制移动平台跟随所述目标对象运动;所述控制模块,还可以用于控制拍摄装置对所述目标对象进行对焦,以使无人机获得所述目标对象与所述拍摄装置之间的物距。
通过实施本发明实施例,无人机可以结合目标对象在影像中的成像特征和拍摄装置在对焦时确定的物距,来综合确定出一个目标对象相对于拍摄装置等设备而言较为准确的距离信息,进而可以根据需要较好地确定要拍摄的目标对象是在远离摄像装置移动或者是靠近摄像装置移动,以便于后续较好地实现诸如对目标对象的跟踪等功能。
附图说明
为了更清楚地说明本发明实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种获取目标距离的系统的架构示意图;
图2是本发明实施例提供的一种获取目标距离的方法的流程示意图;
图3是本发明实施例提供的又一种获取目标距离的方法的流程示意图;
图4是本发明实施例提供的又一种获取目标距离的方法的流程示意图;
图5a是本发明实施例提供的一种对图像帧中的目标对象进行对焦的示意图;
图5b是本发明实施例提供的一种对图像帧的相邻图像帧中的目标对象进行对焦的示意图;
图6是本发明实施例提供的一种控制装置与拍摄装置交互的结构示意图;
图7本发明实施例提供的一种高斯成像公式的原理图;
图8是本发明实施例提供的一种控制装置的结构示意图;
图9是本发明实施例提供的一种控制装置的结构示意图。
具体实施方式
本发明实施例提供可以获取某个待拍摄的目标对象相较于摄像装置或者移动平台的目标距离的方案,在该方案中,拍摄装置可采集到周围环境的影像,在这些影像包括的图像帧中可以检测出至少一个需要跟踪的目标对象。拍摄装置可以根据需要将采集到的影像发送给移动平台。其中,摄像装置可以搭载在移动平台上。相应的,移动平台接收到影像之后,可以根据目标对象在影像中的成像特征信息,比如轮廓形状和成像尺寸,得到目标对象的距离变化信息,所述距离变化信息用于表示目标对象相对于拍摄装置或移动平台发生了靠近或者远离的距离变化。在确定距离变化信息之前或者同时或者之后,可以进一步结合拍摄装置在对目标对象进行对焦时计算得到的合焦时目标对象与拍摄装置之间的物距,得到目标对象与移动平台之间的距离信息。
在一个实施例中,移动平台得到距离变化信息之后,还可以检测该距离变化信息是否已经能够确定目标对象是靠近或远离摄像装置或移动平台;如果是,那么移动平台可以直接根据距离变化信息控制拍摄装置对目标对象进行对焦操作,并且可以同步进行摄像装置和/或移动平台的控制,实现对目标对象的跟踪等功能。如果移动平台根据该距离变化信息不能得到目标对象是靠近或远离摄像装置或移动平台,那么移动平台可以控制拍摄装置对目标对象进行对焦,并获取合焦时目标对象与拍摄装置之间的物距;并可以利用该物距对所述距离变化信息进行校正,从而得到目标对象的准确的距离信息,进而可以同时或者先后的控制移动平台跟随目标对象进行运动,以及控制拍摄装置对目标对象进行对焦操作。
可见,利用拍摄装置采集到的目标对象的物距,来对目标对象的距离变化信息进行辅助,可以获得目标对象准确的距离信息,从而较好地实现对目标对象的实时跟踪等功能,同时该方案没有额外增加硬件设备,可以减少资源浪费等。
需要说明的是,本申请实施例提及到的获取目标距离的方案可以应用于:无人机、自动驾驶汽车等移动平台,在这些移动平台上可以搭载摄像机、照相机、甚至手机等具备拍摄环境影像的摄像装置,基于拍摄的影像和摄像装置的对焦,测得相对准确的到目标对象的距离信息,从而实现目标对象的检测以及 跟踪等功能。本发明实施例以无人机对目标对象进行跟踪的场景为例进行说明,并不构成对本发明的限制。
请参见图1,是本发明实施例提供的一种用于获取距离的控制系统的架构示意图。在本发明实施例中,如图1所示,该系统主要包括:飞行器101、拍摄装置102等。在其他实施例中,所述飞行器101和拍摄装置102可以是一体的,也可以是分离式设计的。所述飞行器101中主要通过一个控制装置来与摄像装置102直接或间接相连,至少可以获取所述摄像装置102拍摄到的影像、所述摄像装置102在合焦后的相关参数,例如摄像装置102的焦距等参数或者是由摄像装置102直接计算得到的物距等参数。飞行器101通过控制装置来确定摄像装置亦或是飞行器到图1所示的待检测的人物(后续称之为目标对象103)之间的目标距离,在一个实施例中,所述控制装置至少是包括了处理器和存储装置。
如上述,所述控制装置可以设置在如图1所示的飞行器101中,即所述控制装置被配置在所述飞行器101内部,而所述拍摄装置安装在所述无人机上,并用于采集周围环境的影像,并将采集的影像发送给所述飞行器101,方便飞行器101中的控制装置进行相应的距离检测处理。控制装置基于影像可以得到目标对象的成像特征信息,并且根据目标对象的成像特征信息得到距离变化信息;除此之外,控制装置还可接收拍摄装置采集到的关于目标对象的物距,并基于物距和距离变化信息得到所述目标对象与移动平台或拍摄装置之间的距离信息。
在其他实施例中,所述控制装置还可以设置在摄像装置上,直接基于摄像装置采集到的影像和合焦确定的物距,来得到所述目标对象与摄像装置102或飞行器101之间的距离信息。此时,控制装置可以将得到的关于目标对象的距离信息发送给飞行器,以便于飞行器进行相应的飞行处理,比如向目标对象飞行、远离目标对象飞行。
在其他实施例中,所述控制装置还可以设置在用于对飞行器101进行控制的遥控器上,拍摄装置102通过无线传输将采集到的影像和目标对象的物距发送给遥控器中的控制装置,以使得控制装置可以基于目标对象的物距和距离变化信息得到目标对象的距离信息。然后控制装置再次通过无线将距离信息发送 给飞行器101,方便飞行器101跟随目标对象运动,以及控制拍摄装置102对目标对象进行对焦控制。
在其他实施例中,所述控制装置甚至可以为一个单独的设备,该单独的控制装置可以通过有限或者无线传输的方式接收来自拍摄装置采集到的影像和物距,并基于目标对象的物距和距离变化信息得到目标对象的距离信息。然后控制装置通过有限或者无线传输将目标对象的距离信息发送给飞行器101,以便于飞行器101对目标对象进行跟踪,以及控制拍摄装置102对目标对象进行对焦操作。
在一种实现方式中,控制装置通过拍摄装置102获得所述目标对象与所述移动平台或者拍摄装置之间的物距之后,还可以基于所述物距,在当前采集到的图像帧中搜索所述目标对象。若在当前采集的所述图像帧中未查找到所述目标对象,也就是说,无人机在当前并未检测到目标对象,那么获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,例如关于目标对象的历史轮廓形状和历史成像尺寸等历史成像特征,以及所述历史图像帧对应的所述目标对象的历史物距;并基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。具体的,在上述系统等架构的基础上,确定某个目标对象的距离信息的过程可参考下述关于图2所对应的实施例的描述。
请参见图2,是本发明实施例提供的一种获取目标距离的方法的流程示意图,如图所示本申请实施例中获取目标距离的方法可以通过上述实施例中提及的控制装置来实现,该方法具体可以包括如下步骤。
S201,根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息。在获取拍摄装置采集到的影像之后,可比较影像中依次采集到的诸如第一图像帧和第二图像帧中目标对象的成像特征信息,例如比较目标对象在第一图像帧和第二图像帧中的轮廓形状或成像尺寸等成像特征信息是否发生变化,根据该变化可以得到目标对象的距离变化信息。
在一种实现方式中,若第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定距离变化信息指示目标对象与移动平台之间的距离缩小,也就是说,目标对象在向靠近拍摄装置或者移动平台方向运动;若第二图像帧中 的成像尺寸小于第一图像帧中的成像尺寸,则确定距离变化信息指示目标对象与移动平台之间的距离增加,也就是说,目标对象在向远离拍摄装置或者移动平台方向运动。通过上述对目标对象在多个图像帧中的成像尺寸的比较,可以得到目标对象相对于移动平台或拍摄装置的移动方向,从而得到目标对象的距离变化信息。
在一种实现方式中,在接收到来自拍摄装置采集到的影像后,可以根据已经识别并存储的待跟踪的目标对象的图像特征,根据当前接收到的所述影像中与待跟踪目标对象的图像特征进行比较,从而确定所述影像中的目标对象。影像中目标对象的识别还可以使用其他的图像识别技术进行识别确定。
S202,通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。为了更为清晰地拍摄目标对象,拍摄装置可以自动地对目标对象进行对焦,以便于在合焦时能够获取到更为清晰的关于目标对象的影像。拍摄装置的对焦过程在此不再叙述。在一个实施例中,在得到目标对象相对于移动平台的移动方向(距离变化信息)之后,还可以根据所述距离变化信息控制拍摄装置对目标对象进行对焦操作,以使得目标对象能够清晰地成像,然后获取合焦时目标对象的物距。比如在基于距离变化信息确定目标对象在远离摄像装置移动时,可以向远处对焦,反之则向近处对焦。也就是说,距离变化信息可以起到一定的辅助作用,在距离变化信息能够准确地确定目标对象相对于摄像装置的距离变化的情况下,能够更好地辅助摄像装置对目标对象的对焦。
在一种实现方式中,所述距离变化信息包括所述目标对象相对于所述移动平台的移动方向;还可以控制所述拍摄装置的镜头执行与所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦,从而获取合焦时所述目标对象与所述拍摄装置之间的物距。
值得说明的是,相关技术中,在相机执行对焦操作过程中,需前后移动镜头,测试不同像点距离(镜头与传感器之间的距离)下,成像参数是否符合预设合焦条件。由于目标对象与拍摄装置之间的距离不可预测,需多次执行前后移动镜头的对焦操作,尝试找到合焦点。前后移动镜头的对焦操作导致对焦过程持续时间长,此外,对焦过程中成像质量不高,也会降低目标物追踪的准确 度。
而在上述实现方式中,可以通过向拍摄装置发送控制指令,该控制指令用于控制拍摄装置的镜头发生与目标对象运动方向相应的转动和前后移动,由于目标对象运动方向可以一定程度上预测目标对象与拍摄装置之间的距离变化,因而可以控制镜头单向移动测得合焦点。相较于相关技术中前后移动镜头的尝试性操作,上述实现方式能够使目标对象在图像帧中可以更快的合焦,形成清晰的成像。示例的,当目标对象相对拍摄装置或移动平台走远时,发送控制拍摄装置的镜头拉伸的指令,使得拍摄装置更快的对目标物进行对焦,找到合焦点。
在一种实现方式中,获得所述目标对象与所述拍摄装置之间的物距的具体实现方式可以为:获得拍摄装置在对所述目标对象进行合焦时的像距和焦距,再根据目标对象的像距和焦距,基于高斯成像公式(Gaussian imaging formula),计算得到所述目标对象的物距。其中,所述高斯成像公式可以为:
Figure PCTCN2019112383-appb-000001
其中,a为物距、b为像距、f为焦距。具体的,已知目标对象的像距b和焦距f,可以根据高斯成像公式计算得到物距a,然后基于物距a即可得到目标对象的距离信息,实现对目标对象的准确跟踪。
需要说明的是,在对目标对象进行跟踪的不同应用场景中,高斯成像公式所给出的参数是可以根据具体的摄像参数进行调节的,本发明实施例对此不作限定。
S203,根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。所述距离变化信息可以指示目标对象相对于所述移动平台的大致移动方向。在接收到来自拍摄装置的关于所述目标对象与所述拍摄装置之间在合焦时的物距后,可以利用该物距对所述距离变化信息进行校正,进而得到所述目标对象与所述移动平台之间更为准确的距离信息。在一个实施例中,得到的所述距离信息仍然可以理解为用来表示目标对象相对于拍摄装置或者移动平台之间距离变化的信息,只是该距离信息相对于提及的距离变化信息而言更为准确。
在本申请中,在获得目标对象与拍摄装置或者移动平台之间的距离变化信息之后或者同时,还可以计算目标对象与拍摄装置或者移动平台之间的物距,并基于目标对象与拍摄装置或移动平台之间的距离变化信息和物距得到距离信息,该距离信息指示目标对象与拍摄装置或者移动平台之间准确的距离,以便于无人机对目标对象实现准确跟踪。
再请参见图3,图3是本发明实施例提供的又一种获取目标距离的方法的流程示意图,如图所示本申请实施例中获取目标距离的方法可以通过上述实施例中提及的控制装置来实现,该方法具体可以包括如下步骤。
S301,根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息。
S302,通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
S303,根据所述物距和所述距离变化信息,确定目标对象与移动平台之间的距离信息。需要说明的是,步骤S301和步骤S302以及步骤S303的具体实现方式可参照图2中步骤S201和步骤S202以及步骤S203的描述,在此不作赘述。在步骤S303中得到了距离信息之后,可选地可以执行下述的步骤S304和S305,用于实现目标的跟踪和后续的比如下一帧图像帧的辅助对焦。
S304,根据所述距离信息控制所述移动平台跟随所述目标对象运动。已知目标对象的距离信息之后,可以基于该距离信息控制移动平台跟随目标对象运动的方向进行移动,所述距离信息可以指示所述目标对象相对于所述移动平台走近或者走远。
S305,根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。已知目标对象的准确的距离信息之后,还可以发送控制指令到拍摄装置,以使拍摄装置对发生运动后的目标对象进行对焦,使得目标对象可以在图像帧中清晰成像。
需要说明的是,步骤S304与步骤S305的执行顺序不分先后,也就是说,飞行器执行“基于该距离信息控制移动平台跟随目标对象运动的方向进行移动”和“根据距离信息控制拍摄装置对所述目标对象进行对焦”的过程,并不分先后顺序。可以理解为,可先基于该距离信息控制移动平台跟随目标对象运动的 方向进行移动,然后进行根据距离信息控制拍摄装置对所述目标对象进行对焦的过程。还可以进行根据距离信息控制拍摄装置对所述目标对象进行对焦的过程,然后基于该距离信息控制移动平台跟随目标对象运动的方向进行移动。或者,还可以同时进行基于该距离信息控制移动平台跟随目标对象运动的方向进行移动的过程和根据距离信息控制拍摄装置对所述目标对象进行对焦的过程,本发明实施例对此不作限定。
在本申请中,在得到目标对象与移动平台之间的距离变化信息之后,还可以获取来自拍摄装置的关于目标对象与拍摄装置之间的物距,并利用该物距对所述距离变化信息进行校正,获得目标对象准确的距离信息,方便移动平台根据该准确的距离信息对目标对象进行对焦和跟踪,从而实现对目标对象的准确跟踪。
请参见图4,图4是本发明实施例提供的又一种获取目标距离的方法的流程示意图,如图所示本申请实施例中获取目标距离的方法可以通过上述实施例中提及的控制装置来实现,该方法具体可以包括如下步骤。
S401,根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息。
S402,检测目标对象在多个图像帧中的成像特征信息是否满足成像变化条件。值得说明的是,根据目标对象的成像特征信息得到的距离变化信息,可能并不能准确反映目标对象的移动情况,比如目标对象突然蹲下,此时目标对象的成像尺寸发生较大的变化,但目标对象与拍摄装置或者移动平台之间的距离其实未发生变化,此时若根据得到的距离变化信息对目标对象进行跟踪,那么可能会出现丢失目标对象、跟错目标对象等不利情况,因此,本发明实施例选择将成像特征信息与成像变化条件进行比较以此来确定是否需要对距离变化信息进行补充修正。
在一种实现方式中,所述目标对象在多个图像帧中的成像特征信息满足成像变化条件可以为:第一方面、目标对象在当前图像帧中的轮廓形状,与目标对象在当前图像帧的相邻图像帧中的轮廓形状之间的相似度小于预设的相似度阈值,反之则不满足成像变化条件,当然,也可以认为小于或等于预设的相似度阈值认为是满足成像变化条件的;和/或,第二方面、目标对象在当前图 像帧中的成像尺寸,与目标对象在当前图像帧的相邻图像帧中的成像尺寸之间的差值小于预设的尺寸阈值,反之则不满足成像变化条件,当然,也可以认为小于或等于预设的尺寸阈值认为是满足成像变化条件的。或者说,还可以基于目标对象在图像中的像素变化的连续性来判断成像特征信息是否满足成像变化条件,如果不连续,则不满足成像变化条件,如果是连续变化的,则满足成像变化条件。
在一种实现方式中,所述拍摄装置在采集到当前图像帧时,可以先确定所述当前图像帧的相邻图像帧,并将所述当前图像帧与所述相邻图像帧进行对比。进一步,通过计算目标对象在当前图像帧中的像素点特征与所述目标对象在相邻图像帧中的像素点特征,进而得到所述目标对象在当前图像帧中的轮廓形状和在相邻图像帧中的轮廓形状。若所述目标对象在所述当前图像帧中的轮廓形状与所述目标对象在所述相邻图像帧中的轮廓形状之间的相似度小于(或者小于等于)预设的相似度阈值,则说明目标对象在当前图像帧和相邻图像帧中的像素点变化不具有连续性,也就是指,目标对象在当前图像帧中的轮廓形状与目标对象在相邻图像帧中的轮廓形状有较大的差别。
可选的,像素点特征可以包括目标对象成像的成像中心、像高或像素点数量等特征。成像中心可以用于表征成像的位置。像高或者像素点数量可以用来表征成像尺寸。以像素点数量为例,当前帧中确定的目标对象对应的像素点个数位1000个像素,而前一帧中确定的目标对象对应的像素点个数位20000个像素,表征像素个数发生了较大的跳变,则有可能是当前帧识别的目标对象发生错误。
以图5a和图5b为例进行说明,假设预设的相似度阈值为90%,其中,图5a为拍摄装置采集到的当前图像帧,图5b为拍摄装置采集到的所述当前图像帧的相邻图像帧,相邻图像帧例如可以是前一图像帧或者拍摄间隔时间为0.5秒的图像帧等,目标对象为当前图像帧中的人物对象。在图5a中,目标用户在正常站立,而在图5b中,目标用户跳了起来,导致目标用户在图像中的轮廓形状或者尺寸大小发生了变化,但实际并未走动。通过对图5a和图5b进行比较,可以知道该人物对象在图5a和图5b中的轮廓形状之间的有差异,可以假设该人物对象在图5a和图5b中的轮廓形状之间的相似度为80%,可知,80% 小于预设的相似度90%,所以确定目标对象在多个图像帧中的成像特征信息不满足成像变化条件。
需要说明的是,本发明实施例对所述预设的相似度阈值和预设的尺寸阈值不作限定。满足成像变化条件的情况下,认为目标对象确实是走远或者走进了,会执行下述的S403和S404,或者仅执行其中的一个步骤,在不满足成像变化条件的情况下,认为不确定目标对象是否走远或者走进了,此时会执行下述的S405至S408。
S403,根据距离变化信息控制移动平台跟随所述目标对象运动。也就是说,在已知目标对象的成像特征信息满足成像变化条件时,可根据目标对象的距离变化信息来控制移动平台跟随目标对象运动。
S404,根据距离变化信息控制拍摄装置对目标对象进行对焦。可以直接基于距离变化信息进行对焦,使得目标对象在图像帧中清晰的成像。
需要说明的是,步骤S403和步骤S404的执行顺序不分先后,S403和S404的具体实现可参照图3中的步骤S304和步骤S305的描述。
S405,通过拍摄装置对目标对象进行对焦,获取合焦时目标对象与拍摄装置之间的物距。在一种实现方式中,如果认为得到的目标对象的距离变化信息并不能真实反映目标对象的移动情况时,那么需要通过拍摄装置对所述目标对象进行对焦操作,获取合焦时所述目标对象与所述拍摄装置之间的物距,此时的对焦操作可以是基于常用的对焦方式进行的对焦。在一个实施例中,可以通过给所述拍摄装置发送对焦控制指令,以使所述拍摄装置对所述目标对象进行对焦,得到目标对象与所述拍摄装置之间的物距,并接收来自拍摄装置采集到的物距,所述物距反映了当前目标对象与所述拍摄装置之间的距离信息。
S406,根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
S407,根据所述距离信息控制所述移动平台跟随所述目标对象运动。
S408,根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
需要说明的是,S407和S408的执行顺序不分先后,或者仅执行S407,或仅执行S408,S407和S408的具体实现可参照图3中的步骤S304和步骤S305的描述。
其中,在本发明实施例中,一些步骤的具体实现可参考前述实施例中相关内容的描述,在此不赘述。
可见,在确定所述目标对象的距离变化信息之后,还可以检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像条件,若满足成像变化条件,那么可以根据所述距离变化信息直接控制所述拍摄装置的对焦操作,可以节省对目标对象的距离变化信息进行处理的时间,从而可提高对目标对象的跟踪速度。若不满成像条件,那么获取来自拍摄装置采集到的关于所述目标对象的物距,利用所述物距对所述距离变化信息进行校正,从而获得目标对象准确的距离信息。通过上述实施例,可以帮助无人机实现对目标对象的准确跟踪,避免因为目标对象的距离信息不确定问题,导致不能对目标对象进行准确跟踪。
请参见图6,图6是本发明实施例提供的一种移动平台的结构示意图。如图6所示,移动平台可以包括拍摄装置601、控制装置602等。
在一种实现方式中,拍摄装置601将采集到的图像帧和相邻图像帧发送给控制装置602,相应的,所述控制装置602接收来自拍摄装置601采集到的图像帧和相邻图像帧,并对图像帧进行特征提取,得到待跟踪的目标对象。
在一种实现方式中,拍摄装置601还可以将采集到图像帧与计算得到的物距发送给控制装置602,相应的,所述控制装置602接收来自拍摄装置601的图像帧和物距,进行诸如上述的相关处理,从而得到关于目标对象更为准确的距离信息。以便于移动平台能够更为准确地跟踪目标对象,并且还可以辅助拍摄装置601的对焦操作。本发明通过将拍摄装置601采集到的信息(影像和物距),与控制装置602之间进行信息交互,可以使得无人机在初步得到目标对象的距离变化信息的情况下,根据来自拍摄装置601的物距,对所述距离变化信息进行校正,获取目标对象准确的距离信息,帮助无人机实现准确跟踪目标对象。
请参见图7,图7是本发明实施例提供的一种高斯成像公式(Gaussian imaging formula)的原理图。在该高斯成像公式的原理图中包括:目标对象701、对焦镜头702、图像传感器703。高斯成像公式为:
Figure PCTCN2019112383-appb-000002
其中,a为物距、b为像距、f为焦距。也就是说,高斯成像公式的原理为:目标对象的物距的倒数与像距的倒数之和等于焦距的倒数。
具体的,控制装置可以基于所述拍摄装置在对所述目标对象合焦时的像距和焦距,并基于高斯成像公式,得到所述物距。
需要说明的是,无人机在对目标对象进行跟踪的不同应用场景中,高斯成像公式的所给出的参数是可以根据透镜参数进行调节的,本发明实施例对此不作限定。
可见,控制装置接收来自拍摄装置采集到的关于目标对象的像距和焦距的情况下,还可以基于高斯成像公式得到目标对象与所述拍摄装置之间的物距,从而得到关于目标对象的准确的距离信息,使得无人机能够准确的跟踪目标对象。
请参见图8,图8是本发明实施例提供的一种控制装置的结构示意图,所述控制装置可以用于实施结合图2~图4所示的方法实施例中的部分或全部步骤,所述控制装置至少可以包括接收模块801、处理模块802、校正模块803以及控制模块804,其中:
接收模块801用于:接收来自拍摄装置采集到的图像帧和相邻图像帧;
接收模块801还用于:接收拍摄装置在对目标对象进行对焦控制过程中得到的物距;
处理模块802用于:对图像帧和图像帧的相邻图像帧进行处理,得到目标对象的距离变化信息;
处理模块802还用于:根据目标对象的距离变化信息,确定目标对象的物距;
校正模块803用于:根据所述物距对所述距离变化信息进行校正,得到关于所述目标对象与所述移动平台之间准确的距离信息。
在一种实现方式中,控制模块804用于:根据所述距离信息控制所述移动平台跟随所述目标对象运动。
在一种实现方式中,控制模块804用于:根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
在一种实现方式中,控制模块804用于:控制所述拍摄装置的镜头执行与 所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦;
获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,处理模块802用于:基于所述物距,在当前采集到的图像帧中搜索所述目标对象。
在一种实现方式中,处理模块802用于:若在当前采集到的所述图像帧中未查找到所述目标对象,则获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,和所述历史图像帧对应的所述目标对象的历史物距;
基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。
在一种实现方式中,处理模块802用于:检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像变化条件;
若不满足,则执行通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,处理模块802用于:若满足,则根据所述距离变化信息控制所述拍摄装置的对焦操作。
在一种实现方式中,处理模块802用于:比较所述影像中依次采集到的第一图像帧和第二图像帧中所述目标对象的成像尺寸;
若所述第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离缩小;
若所述第二图像帧中的成像尺寸小于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离增加。
在一种实现方式中,处理模块802用于:根据所述拍摄装置在对所述目标对象合焦时的像距和焦距,并基于高斯成像公式,得到的所述物距。
需要说明的是,图8对应的实施例中未提及的内容以及各个模块执行步骤的具体实现方式可参见图2~图4所示实施例以及前述内容,这里不作赘述。
请参见图9,图9是本申请实施例提供的一种控制装置的结构示意图,本发明实施例的所述控制装置900包括:存储装置901和处理器902。所述存储装置901可以包括易失性存储器(volatile memory),例如随机存取存储器 (random-access memory,RAM);存储装置901也可以包括非易失性存储器(non-volatile memory),例如快闪存储器(flash memory),固态硬盘(solid-state drive,SSD)等;存储装置901还可以包括上述种类的存储器的组合。
所述处理器902可以是中央处理器(central processing unit,CPU)。所述处理器902还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)等。上述PLD可以是现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)等。
本发明实施例的所述控制装置通过所述处理器902可以用于实施上述图2~图4所示的本申请各实施例实现的方法,为了便于说明,仅示出了与本申请实施例相关的部分,具体实现请参照图2~图4所示的本申请各实施例。
在一个实施例中,存储装置901中存储有程序代码,处理器902调用存储器中的程序代码,当程序代码被执行时,处理器902用于:根据目标对象在影像中的成像特征信息,确定目标对象的距离变化信息,其中,所述影像由所述拍摄装置采集得到;通过拍摄装置对目标对象进行对焦,获取合焦时目标对象与拍摄装置之间的物距;根据物距和距离变化信息,确定目标对象与移动平台之间的距离信息。基于所述距离信息,控制所述移动平台跟随所述目标对象运动,和/或,基于所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
在一种实现方式中,处理器902用于:根据所述距离信息控制所述移动平台跟随所述目标对象运动。
在一种实现方式中,处理器902用于:根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
在一种实现方式中,处理器902用于:控制所述拍摄装置的镜头执行与所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦;获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,处理器902用于:基于所述物距,在当前采集到的图像帧中搜索所述目标对象。
在一种实现方式中,处理器902用于:若在当前采集到的所述图像帧中的 未查找到所述目标对象,则获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,和所述历史图像帧对应的所述目标对象的历史物距;基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。
在一种实现方式中,处理器902用于:检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像变化条件;若不满足,则通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,处理器902用于:若满足,则根据所述距离变化信息控制所述拍摄装置的对焦操作。
在一种实现方式中,处理器902用于:比较所述影像中依次采集到的第一图像帧和第二图像帧中所述目标对象的成像尺寸;若所述第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离缩小;若所述第二图像帧中的成像尺寸小于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离增加。
在一种实现方式中,处理器902用于:根据所述拍摄装置在对所述目标对象合焦时的像距和焦距,并基于高斯成像公式,得到的所述物距。
本实施例提供的控制装置通过所述处理器902能够执行前述实施例提及的获取目标距离的方法,其执行方式和有益效果类似,在这里不再赘述。
本发明实施例还提供一种移动平台,该移动平台包括:动力组件、存储装置和控制器;动力组件用于带动移动平台移动;该动力组件例如可以是旋翼无人机所使用电机、电子调速器等部件构成。或者,该动力组件例如可以是无人驾驶汽车中的围绕发动机构建的汽车动力系统等等。
所述存储装置中存储有程序指令;
所述控制器,调用所述程序指令,用于根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
在一种实现方式中,控制器用于:根据所述距离信息控制所述移动平台跟随所述目标对象运动。
在一种实现方式中,控制器用于:根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
在一种实现方式中,控制器用于:控制所述拍摄装置的镜头执行与所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦;获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,控制器用于:基于所述物距,在当前采集到的图像帧中搜索所述目标对象。
在一种实现方式中,控制器用于:若在当前采集到的所述图像帧中的未查找到所述目标对象,则获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,和所述历史图像帧对应的所述目标对象的历史物距;
基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。
在一种实现方式中,控制器用于:检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像变化条件;
若不满足,则通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
在一种实现方式中,控制器用于:若满足,则根据所述距离变化信息控制所述拍摄装置的对焦操作。
在一种实现方式中,控制器用于:比较所述影像中依次采集到的第一图像帧和第二图像帧中所述目标对象的成像尺寸;
若所述第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离缩小;
若所述第二图像帧中的成像尺寸小于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离增加。
在一种实现方式中,控制器用于:根据所述拍摄装置在对所述目标对象合 焦时的像距和焦距,并基于高斯成像公式,得到的所述物距。
本实施例提供的移动平台能够执行前述实施例提供的获取目标距离的方法,其执行方式和有益效果类似,在这里不再赘述。
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机装置(可以是个人计算机,服务器,或者网络装置等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述 方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (23)

  1. 一种获取目标距离的方法,其特征在于,移动平台搭载拍摄装置,包括:
    根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
    通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
    根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    根据所述距离信息控制所述移动平台跟随所述目标对象运动。
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:
    根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
  4. 如权利要求1所述的方法,其特征在于,所述距离变化信息包括所述目标对象相对于所述移动平台的移动方向;
    所述通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距,包括:
    控制所述拍摄装置的镜头执行与所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦;
    获取合焦时所述目标对象与所述拍摄装置之间的物距。
  5. 如权利要求1所述的方法,其特征在于,所述影像包括图像帧,所述方法还包括:
    基于所述物距,在当前采集到的图像帧中搜索所述目标对象。
  6. 如权利要求5所述的方法,其特征在于,所述方法还包括:
    若在当前采集到的所述图像帧中未查找到所述目标对象,则获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,和所述历史图像帧对应的所述目标对象的历史物距;
    基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距之前,还包括:
    检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像变化条件;
    若不满足,则执行通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
  8. 如权利要求7所述的方法,其特征在于,所述方法还包括:
    若满足,则根据所述距离变化信息控制所述拍摄装置的对焦操作。
  9. 如权利要求7所述的方法,其特征在于,所述成像特征信息包括所述目标对象成像的轮廓形状和/或成像尺寸。
  10. 如权利要求9所述的方法,其特征在于,所述成像变化条件包括:
    相邻的图像帧中所述轮廓形状相似度小于预设的相似度阈值;和/或
    相邻的图像帧中所述成像尺寸的差值小于预设的尺寸阈值。
  11. 如权利要求1-10任一项所述的方法,其特征在于,所述成像特征信息包括所述目标对象的成像尺寸;
    根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,包括:
    比较所述影像中依次采集到的第一图像帧和第二图像帧中所述目标对象的成像尺寸;
    若所述第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离缩小;
    若所述第二图像帧中的成像尺寸小于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离增加。
  12. 如权利要求1-11任一项所述的方法,其特征在于,所述通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述镜头之间的物距,包括:
    根据所述拍摄装置在对所述目标对象合焦时的像距和焦距,并基于高斯成像公式,得到的所述物距。
  13. 一种控制装置,其特征在于,所述控制装置包括:存储装置和处理器;
    所述存储装置中存储有程序指令;
    所述处理器,调用所述程序指令,用于
    根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
    通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
    根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
  14. 如权利要求13所述的控制装置,其特征在于,所述处理器,还用于
    根据所述距离信息控制所述移动平台跟随所述目标对象运动。
  15. 如权利要求13或14所述的控制装置,其特征在于,所述处理器,还用于
    根据所述距离信息控制所述拍摄装置对所述目标对象进行对焦。
  16. 如权利要求13所述的控制装置,其特征在于,所述处理器,还用于控制所述拍摄装置的镜头执行与所述目标对象的所述移动方向相应的运动,以便于所述拍摄装置对所述目标对象进行合焦;
    获取合焦时所述目标对象与所述拍摄装置之间的物距。
  17. 如权利要求13所述的控制装置,其特征在于,所述处理器,还用于
    基于所述物距,在当前采集到的图像帧中搜索所述目标对象。
  18. 如权利要求17所述的控制装置,其特征在于,所述处理器,还用于若在当前采集到的所述图像帧中的未查找到所述目标对象,则获取历史采集到的历史图像帧中所述目标对象的历史成像特征信息,和所述历史图像帧对应的所述目标对象的历史物距;
    基于所述目标对象的所述历史物距和所述历史成像特征信息,在所述当前采集到的所述图像帧中搜索所述目标对象。
  19. 如权利要求13-18所述的控制装置,其特征在于,所述处理器,还用于
    检测所述目标对象在多个所述图像帧中的成像特征信息是否满足成像变化条件;
    若不满足,则通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距。
  20. 如权利要求19所述的控制装置,其特征在于,所述处理器,还用于若满足,则根据所述距离变化信息控制所述拍摄装置的对焦操作。
  21. 如权利要求13-20所述的控制装置,其特征在于,所述处理器,还用于
    比较所述影像中依次采集到的第一图像帧和第二图像帧中所述目标对象 的成像尺寸;
    若所述第二图像帧中的成像尺寸大于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离缩小;
    若所述第二图像帧中的成像尺寸小于所述第一图像帧中的成像尺寸,则确定所述距离变化信息指示所述目标对象与所述移动平台之间的距离增加。
  22. 如权利要求13-20所述的控制装置,其特征在于,所述处理器,还用于
    根据所述拍摄装置在对所述目标对象合焦时的像距和焦距,并基于高斯成像公式,得到的所述物距。
  23. 一种移动平台,其特征在于,所述移动平台包括:动力组件、存储装置和控制器;
    所述动力组件用于带动所述移动平台移动;
    所述存储装置中所述存储装置中存储有程序指令;
    所述控制器,调用所述程序指令,用于
    根据目标对象在影像中的成像特征信息,确定所述目标对象的距离变化信息,所述影像由所述拍摄装置采集得到;
    通过所述拍摄装置对所述目标对象进行对焦,获取合焦时所述目标对象与所述拍摄装置之间的物距;
    根据所述物距和所述距离变化信息,确定所述目标对象与所述移动平台之间的距离信息。
PCT/CN2019/112383 2019-10-21 2019-10-21 一种获取目标距离的方法、控制装置及移动平台 WO2021077270A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/112383 WO2021077270A1 (zh) 2019-10-21 2019-10-21 一种获取目标距离的方法、控制装置及移动平台
CN201980030589.0A CN112136312A (zh) 2019-10-21 2019-10-21 一种获取目标距离的方法、控制装置及移动平台

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/112383 WO2021077270A1 (zh) 2019-10-21 2019-10-21 一种获取目标距离的方法、控制装置及移动平台

Publications (1)

Publication Number Publication Date
WO2021077270A1 true WO2021077270A1 (zh) 2021-04-29

Family

ID=73849555

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/112383 WO2021077270A1 (zh) 2019-10-21 2019-10-21 一种获取目标距离的方法、控制装置及移动平台

Country Status (2)

Country Link
CN (1) CN112136312A (zh)
WO (1) WO2021077270A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347335A (zh) * 2021-05-31 2021-09-03 浙江大华技术股份有限公司 一种聚焦方法、装置、电子设备及存储介质
CN113391644A (zh) * 2021-06-11 2021-09-14 中新国际联合研究院 一种基于图像信息熵的无人机拍摄距离半自动寻优方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104215216A (zh) * 2014-08-21 2014-12-17 深圳市金立通信设备有限公司 一种测距装置及终端
CN105512643A (zh) * 2016-01-06 2016-04-20 北京二郎神科技有限公司 一种图像采集方法和装置
CN108180909A (zh) * 2017-12-22 2018-06-19 北京三快在线科技有限公司 相对位置确定方法、装置及电子设备
CN109479088A (zh) * 2017-06-02 2019-03-15 深圳市大疆创新科技有限公司 基于深度机器学习和激光雷达进行多目标跟踪和自动聚焦的系统和方法

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4571617B2 (ja) * 2006-12-28 2010-10-27 三星デジタルイメージング株式会社 撮像装置及び撮像方法
JP4661964B2 (ja) * 2009-02-09 2011-03-30 カシオ計算機株式会社 撮像装置、及び、プログラム
US9823352B2 (en) * 2014-10-31 2017-11-21 Rockwell Automation Safety Ag Absolute distance measurement for time-of-flight sensors
CN105716569A (zh) * 2014-12-01 2016-06-29 深圳富泰宏精密工业有限公司 距离检测方法及系统
CN104469167B (zh) * 2014-12-26 2017-10-13 小米科技有限责任公司 自动对焦方法及装置
CN104683693A (zh) * 2015-02-10 2015-06-03 深圳市金立通信设备有限公司 一种自动聚焦的方法
CN104994280B (zh) * 2015-06-30 2017-11-07 广东欧珀移动通信有限公司 一种预览图像处理方法及用户终端
CN105227833A (zh) * 2015-09-09 2016-01-06 华勤通讯技术有限公司 连续对焦方法及装置
US10182414B2 (en) * 2015-12-04 2019-01-15 Board Of Regents, The University Of Texas System Accurately tracking a mobile device to effectively enable mobile device to control another device
CN105744163B (zh) * 2016-02-23 2019-01-25 湖南拓视觉信息技术有限公司 一种基于深度信息跟踪对焦的摄像机及摄像方法
WO2019061079A1 (zh) * 2017-09-27 2019-04-04 深圳市大疆创新科技有限公司 一种对焦处理方法及设备
CN110045562B (zh) * 2019-04-18 2020-04-28 重庆紫光华山智安科技有限公司 变焦过程中同步对焦方法、装置、存储介质及电子终端
CN110113528B (zh) * 2019-04-26 2021-05-07 维沃移动通信有限公司 一种参数获取方法及终端设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104215216A (zh) * 2014-08-21 2014-12-17 深圳市金立通信设备有限公司 一种测距装置及终端
CN105512643A (zh) * 2016-01-06 2016-04-20 北京二郎神科技有限公司 一种图像采集方法和装置
CN109479088A (zh) * 2017-06-02 2019-03-15 深圳市大疆创新科技有限公司 基于深度机器学习和激光雷达进行多目标跟踪和自动聚焦的系统和方法
CN108180909A (zh) * 2017-12-22 2018-06-19 北京三快在线科技有限公司 相对位置确定方法、装置及电子设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347335A (zh) * 2021-05-31 2021-09-03 浙江大华技术股份有限公司 一种聚焦方法、装置、电子设备及存储介质
CN113347335B (zh) * 2021-05-31 2022-08-30 浙江大华技术股份有限公司 一种聚焦方法、装置、电子设备及存储介质
CN113391644A (zh) * 2021-06-11 2021-09-14 中新国际联合研究院 一种基于图像信息熵的无人机拍摄距离半自动寻优方法
CN113391644B (zh) * 2021-06-11 2022-06-17 中新国际联合研究院 一种基于图像信息熵的无人机拍摄距离半自动寻优方法

Also Published As

Publication number Publication date
CN112136312A (zh) 2020-12-25

Similar Documents

Publication Publication Date Title
US20190392199A1 (en) Face location tracking method, apparatus, and electronic device
CN110248097B (zh) 追焦方法、装置、终端设备、计算机可读存储介质
JP2018508078A (ja) オブジェクト追跡のためのシステムおよび方法
TW202008276A (zh) 檢測方法及裝置、電腦設備及儲存媒體
WO2017161523A1 (zh) 一种终端的拍照对焦方法、装置及设备
CN107087107A (zh) 基于双摄像头的图像处理装置及方法
US20140300746A1 (en) Image analysis method, camera apparatus, control apparatus, control method and storage medium
CN111222395A (zh) 目标检测方法、装置与电子设备
CN113837079B (zh) 显微镜的自动对焦方法、装置、计算机设备和存储介质
CN105629628A (zh) 自动对焦方法及装置
WO2021077270A1 (zh) 一种获取目标距离的方法、控制装置及移动平台
US20210004978A1 (en) Method for acquiring depth information of target object and movable platform
CN112352417B (zh) 拍摄设备的对焦方法、拍摄设备、系统及存储介质
CN116469079A (zh) 一种自动驾驶bev任务学习方法及相关装置
US11866056B2 (en) Ballistic estimation of vehicle data
CN114697528A (zh) 图像处理器、电子设备及对焦控制方法
KR20200076628A (ko) 모바일 디바이스의 위치 측정 방법, 위치 측정 장치 및 전자 디바이스
CN116105721A (zh) 地图构建的回环优化方法、装置、设备及存储介质
CN106375671B (zh) 控制方法、控制装置和电子装置
CN115703234B (zh) 机器人控制方法、装置、机器人及存储介质
Saetchnikov et al. Robust SY-biLSTM object tracking method for on-road objects shoot from an unmanned aerial vehicle
CN115144843A (zh) 一种物体位置的融合方法及装置
WO2021189429A1 (zh) 图像拍摄方法、装置、可移动平台和存储介质
CN112053401B (zh) 一种芯片拼接方法、装置、设备及存储介质
CN114845050A (zh) 一种对焦方法、摄像装置、无人机和存储介质

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: 19949952

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: 19949952

Country of ref document: EP

Kind code of ref document: A1