[go: up one dir, main page]

CN111506082A - A system and method for automatically following and shooting obstacle avoidance - Google Patents

A system and method for automatically following and shooting obstacle avoidance Download PDF

Info

Publication number
CN111506082A
CN111506082A CN202010416418.6A CN202010416418A CN111506082A CN 111506082 A CN111506082 A CN 111506082A CN 202010416418 A CN202010416418 A CN 202010416418A CN 111506082 A CN111506082 A CN 111506082A
Authority
CN
China
Prior art keywords
dis
distance
obstacle avoidance
camera
following
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
CN202010416418.6A
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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202010416418.6A priority Critical patent/CN111506082A/en
Publication of CN111506082A publication Critical patent/CN111506082A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0255Control of position or course in two dimensions specially adapted to land vehicles using acoustic signals, e.g. ultra-sonic singals
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/0094Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots involving pointing a payload, e.g. camera, weapon, sensor, towards a fixed or moving target
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/57Mechanical or electrical details of cameras or camera modules specially adapted for being embedded in other devices
    • 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/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Acoustics & Sound (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明公开了一种自动跟随拍摄避障系统及方法,系统中摄像头架设在三轴云台上,摄像头对跟随目标进行图像或视频拍摄,对图像做处理后得到跟随目标与三轴云台的距离;第一超声波测距模块设置在三轴云台的航向轴上,第一超声波测距模块随三轴云台的航向轴移动,并始终正对跟随目标,测量跟随目标与三轴云台的距离;云台相机放置于拍摄移动装置上,电机控制智能小车前进与后退;舵机控制智能小车的转向;第二超声波测距模块设置在智能小车的前端,测量障碍物与智能小车的距离。本发明通过采样所得跟随距离、避障事件、App发送的控制指令,联合控制装载AI摄像头的拍摄移动装置停止移动,确保系统实现稳定可靠的避障及停车功能。

Figure 202010416418

The invention discloses an automatic following shooting obstacle avoidance system and method. In the system, a camera is set up on a three-axis PTZ, the camera shoots images or videos of a following target, and after the images are processed, a relationship between the following target and the three-axis PTZ is obtained. Distance; the first ultrasonic ranging module is set on the heading axis of the three-axis gimbal, the first ultrasonic ranging module moves with the heading axis of the three-axis gimbal, and always faces the following target, and measures the following target and the three-axis gimbal The gimbal camera is placed on the shooting mobile device, and the motor controls the forward and backward of the smart car; the steering gear controls the steering of the smart car; the second ultrasonic ranging module is set at the front end of the smart car to measure the distance between the obstacle and the smart car . The invention jointly controls the shooting mobile device loaded with the AI camera to stop moving through the sampling obtained following distance, obstacle avoidance events, and control instructions sent by the App, so as to ensure that the system realizes stable and reliable obstacle avoidance and parking functions.

Figure 202010416418

Description

一种自动跟随拍摄避障系统及方法A system and method for automatically following and shooting obstacle avoidance

技术领域technical field

本发明属于人工智能领域,涉及一种自动跟随拍摄避障系统及方法。The invention belongs to the field of artificial intelligence, and relates to an automatic follow-up shooting obstacle avoidance system and method.

背景技术Background technique

随着智能设备的大众化,消费用户对各类智能电子设备的使用强度与热度越来越高,其中,拍照以及视频录制是当下智能设备中热门的功能,且消费者的使用频率属最高。With the popularization of smart devices, consumer users are increasingly using various smart electronic devices with increasing intensity and popularity. Among them, photography and video recording are the most popular functions in current smart devices, and consumers use them most frequently.

现有技术中,人们在创造目标更加灵动、场景切换更灵活的视频素材时,采用的方式无外乎是人工跟拍,即采用遥控无人机航拍或者是手持相机加稳定器跟拍,然而手持稳定器跟拍需要拍摄者投入较大的精力去跟随,包括稳定相机,费神费力;而航拍的追踪强度不够,对于针对式的视频拍摄功能不够强大,且续航能力较差,且这两种跟拍方式都需要两个甚至更多的跟拍者,不符合全智能化自动化的初衷。自动跟随拍摄可以有效的解决上述方法中的不足,而在自动跟随拍摄过程中通过AI视觉测距算法测量到的距离,在近距离时误差较大,当障碍物或者目标过近时,不足以达到理想的避障效果,可能导致设备与跟随目标或者障碍物发生碰撞。带有云台的自动跟随拍摄系统在与不同的移动载体连接时,面对不同的电机,需保证安全可靠的实现停车功能。带有App控制的自动跟随拍摄系统涉及多种跟随控制模式,需在不同模式下保证可靠有效的避障及停车功能。In the prior art, when people create video material with more flexible targets and more flexible scene switching, the method used is nothing more than manual follow-up photography, that is, aerial photography with remote control drones or hand-held cameras and stabilizers. The hand-held stabilizer requires the photographer to put a lot of energy to follow, including stabilizing the camera, which is laborious and laborious; while the tracking intensity of aerial photography is not enough, the function for targeted video shooting is not strong enough, and the battery life is poor. The follow-up method requires two or more followers, which is not in line with the original intention of fully intelligent automation. Automatic follow-up shooting can effectively solve the shortcomings of the above methods, but the distance measured by the AI visual ranging algorithm during the automatic follow-up shooting process has a large error at close range, and when the obstacle or target is too close, it is not enough. Achieving the ideal obstacle avoidance effect may cause the device to collide with the following target or obstacles. When the automatic follow-up shooting system with the gimbal is connected with different mobile carriers, facing different motors, it is necessary to ensure the safe and reliable realization of the parking function. The automatic follow-up shooting system with App control involves a variety of follow-up control modes, and it is necessary to ensure reliable and effective obstacle avoidance and parking functions in different modes.

发明内容SUMMARY OF THE INVENTION

为解决上述问题,本发明的目的在于提供一种自动跟随拍摄避障系统,包括云台相机和拍摄移动装置,其中,In order to solve the above problems, the purpose of the present invention is to provide an automatic follow-up shooting obstacle avoidance system, including a pan-tilt camera and a shooting mobile device, wherein,

所述云台相机包括三轴云台、摄像头和第一超声波测距模块,所述摄像头架设在三轴云台上,摄像头对跟随目标进行图像或视频拍摄;所述第一超声波测距模块设置在三轴云台的航向轴上,第一超声波测距模块随三轴云台的航向轴移动,并始终正对跟随目标,测量跟随目标与三轴云台的距离;The pan-tilt camera includes a three-axis pan-tilt, a camera and a first ultrasonic ranging module, the camera is erected on the three-axis pan-tilt, and the camera shoots images or videos of the following target; the first ultrasonic ranging module is set On the heading axis of the three-axis gimbal, the first ultrasonic ranging module moves with the heading axis of the three-axis gimbal, and always faces the following target, and measures the distance between the following target and the three-axis gimbal;

所述云台相机放置于所述拍摄移动装置上,拍摄移动装置包括电机、舵机、智能小车和第二超声波测距模块,所述电机控制智能小车前进与后退;所述舵机控制智能小车的转向;所述第二超声波测距模块设置在智能小车的前端,测量障碍物与智能小车的距离。The pan-tilt camera is placed on the photographing mobile device. The photographing mobile device includes a motor, a steering gear, an intelligent car and a second ultrasonic ranging module. The motor controls the intelligent car to move forward and backward; the steering gear controls the intelligent car. The second ultrasonic ranging module is arranged at the front end of the smart car to measure the distance between the obstacle and the smart car.

优选地,所述智能小车的底盘上设置有悬挂式避震结构。Preferably, a suspension type shock-absorbing structure is provided on the chassis of the smart car.

优选地,所述电机为高速无刷直流式。Preferably, the motor is a high-speed brushless DC type.

优选地,还包括控制器,所述控制器包括基于ARM-M3/M4内核架构的MCU。Preferably, a controller is also included, and the controller includes an MCU based on the ARM-M3/M4 core architecture.

优选地,所述控制器为STM32系列或GD32系列微控制芯片。Preferably, the controller is an STM32 series or GD32 series microcontroller chip.

优选地,所述摄像头测距基于单目测距算法。Preferably, the camera ranging is based on a monocular ranging algorithm.

基于上述目的,本发明还提供了一种自动跟随拍摄避障方法,采用上述系统,包括以下步骤:Based on the above purpose, the present invention also provides a method for automatically following and shooting obstacles, using the above system, including the following steps:

S10,系统启动,获取即时跟随距离,设置预设跟随距离dis_follow发送给云台相机;S10, the system starts, obtains the instant follow distance, sets the preset follow distance dis_follow and sends it to the PTZ camera;

S20,超声波测距,判断是否需要避障;S20, ultrasonic ranging, to determine whether obstacle avoidance is required;

S21,是,则置位避障标志;S21, yes, set the obstacle avoidance flag;

S30,否,则根据云台相机测距判断系统距离dis_sys选择超声波测距还是云台相机测距;S30, if no, judge the system distance dis_sys according to the gimbal camera ranging to select ultrasonic ranging or gimbal camera ranging;

S40,判断系统距离dis_sys是否小于停车距离;S40, determine whether the system distance dis_sys is less than the parking distance;

S41,是,则置位速度置零标志;S41, yes, set the speed zero setting flag;

S50,否,则慢速跟随目标,返回S20;S50, otherwise, follow the target slowly and return to S20;

其中,置位避障标志或置位速度置零标志后,停止电机运行,停止智能小车。在S50中,慢速跟随目标之前,系统距离采用摄像头测距时,则自动变速跟随;否则,即系统距离采用超声波测距时,慢速跟随。Among them, after setting the obstacle avoidance sign or setting the speed zero sign, stop the motor running and stop the smart car. In S50, before following the target at a slow speed, when the system distance is measured by a camera, it will automatically follow at a variable speed; otherwise, when the system distance is measured by ultrasonic distance, it will follow at a slow speed.

优选地,所述超声波测距,判断是否需要避障,包括令避障距离dis_obstacle,第一超声波测距模块测得距离dis_us1,第二超声波测距模块测得距离dis_us2,当dis_us1<dis_obstacle或者dis_us2<dis_obstacle时,为需要避障。Preferably, the ultrasonic ranging, judging whether obstacle avoidance is required, includes making the obstacle avoidance distance dis_obstacle, the distance dis_us1 measured by the first ultrasonic ranging module, and the distance dis_us2 measured by the second ultrasonic ranging module, when dis_us1 < dis_obstacle or dis_us2 When <dis_obstacle, obstacle avoidance is required.

优选地,所述根据云台相机测距判断系统距离dis_sys选择超声波测距还是云台相机测距,为令系统采样跟随距离的切换值dis_cam_us1,云台相机测得距离dis_cam,当dis_cam≤dis_cam_us1时,系统距离dis_sys=dis_us1,否则dis_sys=dis_cam。Preferably, the judging system distance dis_sys according to the gimbal camera ranging to select ultrasonic ranging or gimbal camera ranging is to make the system sample the switching value of the following distance dis_cam_us1, and the gimbal camera measures the distance dis_cam, when dis_cam≤dis_cam_us1 , the system distance dis_sys=dis_us1, otherwise dis_sys=dis_cam.

优选地,所述判断系统距离dis_sys是否小于停车距离,为令最大跟随偏差dis_bias_max,当dis_sys<dis_follow-dis_bias_max时,即为小于停车距离。Preferably, the judging whether the system distance dis_sys is smaller than the parking distance is to make the maximum following deviation dis_bias_max, and when dis_sys < dis_follow-dis_bias_max, it is smaller than the parking distance.

与现有技术相比,本发明至少有以下有益效果:通过结合超声波测距与AI相机(摄像头)测距,近距离以超声波测距为准,非近距离以AI相机测距为准,以保证测距的准确。系统根据App设定的跟随距离对目标进行跟随拍摄,当目标与AI相机间的距离小于跟随距离时控制拍摄移动装置停车,当跟随距离设置较小时,由于AI测距偏差较大,将超声波测量距离作为系统距离,当系统距离采用超声波测量距离且未达到避障距离时减缓车速至慢速,当测量距离小于避障距离时,停车以实现有效避障。在App设定跟随距离非较近距离时,AI测距小于设定跟随距离则直接停车。在跟随过程中,使用App发送停车命令直接停车。当自动模式切换到手动模式时,默认停车。由上,本发明通过跟随目标与拍摄设备间的远近距离,采用不同的测距方法,同时加入避障判断,结合App控制形成停车关联,保证避障与停车准确可靠。Compared with the prior art, the present invention has at least the following beneficial effects: by combining ultrasonic ranging and AI camera (camera) ranging, ultrasonic ranging is the criterion for short distances, and AI camera ranging is the criterion for non-close distances. Ensure accurate ranging. The system follows and shoots the target according to the following distance set by the App. When the distance between the target and the AI camera is less than the following distance, it controls the shooting mobile device to stop. When the following distance is set to a small value, due to the large deviation of the AI ranging, the ultrasonic measurement is performed. The distance is used as the system distance. When the system distance is measured by ultrasonic and the obstacle avoidance distance is not reached, the vehicle speed is slowed down to a slow speed. When the measured distance is less than the obstacle avoidance distance, the vehicle stops to achieve effective obstacle avoidance. When the app sets the following distance to be not close, the AI distance measurement is less than the set following distance, and the car will stop directly. During the following process, use the App to send a stop command to stop directly. When the automatic mode is switched to the manual mode, the default is to stop. From the above, the present invention adopts different ranging methods by following the distance between the target and the shooting device, adds obstacle avoidance judgment at the same time, and combines App control to form a parking association, so as to ensure accurate and reliable obstacle avoidance and parking.

附图说明Description of drawings

图1为本发明系统具体实施例的自动跟随拍摄避障系统的结构框图;Fig. 1 is the structural block diagram of the automatic following shooting obstacle avoidance system of the specific embodiment of the system of the present invention;

图2为本发明方法实施例的自动跟随拍摄避障方法的步骤流程图。FIG. 2 is a flow chart of steps of a method for automatically following and photographing obstacle avoidance according to a method embodiment of the present invention.

具体实施方式Detailed ways

为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

相反,本发明涵盖任何由权利要求定义的在本发明的精髓和范围上做的替代、修改、等效方法以及方案。进一步,为了使公众对本发明有更好的了解,在下文对本发明的细节描述中,详尽描述了一些特定的细节部分。对本领域技术人员来说没有这些细节部分的描述也可以完全理解本发明。On the contrary, the present invention covers any alternatives, modifications, equivalents and arrangements within the spirit and scope of the present invention as defined by the appended claims. Further, in order to give the public a better understanding of the present invention, some specific details are described in detail in the following detailed description of the present invention. The present invention can be fully understood by those skilled in the art without the description of these detailed parts.

系统实施例1System Example 1

参见图1,本发明实施例的一种自动跟随拍摄避障系统,包括云台相机10和拍摄移动装置20,其中,Referring to FIG. 1, an automatic follow-up shooting obstacle avoidance system according to an embodiment of the present invention includes a pan-tilt camera 10 and a shooting mobile device 20, wherein,

云台相机10包括三轴云台12、摄像头11和第一超声波测距模块13,摄像头11架设在三轴云台12上,摄像头11对跟随目标进行图像或视频拍摄,对图像做处理后得到跟随目标与三轴云台12的距离;第一超声波测距模块13设置在三轴云台12的航向轴上,第一超声波测距模块13随三轴云台12的航向轴移动,并始终正对跟随目标,测量跟随目标与三轴云台12的距离;The pan-tilt camera 10 includes a three-axis pan-tilt 12, a camera 11 and a first ultrasonic ranging module 13. The camera 11 is erected on the three-axis pan-tilt 12. The camera 11 shoots images or videos of the following targets, and processes the images to obtain Follow the distance between the target and the three-axis gimbal 12; the first ultrasonic ranging module 13 is arranged on the heading axis of the three-axis gimbal 12, and the first ultrasonic ranging module 13 moves with the heading axis of the three-axis gimbal 12, and always Facing the following target, measure the distance between the following target and the three-axis gimbal 12;

云台相机10放置于拍摄移动装置20上,拍摄移动装置20包括电机21、舵机22、智能小车23和第二超声波测距模块24,电机21控制智能小车23前进与后退;舵机22控制智能小车23的转向;第二超声波测距模块24设置在智能小车23的前端,测量障碍物与智能小车23的距离。The pan-tilt camera 10 is placed on the shooting mobile device 20. The shooting mobile device 20 includes a motor 21, a steering gear 22, a smart car 23 and a second ultrasonic ranging module 24. The motor 21 controls the smart car 23 to move forward and backward; the steering gear 22 controls Steering of the smart car 23 ; the second ultrasonic ranging module 24 is arranged at the front end of the smart car 23 to measure the distance between the obstacle and the smart car 23 .

具体实施例中In a specific embodiment

智能小车23的底盘上设置有悬挂式避震结构。电机21为高速无刷直流式。拍摄移动装置20中的舵机22转向控制部件上嵌套有一层yaw(航向)轴角度的控制环。The chassis of the smart car 23 is provided with a suspension shock-absorbing structure. The motor 21 is a high-speed brushless DC type. The steering control part of the steering gear 22 in the photographing mobile device 20 is nested with a layer of control loops for the angle of the yaw (course) axis.

系统实施例2System Example 2

本系统可由APP控制,App控制包含模式切换,将系统运行模式在自动与手动模式间进行切换。控制器可选用所有基于ARM-M3/M4内核架构的MCU,例如STM32系列、GD32系列或者其他平台的32位微控制芯片,优选地,选用型号为GD32F330的微控制芯片作为本实施例的控制器,控制器包括速度自动控制单元和方向自动控制单元,两个控制单元为可被型号为GD32F330的微控制芯片执行的程序模块。The system can be controlled by APP, and the APP control includes mode switching, which switches the system operating mode between automatic and manual mode. The controller can select all MCUs based on ARM-M3/M4 core architecture, such as STM32 series, GD32 series or 32-bit microcontroller chips of other platforms. Preferably, a microcontroller chip with a model of GD32F330 is selected as the controller of this embodiment. , the controller includes a speed automatic control unit and an automatic direction control unit, and the two control units are program modules that can be executed by a micro-control chip with a model of GD32F330.

自动控制中的控制器用于接收App发送的跟随距离、模式切换以及停车等控制信息。处于自动跟随模式时,根据摄像头11测量距离判定是否以第一超声波测距模块13的测量距离作为系统距离dis_sys,根据第二超声波测距模块24判断正前方是否有障碍物存在,当跟随目标距离系统过近时第一超声波测距模块13将跟随目标视为障碍物,通过第一超声波测距模块13和第二超声波测距模块24实现避障稳定,慢速跟随。没有障碍时,控制器分别对速度和方向处理后做相应的限幅、滤波、放大等处理后经三轴云台12、舵机22以及电机21内的驱动电路驱动三轴云台12、舵机22以及电机21工作。当目标处于运动状态、位置不停变动时,系统可以通过三轴云台12yaw轴的转动角度测量,不断获取摄像头11与目标正面的角度偏差,控制三轴云台12yaw轴不断修正方向以保证摄像头11始终朝向目标,基于此基础,通过摄像头11测距算法得到的距离与固连在yaw轴上的第一超声波测距模块13采集距离进行联合处理,判断是否需要降速及避障停车,通过上述方法以保证目标与系统较近时及时停车,正面遇到障碍物时及时停车。The controller in automatic control is used to receive control information such as following distance, mode switching, and parking sent by the App. When in the automatic following mode, it is determined whether the measurement distance of the first ultrasonic ranging module 13 is used as the system distance dis_sys according to the distance measured by the camera 11, and whether there is an obstacle in front of the second ultrasonic ranging module 24 is judged. When the target distance is followed When the system is too close, the first ultrasonic ranging module 13 regards the following target as an obstacle, and the first ultrasonic ranging module 13 and the second ultrasonic ranging module 24 realize stable obstacle avoidance and slow following. When there is no obstacle, the controller performs corresponding amplitude limiting, filtering, amplification and other processing after processing the speed and direction respectively, and then drives the three-axis gimbal 12, the rudder through the drive circuit in the three-axis gimbal 12, the steering gear 22 and the motor 21. The machine 22 and the motor 21 work. When the target is in motion and the position is constantly changing, the system can measure the rotation angle of the 12yaw axis of the three-axis gimbal, continuously obtain the angle deviation between the camera 11 and the front of the target, and control the 12yaw axis of the three-axis gimbal to continuously correct the direction to ensure the camera. 11 is always facing the target. Based on this, the distance obtained by the camera 11 ranging algorithm and the distance collected by the first ultrasonic ranging module 13 fixed on the yaw axis are processed jointly to determine whether it is necessary to slow down and avoid obstacles and stop. The above method is used to ensure that the target and the system are close to the system to stop in time, and when the front encounters an obstacle, the system is stopped in time.

无障碍物情况下,根据摄像头11测距得到的距离信息,判定控制系统的距离参考以摄像头11图像信息为准还是以第一超声波测距模块13测量距离为准,系统距离小于跟随距离时,即dis_sys<dis_follow时,直接停车,系统距离大于跟随距离,小于切换标准且大于避障距离时,即disobstacle≤dissys≤discam2us,且dissys>disfollow时,设置速度为慢速,即将智能小车23的速度设为speed_low,对速度输出进行平滑处理,限制每次速度变化量不得超过speed_delta_max;如果小于避障距离,即diSsys<dis_obstacle,表明目标距离拍摄设备间的距离过近,则在速度控制环节置位速度置零标志,将该标志状态返回给速度输出限幅处理环节,控制直接停车;同时,第二超声波测距模块24遇到障碍物时,即disus2<disobstacle,已达避障范围,直接避障停车。In the case of no obstacle, according to the distance information obtained by the distance measurement of the camera 11, it is determined whether the distance reference of the control system is based on the image information of the camera 11 or the distance measured by the first ultrasonic ranging module 13. When the system distance is less than the following distance, That is, when dis_sys < dis _ follow, stop directly, the system distance is greater than the following distance, less than the switching standard and greater than the obstacle avoidance distance, that is, dis obstacle ≤dis sys ≤dis cam2us , and dis sys >dis follow , set the speed to slow , that is, the speed of the smart car 23 is set to speed_low, the speed output is smoothed, and each speed change is limited to not exceed speed_delta_max; if it is less than the obstacle avoidance distance, that is, diS sys <dis_obstacle, it indicates that the distance between the target and the shooting devices is too close , the speed zero setting flag is set in the speed control link, and the flag state is returned to the speed output limiting processing link to control direct parking; at the same time, when the second ultrasonic ranging module 24 encounters an obstacle, that is, dis us2 <dis obstacle , has reached the obstacle avoidance range, and directly avoids the obstacle and stops.

本系统中涉及多种停车需要,自动跟随模式下通过App设置的跟随距离disfollow进行控制,当满足目标与设备距离小于设定跟随距离、遇到障碍物、App控制停车三个条件之一时,智能小车23立即停止移动;在手动模式下,屏蔽避障功能,App手动控制移动与停车。This system involves a variety of parking needs. In the automatic follow mode, the following distance set by the App is used to control the dis follow . When the distance between the target and the device is less than the set following distance, encountering an obstacle, and the App controls the parking. The smart car 23 stops moving immediately; in manual mode, the obstacle avoidance function is shielded, and the App controls the movement and parking manually.

方法实施例1Method Example 1

参见图2,一种自动跟随拍摄避障方法,采用上述系统,包括以下步骤:Referring to Fig. 2, a method for automatically following and photographing obstacle avoidance, using the above system, includes the following steps:

S10,系统启动,获取即时跟随距离,设置预设跟随距离dis_follow发送给云台相机;S10, the system starts, obtains the instant follow distance, sets the preset follow distance dis_follow and sends it to the PTZ camera;

S20,超声波测距,判断是否需要避障;S20, ultrasonic ranging, to determine whether obstacle avoidance is required;

S21,是,则置位避障标志;S21, yes, set the obstacle avoidance flag;

S30,否,则根据云台相机测距判断系统距离dis_sys选择超声波测距还是云台相机测距;S30, if no, judge the system distance dis_sys according to the gimbal camera ranging to select ultrasonic ranging or gimbal camera ranging;

S40,判断系统距离dis_sys是否小于停车距离;S40, determine whether the system distance dis_sys is less than the parking distance;

S41,是,则置位速度置零标志;S41, yes, set the speed zero setting flag;

S50,否,则慢速跟随目标,返回S20;S50, otherwise, follow the target slowly and return to S20;

其中,置位避障标志或置位速度置零标志后,停止电机运行,停止智能小车。在S50中,慢速跟随目标之前,系统距离采用摄像头测距时,则自动变速跟随;否则,即系统距离采用超声波测距时,慢速跟随。Among them, after setting the obstacle avoidance sign or setting the speed zero sign, stop the motor running and stop the smart car. In S50, before following the target at a slow speed, when the system distance is measured by a camera, it will automatically follow at a variable speed; otherwise, when the system distance is measured by ultrasonic distance, it will follow at a slow speed.

具体实施例中,S20,超声波测距,判断是否需要避障,包括令避障距离dis_obstacle,第一超声波测距模块测得距离dis_us1,第二超声波测距模块测得距离dis_us2,当dis_us1<dis_obstacle或者dis_us2<dis_obstacle时,为需要避障。In a specific embodiment, S20, ultrasonic ranging, judging whether obstacle avoidance is required, including making the obstacle avoidance distance dis_obstacle, the distance dis_us1 measured by the first ultrasonic ranging module, and the distance dis_us2 measured by the second ultrasonic ranging module, when dis_us1<dis_obstacle Or when dis_us2 < dis_obstacle, obstacle avoidance is required.

S30根据云台相机测距判断系统距离dis_sys选择超声波测距还是云台相机测距,为令系统采样跟随距离的切换值dis_cam_us1,云台相机测得距离dis_cam,当dis_cam≤dis_cam_us1时,系统距离dis_sys=dis_us1,否则dis_sys=dis_cam。The S30 judges the system distance dis_sys according to the gimbal camera ranging to select ultrasonic ranging or gimbal camera ranging. In order to make the system sample the switching value of the following distance dis_cam_us1, the gimbal camera measures the distance dis_cam. When dis_cam≤dis_cam_us1, the system distance dis_sys =dis_us1, otherwise dis_sys=dis_cam.

S40,判断系统距离dis_sys是否小于停车距离,为令最大跟随偏差dis_bias_max,当dis_sys<dis_follow-dis_bias_max时,即为小于停车距离。S40, determine whether the system distance dis_sys is less than the parking distance, in order to make the maximum follow deviation dis_bias_max, when dis_sys < dis_follow- dis_bias_max , it is less than the parking distance.

系统启动后,获取即时的跟随距离,App设置跟随距离dis_follow后发送给云台相机,App端未设置跟随距离时,跟随距离设为默认跟随距离;之后根据第一超声波测距模块和第二超声波测距模块判断是否需要避障,有障碍物时,避障标志置位,无障碍物时,根据摄像头AI测距,判断系统距离dis_sys选择第一超声波测距模块测得的距离disus1还是摄像头AI测距discam,根据设定的最大跟随偏差dis_bias_max,当满足条件dis_sys<dis_follow-dis_bias_max时,速度置零标志置位,不满足时,进行相应的跟随控制,控制电机和舵机的动作,跟随控制过程中,App控制停车或切换为手动模式时,速度置零标志置位;在App中切换控制模式为手动模式时,默认速度置零标志置位,当手动设置速度值不为0时,解除手动模式下的速度置零标志,当手动设置速度为0时,激活速度置零标志;所述速度置零标志或避障标志置位时,控制系统将智能小车的速度设为0,实现跟随拍摄过程中的停车控制,当所述标志复位时,恢复系统的正常运行。进一步地,为了保证移动设备在行进过程中不会过冲,在保证系统响应速度的情况下,对速度输出设置了平滑输出处理,以保证每次速度变化量不会过大。After the system is started, the real-time following distance is obtained. The app sets the following distance dis _follow and sends it to the PTZ camera. When the following distance is not set on the App side, the following distance is set as the default following distance; The second ultrasonic ranging module judges whether obstacle avoidance is required. When there is an obstacle, the obstacle avoidance sign is set. When there is no obstacle, the system distance is determined according to the camera AI ranging. dis_sys Select the distance measured by the first ultrasonic ranging module dis us1 Or the camera AI ranging dis cam , according to the set maximum follow deviation dis_bias_max, when the condition dis_sys < dis_follow-dis_bias_max is satisfied, the speed zero flag is set, and if it is not satisfied, the corresponding follow control is performed to control the motor and steering gear. Action, during the following control process, when the App controls the stop or switches to manual mode, the speed zero setting flag is set; when the control mode is switched to manual mode in the app, the default speed zero setting flag is set, and when the manually set speed value is not When it is 0, the speed zero setting flag in the manual mode is released. When the manual setting speed is 0, the speed zero setting flag is activated; when the speed zero setting flag or the obstacle avoidance flag is set, the control system sets the speed of the smart car to 0. 0, realize the parking control during the follow-up shooting process, and restore the normal operation of the system when the flag is reset. Further, in order to ensure that the mobile device will not overshoot during the traveling process, under the condition of ensuring the system response speed, smooth output processing is set for the speed output to ensure that each speed change will not be too large.

综上所述,本发明以自动拍摄跟随系统为平台,通过云台相机的AI算法测距与超声波测距相结合,获取跟随目标与设备间的距离,依据跟随距离远近选择不同的系统距离参考标准,在进入缓冲避障区后,进行降速控制,进入避障区间后,控制移动装置停止,实现避障效果。在自动跟随过程中接收App控制信号,通过App、超声波、摄像头AI测距三者结合对移动装置的停车进行综合控制,以确保系统能够稳定的实现停车功能。To sum up, the present invention takes the automatic shooting following system as a platform, combines the AI algorithm ranging of the pan-tilt camera with the ultrasonic ranging, and obtains the distance between the following target and the device, and selects different system distance references according to the following distance. Standard, after entering the buffer obstacle avoidance area, the speed reduction control is performed, and after entering the obstacle avoidance area, the mobile device is controlled to stop to realize the obstacle avoidance effect. In the process of automatic following, it receives the control signal of the App, and comprehensively controls the parking of the mobile device through the combination of the App, ultrasonic waves, and camera AI ranging to ensure that the system can stably realize the parking function.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.

Claims (10)

1. An automatic following shooting obstacle avoidance system is characterized by comprising a pan-tilt camera and a shooting moving device, wherein,
the holder camera comprises a three-axis holder, a camera and a first ultrasonic ranging module, the camera is arranged on the three-axis holder, and the camera shoots an image or a video of a following target; the first ultrasonic ranging module is arranged on a course axis of the three-axis holder, moves along with the course axis of the three-axis holder and is always opposite to the following target, and the distance between the following target and the three-axis holder is measured;
the pan-tilt camera is placed on the shooting moving device, the shooting moving device comprises a motor, a steering engine, an intelligent trolley and a second ultrasonic ranging module, and the motor controls the intelligent trolley to move forwards and backwards; the steering engine controls the steering of the intelligent trolley; the second ultrasonic ranging module is arranged at the front end of the intelligent trolley and used for measuring the distance between the obstacle and the intelligent trolley.
2. The automatic follow-up shooting obstacle avoidance system according to claim 1, wherein a suspension type shock absorption structure is arranged on a chassis of the intelligent trolley.
3. The automatic follow-up shooting obstacle avoidance system according to claim 1, wherein the motor is of a high-speed brushless dc type.
4. The automatic follow-up shooting obstacle avoidance system of claim 1, further comprising a controller, wherein the controller comprises an MCU based on an ARM-M3/M4 kernel architecture.
5. The automatic follow-up shooting obstacle avoidance system according to claim 4, wherein the controller is an STM32 series or GD32 series micro control chip.
6. The automatic follow-up shooting obstacle avoidance system of claim 1, wherein the camera ranging is based on a monocular ranging algorithm.
7. An automatic follow-up shooting obstacle avoidance method, characterized in that the system of any one of claims 1 to 6 is adopted, and the method comprises the following steps:
s10, starting the system, acquiring the instant following distance, setting the preset following distance dis _ follow, and sending the preset following distance dis _ follow to the pan-tilt camera;
s20, ultrasonic ranging is carried out, and whether obstacle avoidance is needed or not is judged;
s21, if yes, setting an obstacle avoidance mark;
s30, if not, selecting ultrasonic ranging or pan-tilt camera ranging according to the pan-tilt camera ranging judgment system distance dis _ sys;
s40, judging whether the system distance dis _ sys is smaller than the parking distance;
s41, if yes, setting a speed zero setting mark;
s50, if not, slowly following the target, and returning to S20;
after the obstacle avoidance mark is set or the speed zero mark is set, the motor is stopped to run, and the intelligent trolley is stopped.
8. The method as claimed in claim 7, wherein the ultrasonic ranging determines whether an obstacle avoidance is required, including enabling the obstacle avoidance distance dis _ obstacle, the first ultrasonic ranging module measures the distance dis _ us1, the second ultrasonic ranging module measures the distance dis _ us2, and when dis _ us1 < dis _ obstacle or dis _ us2 < dis _ obstacle, the obstacle avoidance is required.
9. The method according to claim 8, wherein the selecting of the ultrasonic ranging or pan/tilt/zoom camera ranging is determined according to pan/tilt/zoom camera ranging distance dis _ sys, wherein in order to make the system sample the switching value dis _ cam _ us1 following the distance, the pan/tilt camera measures the distance dis _ cam, and when dis _ cam is not greater than dis _ cam _ us1, the system distance dis _ sys is not greater than dis _ us1, otherwise, the distance is not greater than dis _ cam.
10. The method according to claim 9, wherein the system distance dis _ sys is determined to be less than the stopping distance, such that the maximum following deviation dis _ bias _ max is smaller than the stopping distance when dis _ sys < dis _ follow-dis _ bias _ max.
CN202010416418.6A 2020-05-17 2020-05-17 A system and method for automatically following and shooting obstacle avoidance Pending CN111506082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010416418.6A CN111506082A (en) 2020-05-17 2020-05-17 A system and method for automatically following and shooting obstacle avoidance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010416418.6A CN111506082A (en) 2020-05-17 2020-05-17 A system and method for automatically following and shooting obstacle avoidance

Publications (1)

Publication Number Publication Date
CN111506082A true CN111506082A (en) 2020-08-07

Family

ID=71868388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010416418.6A Pending CN111506082A (en) 2020-05-17 2020-05-17 A system and method for automatically following and shooting obstacle avoidance

Country Status (1)

Country Link
CN (1) CN111506082A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112757912A (en) * 2021-02-01 2021-05-07 北京理工大学珠海学院 Moving carrier based on two-wheel differential drive and control method and application thereof
CN115234748A (en) * 2022-07-22 2022-10-25 沈阳工业大学 A pipeline endoscopy detection system
CN117237910A (en) * 2023-08-08 2023-12-15 深圳市恒天伟焱科技股份有限公司 Golf stroller control method, device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000194A1 (en) * 2014-06-30 2016-01-07 深圳市大疆创新科技有限公司 Photographing control method, device and pan-tilt device
CN105843229A (en) * 2016-05-17 2016-08-10 中外合资沃得重工(中国)有限公司 Unmanned intelligent vehicle and control method
CN105872371A (en) * 2016-03-31 2016-08-17 纳恩博(北京)科技有限公司 Information processing method and electronic device
CN106934402A (en) * 2017-03-10 2017-07-07 周艳 Indoor moving video tracking positions auxiliary shooting method and device
CN110401799A (en) * 2019-08-02 2019-11-01 睿魔智能科技(深圳)有限公司 A kind of auto-tracking shooting method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016000194A1 (en) * 2014-06-30 2016-01-07 深圳市大疆创新科技有限公司 Photographing control method, device and pan-tilt device
CN105872371A (en) * 2016-03-31 2016-08-17 纳恩博(北京)科技有限公司 Information processing method and electronic device
CN105843229A (en) * 2016-05-17 2016-08-10 中外合资沃得重工(中国)有限公司 Unmanned intelligent vehicle and control method
CN106934402A (en) * 2017-03-10 2017-07-07 周艳 Indoor moving video tracking positions auxiliary shooting method and device
CN110401799A (en) * 2019-08-02 2019-11-01 睿魔智能科技(深圳)有限公司 A kind of auto-tracking shooting method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112757912A (en) * 2021-02-01 2021-05-07 北京理工大学珠海学院 Moving carrier based on two-wheel differential drive and control method and application thereof
CN115234748A (en) * 2022-07-22 2022-10-25 沈阳工业大学 A pipeline endoscopy detection system
GB2621197A (en) * 2022-07-22 2024-02-07 Univ Shenyang Technology Pipeline endoscopic detection system
CN117237910A (en) * 2023-08-08 2023-12-15 深圳市恒天伟焱科技股份有限公司 Golf stroller control method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110401799B (en) Automatic tracking shooting method and system
CN111506082A (en) A system and method for automatically following and shooting obstacle avoidance
US20170374277A1 (en) Image pickup apparatus, image pickup method, and recording medium for imaging plural subjects or a single subject
CN114092551B (en) An intelligent vehicle based on panoramic vision and lidar fusion SLAM system
US9165364B1 (en) Automatic tracking image pickup system
CN108897342B (en) Method and system for positioning and tracking of fast-moving civil multi-rotor UAV
CN108156371B (en) Infrared automatic focusing fast searching method
US20030030742A1 (en) Autofocus device, imaging device and camera system
US20030030735A1 (en) Lens driving method for imaging device, imaging device and camera system
JP2016201626A (en) Shift element control device, shift element control program, and optical apparatus
CN110139038A (en) It is a kind of independently to surround image pickup method, device and unmanned plane
US11622080B2 (en) Automatic surround photographing method and system for target
CN205704211U (en) An intelligent security robot
JP2017204795A (en) Tracking device
JP3615867B2 (en) Automatic camera system
CN204697170U (en) An automatic focus system and video surveillance equipment
CN209274766U (en) A kind of mobile platform
CN120135412A (en) An ROV autonomous recovery and charging system based on underwater base station
JP7153505B2 (en) moving body
CN115980965A (en) Embedded telephoto lens autofocus system and method
CN206470615U (en) A kind of universal unmanned plane cloud platform control system
CN117237910A (en) Golf stroller control method, device, electronic equipment and storage medium
US11810386B2 (en) Image capture apparatus and control method
CN112313574B (en) Control device, imaging system, control method, and program
CN114257742A (en) Control method of pan-tilt camera, storage medium and pan-tilt camera

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200807