WO2023159611A1 - Image photographing method and device, and movable platform - Google Patents

Image photographing method and device, and movable platform Download PDF

Info

Publication number
WO2023159611A1
WO2023159611A1 PCT/CN2022/078433 CN2022078433W WO2023159611A1 WO 2023159611 A1 WO2023159611 A1 WO 2023159611A1 CN 2022078433 W CN2022078433 W CN 2022078433W WO 2023159611 A1 WO2023159611 A1 WO 2023159611A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
image
target
movable platform
focal length
Prior art date
Application number
PCT/CN2022/078433
Other languages
French (fr)
Chinese (zh)
Inventor
刘宝恩
王涛
李鑫超
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2022/078433 priority Critical patent/WO2023159611A1/en
Priority to CN202280050536.7A priority patent/CN117716702A/en
Publication of WO2023159611A1 publication Critical patent/WO2023159611A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments

Definitions

  • the present disclosure relates to the technical field of unmanned control, and in particular, relates to an image capture method, device and movable platform capable of improving the accuracy of unmanned automatic capture.
  • unmanned aerial vehicle With the development of unmanned aerial vehicle technology, tasks such as power inspections, bridge inspections, and oil and gas pipeline inspections that require repeated inspections of targets are gradually undertaken by unmanned aerial vehicles. During the inspection process, the unmanned aerial vehicle needs to take precise photos/videos of the target, so that the status of the inspection target can be compared and checked later to check the working status of key equipment.
  • a teaching/replay inspection scheme based on a zoom lens, that is, to record the position, attitude and focal length of the movable platform of the target object during the teaching process, and automatically according to the position and attitude during the replay process. , focal length to shoot the target object.
  • the purpose of the present disclosure is to provide an image capturing method, device and movable platform for overcoming the problem of inaccurate target object positioning in the process of unmanned shooting existing in the related art at least to a certain extent.
  • an image capturing method is provided, which is applied to a movable platform, where a camera is mounted on the movable platform, and the movable platform collects images through the camera, the method
  • the method includes: collecting a first target image at a first preset focal length, identifying a target object in the first target image; when the target object is identified in the first target image, according to the position of the target object The position in the first target image, adjust the position and posture of the movable platform, so that the position of the target object is located at the preset position in the picture taken by the camera device;
  • the target object is not reached, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the focal length of the camera device is equal to the second preset focal length;
  • the target object is adjusted according to the position of the target object
  • an image capture device comprising: a memory configured to store program code; one or more processors coupled to the memory, the processors configured to The instructions in the memory execute the following method: acquire a first target image at a first preset focal length, identify a target object in the first target image; when the target object is identified in the first target image, According to the position of the target object in the first target image, adjust the position and posture of the movable platform, so that the position of the target object is located at a preset position in the picture taken by the camera; When the first target image cannot identify the target object, continuously increase the focal length of the camera, and identify the target object according to the current image collected by the camera until the focal length of the camera is equal to The second preset focal length; wherein, during the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, according to the target object in the position in the current image, adjusting the position and posture of the mov
  • a movable platform including: a body; a power system provided on the body, and the power system is used to provide power for the movable platform; a camera device arranged on the A body for capturing images; a memory; and a processor coupled to the memory, the processor configured to execute the image capturing method as described in any one of the preceding items based on instructions stored in the memory.
  • a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the image capturing method described in any one of the above items is implemented.
  • the alignment of the target object can be continuously realized through an iterative alignment process.
  • the movable platform can overcome the problems of inaccurate given position (control error in the teaching process), strong wind and other external forces causing the fuselage to shake, so that the movable platform can realize accurate unmanned automatic shooting .
  • FIG. 1 is a flowchart of an image capturing method in an exemplary embodiment of the present disclosure.
  • Fig. 2 is a sub-flowchart of step S102 in an embodiment of the present disclosure.
  • FIG. 3 is a sub-flowchart of step S104 in an embodiment of the present disclosure.
  • FIG. 4 is a sub-flowchart of step S106 in an embodiment of the present disclosure.
  • Fig. 5 is a flowchart of an image capture method in an embodiment of the present disclosure.
  • Fig. 6 is a flowchart of an image capture method in another embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of a movable platform in one embodiment of the present disclosure.
  • FIG. 8 is a block diagram of an image capturing device in an exemplary embodiment of the present disclosure.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments may, however, be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of example embodiments to those skilled in the art.
  • the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
  • numerous specific details are provided in order to give a thorough understanding of embodiments of the present disclosure.
  • those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details being omitted, or other methods, components, devices, steps, etc. may be adopted.
  • well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
  • FIG. 1 is a flowchart of an image capturing method in an exemplary embodiment of the present disclosure.
  • the method shown in FIG. 1 can be applied to a movable platform, where a camera is mounted on the movable platform, and images are collected by the movable platform through the camera.
  • an image capture method 100 may include:
  • Step S102 collecting a first target image at a first preset focal length, and identifying a target object in the first target image;
  • Step S104 when the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that the The position of the target object is located at a preset position in the picture taken by the camera device;
  • Step S106 when the target object cannot be identified in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the The focal length of the imaging device is equal to the second preset focal length; wherein, during the process of adjusting the focal length of the imaging device, when the target object is recognized according to the current image collected by the imaging device at any time, according to the The position of the target object in the current image, adjusting the position and posture of the movable platform, so that the position of the target object is located at a preset position in the picture taken by the camera device.
  • the movable platform may be, for example, an unmanned aerial vehicle (unmanned aerial vehicle), and the camera device is mounted on the unmanned aerial vehicle.
  • the movable platform further includes a pan-tilt, the pan-tilt is mounted on the UAV, and the camera device is mounted on the pan-tilt.
  • the method provided by the embodiments of the present disclosure can be applied in the replay phase of the target detection task and the tracking phase of the target tracking task, so as to perform automatic focusing and automatic shooting on the target object.
  • the replay stage of the target detection task refers to manually controlling the movable platform (such as an unmanned aerial vehicle) during the teaching stage of the target detection task, and recording the shooting position and shooting height of the target to be detected (such as a communication base station, an electric tower) , focal length, etc.
  • the movable platform will automatically and regularly shoot the target to be detected according to the shooting position, shooting height, and focal length, so as to realize automatic and regular monitoring of the target to be detected and improve monitoring efficiency.
  • the target tracking task refers to the tracking range of a target to be detected (such as a person, an animal, a vehicle, etc.), and the movable platform (such as an unmanned aerial vehicle) automatically tracks the target to be detected to monitor the real-time detection of the target to be detected. position, observe the action and state of the target to be detected, etc.
  • a target to be detected such as a person, an animal, a vehicle, etc.
  • the movable platform such as an unmanned aerial vehicle
  • UAV power inspection needs to regularly check the safety of key components of the tower, so regular and repeated inspections are required, so automated inspections can greatly improve efficiency and accuracy.
  • Automatic power inspection can be divided into teaching mode and replay mode.
  • the teaching mode is fully manual or semi-automatic operation, and performs normal power inspection tasks.
  • each waypoint will record data such as the attitude of the aircraft and the gimbal at each photo (video) point.
  • Repeat mode for fully automatic flight.
  • the aircraft will fly to each waypoint in turn, adjust the gimbal posture according to the waypoint data, and take corresponding photos/videos.
  • the replay mainly follows the target detection process, that is, the target is detected only once, and then the gimbal pose and camera focal length are directly adjusted to shoot the target.
  • this control process takes a long time. If there is a large cumulative deviation in the gimbal control during the process, or the fuselage shakes obviously due to external factors such as excessive wind, plus the telephoto control deviation and the machine The camera is more sensitive to body shake, and the target in the final shooting result may be obviously deviated from the center of the screen or even not in the screen. That is to say, the existing teaching/go-around inspection scheme cannot solve the problem of gimbal control deviation and the shaking of the fuselage caused by factors such as strong wind. Therefore, gimbal stabilization plays an important role in the reliability of target shooting.
  • the embodiments of the present disclosure first use the feature point matching method to detect the precise position of the inspection target in the screen at low magnification focal length as the initialization frame for precise photography during replay, and then use the target tracking algorithm while adjusting the pan/tilt attitude and zoom Track the position of the target in the screen, and correct the gimbal control in real time to keep the target in the center of the screen, realize the gimbal tracking of the target, and achieve the effect of gimbal stabilization.
  • the zoom is completed and the target is kept in the center of the screen, the target is shot, and the precise shooting process of the inspection target is completed.
  • the process of searching for the target at a small focal length, tracking the target with the gimbal, and then shooting the target with a large focal length enables the aircraft to capture the details of the target stably, accurately and clearly at a relatively long distance, achieving a good inspection effect.
  • step S102 a first target image is captured at a first preset focal length, and a target object is identified in the first target image.
  • the second preset focal length and the position and posture of the movable platform when capturing the first target image are all based on the teaching of the target detection task Phase teaching data are obtained.
  • the first preset focal length can be obtained according to the tracking range of the target tracking task.
  • the first preset preset focal length may be a focal length shorter than the second preset focal length for shooting set in the teaching stage, so as to obtain Larger shooting field of view, convenient for real-time positioning of target objects.
  • the position (including latitude and longitude and altitude) and posture (including lens orientation) of the movable platform when the first target image is collected are obtained according to the teaching data in the teaching phase.
  • the first preset focal length can be obtained according to the tracking range of the target tracking task, and the position and posture of the movable platform during shooting can also be obtained according to the tracking range of the target tracking task.
  • the shooting height is more than x meters away from the target object to prevent being discovered by the target object (x is a value greater than zero)
  • x is a value greater than zero
  • Fig. 2 is a sub-flowchart of step S102 in an embodiment of the present disclosure.
  • step S102 may include:
  • Step S1021 acquiring the feature points of the target object according to the standard feature image of the target object;
  • Step S1022 performing feature point recognition in the first target image according to the feature points of the target object, so as to determine a positioning frame of the target object.
  • the feature points of the target object can be obtained in advance according to the standard feature image of the target object.
  • the feature points of the target object can be extracted according to the standard feature image of the target object provided in the teaching stage; feature image to extract feature points of the target object.
  • a convolutional neural network may be used to extract local feature points from the current image, and the extracted local feature points are compared with feature points of the target object to identify the target object.
  • the target object can be identified in the current image through the trained neural network model.
  • the neural network model may be, for example, a convolutional neural network model (Convolutional Neural Network S1, CNN). Based on the learnability of CNN, using CNN to extract feature points can better deal with target objects such as tower insulators that have no local texture, not rich in texture, or have repeated texture characteristics, and accurately obtain the position of the target object.
  • CNN convolutional Neural Network S1, CNN
  • the image block detection method may also be used to identify the target object, or the scale-invariant feature transform (Scale-invariant feature transform, SIFT) algorithm, Speeded Up Robust Features (Speeded Up Robust Features, SURF ) algorithm, fast feature point extraction and description (Oriented FAST and Rotated BRIEF, ORB) algorithm and other target recognition algorithms, or through multiple deep learning algorithms for target detection, this disclosure does not make special restrictions on this.
  • Scale-invariant feature transform Scale-invariant feature transform, SIFT
  • Speeded Up Robust Features Speeded Up Robust Features, SURF
  • fast feature point extraction and description Oriented FAST and Rotated BRIEF, ORB
  • feature point recognition can be performed starting from the center point of the first target image.
  • the current pose can accurately capture the image of the target object, that is, it is assumed that the target object is located in the center of the first target image, therefore, starting from the center point of the first target image for feature point recognition can Improve recognition efficiency.
  • step S104 when the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that The position of the target object is located at a preset position in the picture taken by the camera device.
  • the preset position may include, for example, a central area of the captured image, and the central area may be, for example, a smaller area within a preset length and width around the central point of the captured image, and its shape may be, for example, a rectangle or a circle.
  • FIG. 3 is a sub-flowchart of step S104 in an embodiment of the present disclosure.
  • step S104 may include:
  • Step S1041 taking the center of the first target image as the coordinate origin, and determining the first coordinates of the target object in the first target image;
  • Step S1042 determining the position and attitude adjustment values of the movable platform according to the first coordinates, where the position and attitude adjustment values include at least one of a horizontal adjustment value, a vertical adjustment value, and a rotation angle adjustment value;
  • Step S1043 adjusting the position and attitude of the movable platform according to the position and attitude adjustment value.
  • the recognition frame of the target object can be obtained, and the center of the first target image is used as the coordinate source point, and the recognition frame is placed in the first target image
  • the coordinates of are determined as the coordinates of the target object, so as to determine the first coordinates of the target object.
  • position and attitude adjustment values of the movable platform can be determined according to the first coordinates.
  • the movable platform can be controlled to move 50 coordinate units in the positive direction of the X axis and 10 coordinate units in the negative direction of the Y axis, so that the target object Coincide with the coordinate origin, that is, the center of the first target image, so that the target image is located at the center of the next frame image.
  • the proportional relationship between the coordinate unit and the movable platform can be determined according to the scale used in the current coordinate system.
  • the scale can be determined according to the flying height of the movable platform or the distance between the movable platform and the target object, which is not particularly limited in the present disclosure.
  • the shooting angle of the movable platform can also be adjusted, that is, the rotation angle of the movable platform can be controlled, so as to capture the target surface of the target object as much as possible, such as the setting of the electric tower There is a side of a key facility, the face of a tracking target, etc.
  • the adjustment value of the rotation angle of the movable platform can be judged according to the feature recognition results of the target object to determine the angle difference between the side of the target object currently photographed and the standard side to be photographed, etc., and then according to the scale of the current coordinate system and the angle difference to obtain the adjustment value of the rotation angle of the movable platform.
  • an adjustment value of the distance between the movable platform and the target object may also be determined. For example, when an unmanned aerial vehicle takes a bird's-eye view of a target object, the flying height of the fuselage becomes higher due to the influence of strong winds. At this time, the recognition frame of the target object in the current image is smaller than the size of the recognition frame during the teaching stage or the preset recognition frame. Small, the flying height of the movable platform can be readjusted according to the set flying height, or the distance adjustment value can be converted according to the proportional relationship between the size of the recognition frame and the preset standard value of the recognition frame, and the UAV can be controlled to approach or stay away target. There are many types of position and attitude adjustment values of the movable platform, and those skilled in the art can set them by themselves according to the actual situation.
  • the movable platform can be controlled to adjust its position and attitude so that the shooting center of the camera device is aligned with the target object.
  • the shooting center of the camera can be aligned with the target object by adjusting the position and attitude of the pan/tilt.
  • the current shooting center After adjusting the pose of the movable platform, the current shooting center has been aligned with the target object by default, and the focal length can be adjusted to the second preset focal length to shoot the target object.
  • the second preset focal length is a preset focal length value at which the target object can be accurately observed.
  • the second preset focal length may be, for example, an ideal shooting focal length set in the teaching stage; in the tracking stage, the second preset focal length may be, for example, a preset tracking shooting focal length value.
  • the target object is continuously tracked so that the target object continues to be in the picture captured by the camera device .
  • step S106 when the target object cannot be recognized in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the The focal length of the camera device is equal to the second preset focal length.
  • the position and posture of the movable platform are adjusted so that the position of the target object is located at a preset position in the picture taken by the camera device.
  • continuously increasing the focal length of the imaging device includes: continuously increasing the focal length of the imaging device with a preset step size.
  • the current image collected by the camera device in step S106 is not the captured image, but the cached data of the real-time field of view of the camera device.
  • the current image is used to assist image recognition and location analysis, and is deleted within a short period of time. Therefore, when the embodiment of the present disclosure is executed by the processor, the processor acquires the current image in real time and analyzes the current image to identify the target object, so as to adjust the zoom while continuously zooming according to the position of the target object in the current image.
  • the pose of the mobile platform is such that the target object is located at a preset position in the image captured by the camera device, and the preset position is, for example, a central area.
  • the central area may be, for example, a smaller area within a preset length and width range around the central point of the current image, and its shape is, for example, a rectangle or a circle.
  • FIG. 4 is a sub-flowchart of step S106 in an embodiment of the present disclosure.
  • step S106 may include:
  • Step S1061 acquiring feature points of the target object according to the standard feature image of the target object
  • Step S1061 performing feature point recognition in the current image collected by the camera device according to the feature points of the target object, so as to determine a positioning frame of the target object.
  • step S106 The process of identifying the target object in step S106 is similar to the process of identifying the target object in step S104, both of which can perform feature point identification based on various algorithms such as convolutional neural network (CNN), and will not be repeated here.
  • CNN convolutional neural network
  • feature point recognition can also be performed from the center point of the current image to improve recognition efficiency.
  • Recognition of feature points starting from the center point of the current image can be represented as recognition near the position of the recognition frame of the previous frame image, so as to determine the recognition frame of the target object in the current image.
  • the feature points of the target object can also be obtained according to the image features in the recognition frame of the target object in the previous frame image, so as to improve the information accuracy of the target object based on the latest information and improve the recognition accuracy Rate.
  • the robust automatic inspection solution based on feature matching to locate targets and pan-tilt tracking proposed in this disclosure can solve the problems of automatic precise positioning and stable shooting of targets such as electric towers.
  • Deviation to achieve the effect of gimbal stabilization, so that the target is always kept in the center of the screen during the control process, until the zoom ends to capture a complete and clear inspection target.
  • the present invention extracts local features based on CNN for features that can better adapt to the situation of local non-texture or repeated texture.
  • the method proposed in the embodiment of the present disclosure obtains the initialization frame for accurate photography based on local feature matching and positioning the target, and then combines the target pan-tilt tracking method to realize the stabilization of the pan-tilt during the replay process, and finally achieves accurate and robust inspection.
  • the target shooting effect can be used to solve the problem that the target is not in the center of the screen or in the field of view during the automatic inspection process due to camera (aircraft) positioning, gimbal control is not accurate enough, or the camera (aircraft) shakes due to external factors such as strong wind , can be applied to industrial drones with inspection functions.
  • the pan-tilt stabilization inspection solution proposed in the embodiment of the present disclosure which combines the precise camera initialization frame and the pan-tilt tracking, is an automatic inspection solution with closed-loop control.
  • Fig. 5 is a flowchart of an image capture method in an embodiment of the present disclosure.
  • an image capturing method 500 may include:
  • Step S501 short-focus shooting replay image
  • Step S502 identifying the target object through the CNN algorithm
  • Step S503 extracting feature points and descriptors of the target object
  • step S501 obtain target teaching figure
  • Feature points and descriptors of the target object are extracted in step S503';
  • step S504 the feature points are matched
  • Step S505 calculating the target frame of the short-focus composite image
  • Step S506 adjusting the pose and zoom of the gimbal
  • Step S507 tracking
  • Step S508 determine whether the zooming and control are over, if yes, go to step S509 to use telephoto to shoot the inspection target and then end the process, if yes, return to step S506 to readjust the pan/tilt pose and zoom.
  • step S501 short-focus shooting of replay images refers to capturing images at a first preset focal length, which belongs to real-time observation of a target object.
  • step S501' the teaching image of the target object, that is, the target teaching map is obtained through the teaching data.
  • the CNN algorithm is used to identify the target object in two pictures (replay image and teaching picture) and extract the feature points and descriptors of the target object in the two pictures.
  • the target positioning method based on local feature point matching can better deal with irregular shape targets and reduce the false detection problem caused by background matching.
  • the feature point matching can use local feature extraction methods, or traditional methods, including but not limited to SIFT, SURF, ORB algorithms, etc.
  • step S504 feature point matching is performed on the feature points and descriptors extracted from the two pictures, so as to calculate the target frame in the short-focus reshot image in step S505 according to the matching result, which is also called extraction initialization frame.
  • the initialization box acquisition method can be replaced by an image patch-based detection method, which is not limited to traditional methods or deep learning methods.
  • Steps S506 to S508 are a process of cyclically and iteratively adjusting the pose of the pan/tilt.
  • zooming refers to continuously increasing the focal length, such as increasing the focal length according to preset compensation; adjusting the pan-tilt pose, for example, adjusting the pan-tilt pose on parameters such as the horizontal direction, vertical direction, and deflection angle, to adjust Filming angle. Adjusting the pose of the gimbal and zooming can be performed simultaneously, while the camera device continues to collect real-time images.
  • step S506 target tracking is performed in step S507 according to the images continuously collected by the camera device and the position recognition results of the target object in the images.
  • the target tracking can be directly completed by the feature point matching method of the present invention to obtain the initialization frame, that is, for each frame (or several frames at intervals), the feature point matching method is used to update the position of the target frame.
  • the gimbal tracking (track)
  • the basis for the end of zooming and control is to reach the predetermined focal length and the target frame is still in the center of the screen. At this time, the shooting target has completed the entire accurate reshooting of the inspection target with the effect of the pan-tilt.
  • step S508 judges that the zooming and control are finished, go to step S509 to use the telephoto (the second preset focal length) to photograph the inspection target and then end the process.
  • telephoto the second preset focal length
  • the embodiments of the present disclosure use the CNN-based feature point detection method to obtain an accurate photo initialization frame, and use the target pan-tilt tracking method to stabilize the pan-tilt, realize the closed-loop control of the inspection target shooting, and overcome the process of zooming and pan-tilt pose adjustment
  • the shooting deviation caused by external factors such as the cloud platform control error and strong wind has at least the following advantages:
  • the local features extracted by CNN can better adapt to the situation of local no texture or repeated texture, and accurately obtain the position of the target frame;
  • Fig. 6 is a flowchart of an image capture method in another embodiment of the present disclosure.
  • the complete process of the image capturing method may include:
  • Step S601 acquiring a first image at a first preset focal length, configuring the first image as a current image, and configuring the first preset focal length as a current focal length.
  • Step S602 identifying the target object in the current image.
  • Step S603 judging whether the target object is recognized, if the target object is recognized, go to step S604, otherwise go to step S613.
  • Step S604 updating the current feature points of the target object according to the recognition result of the target object in the current image.
  • Step S605 determine whether the target object is located in the center of the current image, if yes, proceed to step S606 to adjust the pose according to the coordinate difference between the target object and the center of the current image, and then proceed to step S607; if not, directly proceed to step S607.
  • Step S607 judge whether the current focal length is equal to the second preset focal length, if it is equal to the second preset focal length, go to step S608; otherwise, go to step S608, increase the current focal length, acquire a second image, and configure the second image as the current image, return to step S602.
  • Step S609 acquiring a third image, and configuring the third image as a current image.
  • Step S610 judge whether the target object is located in the center of the current image, if not, proceed to step S611 to adjust the pose according to the coordinate difference between the target object and the center of the current image, and return to step S609 until the target object is located in the center of the current image; if If yes, go to step S612 to shoot the target object.
  • Step S613 if the target object is not identified in the current image, judge whether the current focal length is equal to the third preset focal length, if not, enter step S614, reduce the current focal length, obtain the fourth image, and configure the fourth image as the current image, and then return to step S602; if yes, proceed to step S615 to output recognition failure information.
  • steps S601 to S608 are an iterative zooming method when the target object can be directly recognized in the first image.
  • the current image is a parameter, not the only image, and it can be assigned a value so as to be equal to different images at different times;
  • the current focal length is also a parameter, not the only value, and it can also be assigned a value so that Different moments equal different focal length values.
  • steps S602 and S603 The method for identifying the target object in steps S602 and S603 is as described in the above-mentioned embodiment, and will not be repeated here.
  • the current feature point of the target object is a parameter.
  • the current feature point of the target object is equal to the feature point of the target object in the teaching image.
  • the current image is equal to other images, there is no
  • the parameter of the feature points of the target object is updated in real time according to the feature points of the recognized target object, so that the feature points of the target object can be kept based on the latest recognition data, and the discrepancy between the teaching data and the real-time situation can be reduced. Identify errors.
  • steps S605 and S606 if the target image is not located in the center of the current image (or the central area described in the preceding embodiments), the position of the gimbal or the UAV can be adjusted according to the coordinate difference between the target object and the center of the current image and gesture.
  • the center of the current image can be used as the origin for calculation.
  • step S607 if the target object is located at the center of the current image, or after pose adjustment, the target image is located at the center of the current image, it can be judged whether the current focal length has reached the set shooting focal length (the second preset focal length), if not If it is reached, go to step S608 and continue to increase the focal length to enlarge the proportion of the target object in the image, improve the shooting clarity of the target object, collect the second image at the new increased focal length, and use steps S602 to The method of S607 performs pose adjustment according to the image captured at a larger focal length, so that the target object can also be located at the shooting center of the current image at a larger focal length until reaching the preset shooting focal length, that is, the second preset focal length.
  • Steps S609 to S612 are the process of fine-tuning the shooting at the second preset focal length to complete the shooting.
  • step S609 the third image can be captured directly at the second preset focal length, and the third image can be saved as the shooting result of the target object.
  • step S606 when the current focal length is equal to the second preset focal length after increasing the focal length, the second image taken at the second preset focal length is set as the current image, thus, in step S606, according to the target in the current image
  • step S609 After the object adjusts the pose (of the unmanned aerial vehicle or gimbal), it directly proceeds to step S609 to take the third image after the judgment of step S607.
  • step S610 a judgment can be made on the third image acquired (not necessarily shot) after the pose adjustment is performed at the second preset focal length. If the pose adjustment is not in place (the target object is not located in the current image/third image center of the image), go to step S611 and continue to adjust the pose until the pose is adjusted in place, then go to step S612 to take pictures.
  • the acquired first image, second image, and third image can all be image data that changes in real time in the lens when the camera has not pressed the shooting key.
  • Steps S613 to S615 are a processing method when the target is found to be lost.
  • the current focal length can be reduced to increase the shooting field of view and re-identify and locate the target object.
  • recognition failure information may be output to report that the target is lost.
  • the third preset focal length is shorter than the first preset focal length, and the third preset focal length can be set by those skilled in the art according to the shooting capability of the camera device.
  • the method provided by the embodiment shown in Fig. 6 firstly controls the movable platform to shoot according to the set position and height under a small first preset focal length, so as to first ensure that the target object is in the lens, and then adopts iterative zoom positioning The method continuously locates the target object, and finally shoots the target object at the second preset focal length that can ensure clear shooting.
  • the embodiment shown in Figure 6 iteratively collects images, recognizes the target object, adjusts the pose, and zooms, the feature information and position information of the target object can be updated according to the images collected in real time, and then gradually approach the ideal shooting pose, Shoot the focal length to avoid the failure of shooting the target object caused by the deviation of the pre-input control parameters or the shaking of the fuselage caused by external forces such as strong winds.
  • the gimbal stability enhancement inspection solution provided by the embodiments of the present disclosure which combines the precise camera initialization frame and gimbal tracking, is an automatic inspection solution with closed-loop control.
  • replaying the inspection target first use the feature point matching method to obtain the target frame in the short-focus picture as the initialization frame for accurate photography of the inspection target, and then use the target tracking method to track the target with the pan/tilt to Resist the accumulative control errors that may occur during the gimbal pose adjustment and zooming process or the deviation caused by external forces such as strong winds.
  • the gimbal When the gimbal is tracking (track), first extract the current feature points of the target object in the previous frame recognition frame, then perform feature search and matching near the old frame position of the current frame, update the recognition frame position, and control the gimbal so that the target object Keep in the center of the shooting frame to achieve the gimbal stabilization effect, and iterate this process until the zoom and control are over.
  • the basis for the end of zooming and control is to reach the predetermined focal length and the target frame is still in the center of the screen. At this time, the shooting target has completed the precise reshooting of the inspection target.
  • the target tracking of the gimbal is used to keep the target in the center of the screen during the entire control process, which can better deal with gimbal control or strong wind, etc.
  • the target shooting deviation or even loss of target caused by external force can realize the stabilization of the gimbal during the replay process, and finally achieve accurate and robust inspection target shooting effect.
  • FIG. 7 is a schematic diagram of a movable platform in one embodiment of the present disclosure.
  • the mobile platform 700 may include:
  • the power system 72 is located in the body, and the power system is used to provide power for the movable platform;
  • the camera device 73 is arranged on the body and is used for collecting images
  • a processor 75 coupled to the memory, and the processor is configured to execute the image capturing method of the embodiment shown in FIGS. 1 to 6 based on instructions stored in the memory.
  • the processor 75 controls the power system 72 to adjust the position and attitude of the movable platform 700 .
  • the movable platform 700 further includes a platform 76 on which the camera device 73 is mounted.
  • the processor 75 controls the power system 72 to adjust the position and attitude of the pan-tilt 76 to keep the target object at the shooting center.
  • the embodiments of the present disclosure can be used for industrial drones with inspection functions, to solve the problem that the target is not in the center of the screen or in the field of view due to the camera (aircraft) positioning and pan/tilt control during the automatic inspection process, and to solve the problem of automatic inspection.
  • the camera (aircraft) shakes due to external factors such as strong winds, resulting in the problem that the target is not in the center of the screen or within the field of view.
  • the present disclosure further provides an image capturing device, which may be used to execute the foregoing method embodiments.
  • FIG. 8 is a block diagram of an image capturing device in an exemplary embodiment of the present disclosure.
  • an image capture device 800 may include:
  • memory 81 configured to store program codes
  • the position and posture of the movable platform are adjusted according to the position of the target object in the current image, so as to The position of the target object is located at the preset position in the shooting picture of the camera device.
  • the second preset focal length and the position and posture of the movable platform when capturing the first target image are obtained according to the teaching data in the teaching phase of the target detection task.
  • the first preset focal length is obtained according to the tracking range of the target tracking task.
  • the processor 82 is configured to: determine the first coordinates of the target object in the first target image by taking the position of the central region of the first target image as the coordinate origin;
  • the position and attitude adjustment value of the movable platform, the position and attitude adjustment value includes at least one of the horizontal adjustment value, the vertical adjustment value, and the rotation angle adjustment value; adjust the position and attitude of the movable platform according to the position and attitude adjustment value.
  • the processor 82 is configured to: acquire the feature points of the target object according to the standard feature image of the target object; perform feature point recognition in the first target image according to the feature points of the target object, to Determines the anchor box for the target object.
  • the processor 82 is configured to: obtain the feature points of the target object according to the standard feature image of the target object; Recognition to determine the positioning box of the target object.
  • the processor 82 is configured to perform feature point recognition starting from a central area of the first target image.
  • the processor 82 is configured to: use a convolutional neural network to extract local feature points from the first target image; compare the extracted local feature points with the feature points of the target object , to identify the target object.
  • the processor 82 is configured to continuously increase the focal length of the camera device with a preset step size.
  • the processor 82 is configured to continuously track the target object during the process of adjusting the position and posture of the movable platform according to the position of the target object in the first target image, so that The target object is continuously in the picture captured by the camera device.
  • the example implementations described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of software products, and the software products can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • a computer-readable storage medium on which a program product capable of implementing the above-mentioned method in this specification is stored.
  • various aspects of the present invention can also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above in this specification.
  • the program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may run on a terminal device such as a personal computer.
  • CD-ROM compact disk read-only memory
  • the program product of the present invention is not limited thereto.
  • a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device.
  • the program product may reside on any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer readable signal medium may include a data signal carrying readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute.
  • the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, using an Internet service provider). business to connect via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider for example, using an Internet service provider
  • the alignment of the target object can be continuously realized through an iterative alignment process.
  • the movable platform can overcome the problems of inaccurate given position (control error in the teaching process), strong wind and other external forces causing the fuselage to shake, so that the movable platform can realize accurate unmanned automatic shooting .

Abstract

An image photographing method and device, and a movable platform. The method comprises: capturing a first target image at a first preset focal length, and identifying a target object in the first target image; when the target object is identified in the first target image, adjusting the position and orientation of a movable platform according to the position of the target object in the first target image, so as to cause the position of the target object to be located at a preset position in a photography scene of a camera device; when the target object is not identified in the first target image, continuously increasing the focal length of the camera device, and identifying the target object according to a current image captured by the camera device, until the focal length of the camera device is equal to a second preset focal length; and during adjustment of the focal length of the camera device, when the target object is recognized according to a current image captured by the camera device at any moment, adjusting the position and orientation of the movable platform according to the position of the target object in the current image. An embodiment of the present disclosure can improve the accuracy of an unmanned automated photography.

Description

图像拍摄方法、装置与可移动平台Image capturing method, device and movable platform 技术领域technical field
本公开涉及无人控制技术领域,具体而言,涉及一种能够提高无人自动拍摄准确性的图像拍摄方法、装置与可移动平台。The present disclosure relates to the technical field of unmanned control, and in particular, relates to an image capture method, device and movable platform capable of improving the accuracy of unmanned automatic capture.
背景技术Background technique
随着无人飞行器技术的发展,电力巡检、桥梁巡检、输油气管道巡检等需要对目标进行反复巡检的任务逐渐由无人飞行器承担。在巡检过程中,无人飞行器需要对目标进行精准的拍照/录像,以便后期对巡检目标的状态进行比对检查,以查看关键设备的工作状态。在相关技术中存在基于变焦镜头的示教/复演的巡检方案,即记录示教过程中拍摄目标对象的可移动平台的位置、姿态和焦距,在复演过程中自动根据该位置、姿态、焦距拍摄目标对象。但是在复演过程中定位目标对象时,调整云台位置和姿态和焦距耗时较长,且无法解决示教过程中云台控制偏差、实际拍摄过程中强风等因素造成的机身晃动等导致的拍摄误差。With the development of unmanned aerial vehicle technology, tasks such as power inspections, bridge inspections, and oil and gas pipeline inspections that require repeated inspections of targets are gradually undertaken by unmanned aerial vehicles. During the inspection process, the unmanned aerial vehicle needs to take precise photos/videos of the target, so that the status of the inspection target can be compared and checked later to check the working status of key equipment. In the related art, there is a teaching/replay inspection scheme based on a zoom lens, that is, to record the position, attitude and focal length of the movable platform of the target object during the teaching process, and automatically according to the position and attitude during the replay process. , focal length to shoot the target object. However, when locating the target object in the replay process, it takes a long time to adjust the position, attitude and focus of the gimbal, and it is impossible to solve the gimbal control deviation during the teaching process and the shaking of the fuselage caused by factors such as strong winds during the actual shooting process. shooting error.
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。It should be noted that the information disclosed in the above background section is only for enhancing the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art.
发明内容Contents of the invention
本公开的目的在于提供一种图像拍摄方法、装置与可移动平台,用于至少在一定程度上克服相关技术存在的无人拍摄过程中目标对象定位不准确问题。The purpose of the present disclosure is to provide an image capturing method, device and movable platform for overcoming the problem of inaccurate target object positioning in the process of unmanned shooting existing in the related art at least to a certain extent.
根据本公开实施例的第一方面,提供一种图像拍摄方法,应用于可移动平台,所述可移动平台上搭载有摄像装置,所述可移动平台通过所述摄像装置采集图像,所述方法包括:在第一预设焦距采集第一目标图像,在所述第一目标图像中识别目标对象;当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置;当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距;在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。According to the first aspect of the embodiments of the present disclosure, an image capturing method is provided, which is applied to a movable platform, where a camera is mounted on the movable platform, and the movable platform collects images through the camera, the method The method includes: collecting a first target image at a first preset focal length, identifying a target object in the first target image; when the target object is identified in the first target image, according to the position of the target object The position in the first target image, adjust the position and posture of the movable platform, so that the position of the target object is located at the preset position in the picture taken by the camera device; When the target object is not reached, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the focal length of the camera device is equal to the second preset focal length; During the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, the target object is adjusted according to the position of the target object in the current image. The position and posture of the platform can be moved, so that the position of the target object is located at a preset position in the picture taken by the camera device.
根据本公开的第二方面,提供一种图像拍摄设备,包括:存储器,被配置为存储程序代码;耦合到所述存储器的一或多个处理器,所述处理器被配置为基于存储在所述存储器中的指令执行以下方法:在第一预设焦距采集第一目标图像,在所述第一目标图像中识别 目标对象;当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置;当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距;其中,在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。According to a second aspect of the present disclosure, there is provided an image capture device, comprising: a memory configured to store program code; one or more processors coupled to the memory, the processors configured to The instructions in the memory execute the following method: acquire a first target image at a first preset focal length, identify a target object in the first target image; when the target object is identified in the first target image, According to the position of the target object in the first target image, adjust the position and posture of the movable platform, so that the position of the target object is located at a preset position in the picture taken by the camera; When the first target image cannot identify the target object, continuously increase the focal length of the camera, and identify the target object according to the current image collected by the camera until the focal length of the camera is equal to The second preset focal length; wherein, during the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, according to the target object in the position in the current image, adjusting the position and posture of the movable platform so that the position of the target object is located at a preset position in the picture taken by the camera device.
根据本公开的第三方面,提供一种可移动平台,包括:机体;动力系统,设于所述机体,所述动力系统用于为所述可移动平台提供动力;摄像装置,设于所述机体,用于采集图像;存储器;以及耦合到所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如上任一项所述的图像拍摄方法。According to a third aspect of the present disclosure, a movable platform is provided, including: a body; a power system provided on the body, and the power system is used to provide power for the movable platform; a camera device arranged on the A body for capturing images; a memory; and a processor coupled to the memory, the processor configured to execute the image capturing method as described in any one of the preceding items based on instructions stored in the memory.
根据本公开的第四方面,提供一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述任意一项所述的图像拍摄方法。According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the image capturing method described in any one of the above items is implemented.
本公开实施例通过在较短焦距定位目标对象,并不断调整可移动平台的位姿、增加焦距、重新定位目标对象,可以通过迭代对准过程不断实现对目标对象的对准,从而在无人控制的可移动平台进行自动拍摄时,使可移动平台克服给定位置不准(示教过程的控制误差)、强风等外力导致机身摇晃等问题,使可移动平台实现准确的无人自动拍摄。In the embodiment of the present disclosure, by locating the target object at a shorter focal length, continuously adjusting the pose of the movable platform, increasing the focal length, and repositioning the target object, the alignment of the target object can be continuously realized through an iterative alignment process. When the controlled movable platform is used for automatic shooting, the movable platform can overcome the problems of inaccurate given position (control error in the teaching process), strong wind and other external forces causing the fuselage to shake, so that the movable platform can realize accurate unmanned automatic shooting .
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure. Apparently, the drawings in the following description are only some embodiments of the present disclosure, and those skilled in the art can obtain other drawings according to these drawings without creative efforts.
图1是本公开示例性实施例中图像拍摄方法的流程图。FIG. 1 is a flowchart of an image capturing method in an exemplary embodiment of the present disclosure.
图2是本公开一个实施例中步骤S102的子流程图。Fig. 2 is a sub-flowchart of step S102 in an embodiment of the present disclosure.
图3是本公开一个实施例中步骤S104的子流程图。FIG. 3 is a sub-flowchart of step S104 in an embodiment of the present disclosure.
图4是本公开一个实施例中步骤S106的子流程图。FIG. 4 is a sub-flowchart of step S106 in an embodiment of the present disclosure.
图5是本公开一个实施例中图像拍摄方法的流程图。Fig. 5 is a flowchart of an image capture method in an embodiment of the present disclosure.
图6是本公开另一个实施例中图像拍摄方法的流程图。Fig. 6 is a flowchart of an image capture method in another embodiment of the present disclosure.
图7是本公开一个实施例中可移动平台的示意图。FIG. 7 is a schematic diagram of a movable platform in one embodiment of the present disclosure.
图8是本公开示例性实施例中一种图像拍摄设备的方框图。FIG. 8 is a block diagram of an image capturing device in an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details being omitted, or other methods, components, devices, steps, etc. may be adopted. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
此外,附图仅为本公开的示意性图解,图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。In addition, the drawings are only schematic illustrations of the present disclosure, the same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and/or processor means and/or microcontroller means.
下面结合附图对本公开示例实施方式进行详细说明。Exemplary implementations of the present disclosure will be described in detail below in conjunction with the accompanying drawings.
图1是本公开示例性实施例中图像拍摄方法的流程图。图1所示方法可以应用于可移动平台,可移动平台上搭载有摄像装置,可移动平台通过所述摄像装置采集图像。FIG. 1 is a flowchart of an image capturing method in an exemplary embodiment of the present disclosure. The method shown in FIG. 1 can be applied to a movable platform, where a camera is mounted on the movable platform, and images are collected by the movable platform through the camera.
参考图1,图像拍摄方法100可以包括:Referring to FIG. 1, an image capture method 100 may include:
步骤S102,在第一预设焦距采集第一目标图像,在所述第一目标图像中识别目标对象;Step S102, collecting a first target image at a first preset focal length, and identifying a target object in the first target image;
步骤S104,当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置;Step S104, when the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that the The position of the target object is located at a preset position in the picture taken by the camera device;
步骤S106,当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距;其中,在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。Step S106, when the target object cannot be identified in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the The focal length of the imaging device is equal to the second preset focal length; wherein, during the process of adjusting the focal length of the imaging device, when the target object is recognized according to the current image collected by the imaging device at any time, according to the The position of the target object in the current image, adjusting the position and posture of the movable platform, so that the position of the target object is located at a preset position in the picture taken by the camera device.
在本公开实施例中,可移动平台例如可以为无人飞行器(无人飞行器),摄像装置挂载在无人飞行器上。在一个实施例中,可移动平台还包括云台,云台挂载在无人飞行器上,摄像装置挂载在云台上。In the embodiment of the present disclosure, the movable platform may be, for example, an unmanned aerial vehicle (unmanned aerial vehicle), and the camera device is mounted on the unmanned aerial vehicle. In one embodiment, the movable platform further includes a pan-tilt, the pan-tilt is mounted on the UAV, and the camera device is mounted on the pan-tilt.
本公开实施例提供的方法可以应用在目标检测任务的复演阶段和目标追踪任务的追踪阶段,以对目标对象进行自动对焦、自动拍摄。The method provided by the embodiments of the present disclosure can be applied in the replay phase of the target detection task and the tracking phase of the target tracking task, so as to perform automatic focusing and automatic shooting on the target object.
目标检测任务的复演阶段是指通过在目标检测任务的示教阶段对可移动平台(例如无 人飞行器)进行人工操控,记录待检测目标(例如通讯基站、电塔)的拍摄位置、拍摄高度、焦距等,后续在复演阶段,可移动平台自动、定期按照该拍摄位置、拍摄高度、焦距对待检测目标进行拍摄,以实现对待检测目标的自动、定期监控,提高监控效率。The replay stage of the target detection task refers to manually controlling the movable platform (such as an unmanned aerial vehicle) during the teaching stage of the target detection task, and recording the shooting position and shooting height of the target to be detected (such as a communication base station, an electric tower) , focal length, etc. In the follow-up replay stage, the movable platform will automatically and regularly shoot the target to be detected according to the shooting position, shooting height, and focal length, so as to realize automatic and regular monitoring of the target to be detected and improve monitoring efficiency.
目标追踪任务是指给定待检测目标(如人物、动物、交通工具等可移动目标)的追踪范围,可移动平台(例如无人飞行器)自动对待检测目标进行追踪,以监控待检测目标的实时位置、观察待检测目标的动作、状态等。The target tracking task refers to the tracking range of a target to be detected (such as a person, an animal, a vehicle, etc.), and the movable platform (such as an unmanned aerial vehicle) automatically tracks the target to be detected to monitor the real-time detection of the target to be detected. position, observe the action and state of the target to be detected, etc.
无论是在目标检测任务的复演阶段还是目标追踪任务的追踪阶段,均需要对目标对象进行定位、对焦、拍摄。在一些情况下,由于可移动平台是在无人控制的情况下自动拍摄,容易导致预先输入的拍摄位置、拍摄高度、拍摄焦距等参数与实际情况出现偏差,或者,由强风、雨雪等天气因素导致机身晃动等问题,在无人干预的情况下,导致采集的图像中没有目标对象,或者仅采集到目标对象的部分影像、模糊影像等,造成无人自动拍摄任务的失败。Whether it is in the replay stage of the target detection task or the tracking stage of the target tracking task, it is necessary to locate, focus, and shoot the target object. In some cases, since the movable platform is automatically photographed without unmanned control, it is easy to cause the pre-input shooting position, shooting height, shooting focal length and other parameters to deviate from the actual situation, or due to strong wind, rain and snow, etc. Factors lead to problems such as body shaking. In the case of unmanned intervention, there is no target object in the collected image, or only part of the image of the target object is collected, blurred image, etc., resulting in the failure of the unmanned automatic shooting task.
以无人机电力巡检为例:巡检需要定期查看电塔关键部件的安全情况,所以需要定期反复进行巡检,因此自动化巡检可以大大提高效率和准确度。自动化电力巡检可分为示教模式和复演模式。示教模式是全人为或者半自动化操作,进行正常的电力巡检任务,过程中每个航点会记录飞机、云台在每一个拍照(录像)点的姿态等数据。复演模式进行全自动飞行。根据在示教模式存储的航点数据,飞机会依次飞到各个航点,并根据航点数据调整云台姿势,拍摄对应照片/视频。Take UAV power inspection as an example: inspection needs to regularly check the safety of key components of the tower, so regular and repeated inspections are required, so automated inspections can greatly improve efficiency and accuracy. Automatic power inspection can be divided into teaching mode and replay mode. The teaching mode is fully manual or semi-automatic operation, and performs normal power inspection tasks. During the process, each waypoint will record data such as the attitude of the aircraft and the gimbal at each photo (video) point. Repeat mode for fully automatic flight. According to the waypoint data stored in the teaching mode, the aircraft will fly to each waypoint in turn, adjust the gimbal posture according to the waypoint data, and take corresponding photos/videos.
在现有的巡检方案中,复演主要遵循目标检测流程,即仅对目标进行一次检测,然后直接调整云台位姿和相机焦距对目标进行拍摄。然而实际工作时,这一控制流程耗费较长时间,若在此过程中云台控制出现较大累计偏差或因风力过大等外力因素机身出现明显晃动,加上长焦对控制偏差和机身晃动较敏感,最终拍摄结果目标可能明显偏离画面中央甚至不在画面中。即,现有示教/复飞巡检方案无法解决云台控制偏差问题以及强风等因素造成的机身晃动问题。因此,云台增稳对目标拍摄的可靠性具有重要作用。In the existing inspection scheme, the replay mainly follows the target detection process, that is, the target is detected only once, and then the gimbal pose and camera focal length are directly adjusted to shoot the target. However, in actual work, this control process takes a long time. If there is a large cumulative deviation in the gimbal control during the process, or the fuselage shakes obviously due to external factors such as excessive wind, plus the telephoto control deviation and the machine The camera is more sensitive to body shake, and the target in the final shooting result may be obviously deviated from the center of the screen or even not in the screen. That is to say, the existing teaching/go-around inspection scheme cannot solve the problem of gimbal control deviation and the shaking of the fuselage caused by factors such as strong wind. Therefore, gimbal stabilization plays an important role in the reliability of target shooting.
本公开实施例在复演时先在低倍率焦距下使用特征点匹配方法检测巡检目标在画面中的精准位置作为精准拍照初始化框,而后在调整云台姿态和变焦的同时,利用目标跟踪算法跟踪目标在画面中的位置,并即时修正云台控制使目标始终保持在画面中央,实现目标的云台跟踪,达到云台增稳的效果。当变焦完成且目标保持在画面中央时对目标进行拍摄,完成对巡检目标的精准拍摄流程。小焦距下搜索目标、对目标进行云台跟踪然后大焦距拍摄目标的过程使得飞机可以在较远距离下稳定、准确并清楚地拍摄到目标细节,实现良好的巡检效果。The embodiments of the present disclosure first use the feature point matching method to detect the precise position of the inspection target in the screen at low magnification focal length as the initialization frame for precise photography during replay, and then use the target tracking algorithm while adjusting the pan/tilt attitude and zoom Track the position of the target in the screen, and correct the gimbal control in real time to keep the target in the center of the screen, realize the gimbal tracking of the target, and achieve the effect of gimbal stabilization. When the zoom is completed and the target is kept in the center of the screen, the target is shot, and the precise shooting process of the inspection target is completed. The process of searching for the target at a small focal length, tracking the target with the gimbal, and then shooting the target with a large focal length enables the aircraft to capture the details of the target stably, accurately and clearly at a relatively long distance, achieving a good inspection effect.
下面,对图像拍摄方法100的各步骤进行详细说明。Next, each step of the image capturing method 100 will be described in detail.
在步骤S102,在第一预设焦距采集第一目标图像,在所述第一目标图像中识别目标对象。In step S102, a first target image is captured at a first preset focal length, and a target object is identified in the first target image.
在本公开实施例中,当图像拍摄方法100应用于目标检测任务的复演阶段时,第二预 设焦距以及采集第一目标图像时可移动平台的位置和姿态均根据目标检测任务的示教阶段的示教数据得到。当图像拍摄方法100应用于目标追踪任务的追踪阶段时,第一预设焦距可以根据目标追踪任务的追踪范围得到。In the embodiment of the present disclosure, when the image capture method 100 is applied to the replay stage of the target detection task, the second preset focal length and the position and posture of the movable platform when capturing the first target image are all based on the teaching of the target detection task Phase teaching data are obtained. When the image capture method 100 is applied to the tracking phase of the target tracking task, the first preset focal length can be obtained according to the tracking range of the target tracking task.
当本公开实施例的方法应用在复演阶段时,第一预设预设焦距可以为比示教阶段设置的用于拍摄的第二预设焦距更小的焦距,以通过较小的焦距获得更大的拍摄视野,方便对目标对象进行实时定位。采集第一目标图像时可移动平台的位置(包括经纬度和高度)和姿态(包括镜头朝向)均根据示教阶段的示教数据得到。When the method of the embodiment of the present disclosure is applied in the replay stage, the first preset preset focal length may be a focal length shorter than the second preset focal length for shooting set in the teaching stage, so as to obtain Larger shooting field of view, convenient for real-time positioning of target objects. The position (including latitude and longitude and altitude) and posture (including lens orientation) of the movable platform when the first target image is collected are obtained according to the teaching data in the teaching phase.
当本公开实施例的方法应用在追踪阶段时,第一预设焦距可以根据目标追踪任务的追踪范围得到,拍摄时可移动平台的位置和姿态也可以根据目标追踪任务的追踪范围得到。例如,在一个实施例中,当设置要追踪的目标对象在A点、拍摄高度在距离目标对象x米以上以防止被目标对象发现时(x为大于零的数值),可以根据x的数值,在保证尽可能大的拍摄视角下计算出第一预设焦距,从而在以A点为中心的、可移动平台能够实现的最大视角下采集第一目标图像,通过第一目标图像对目标对象重新定位,以防止目标对象的定位不准确,或者目标对象在信息传递和可移动平台就位的过程中发生移动。When the method of the embodiment of the present disclosure is applied in the tracking phase, the first preset focal length can be obtained according to the tracking range of the target tracking task, and the position and posture of the movable platform during shooting can also be obtained according to the tracking range of the target tracking task. For example, in one embodiment, when the target object to be tracked is set at point A, and the shooting height is more than x meters away from the target object to prevent being discovered by the target object (x is a value greater than zero), according to the value of x, Calculate the first preset focal length while ensuring a shooting angle of view as large as possible, so as to collect the first target image at the maximum angle of view that can be realized by the movable platform centered on point A, and reconstruct the target object through the first target image Positioning to prevent inaccurate positioning of the target object or movement of the target object during the transfer of information and positioning of the movable platform.
图2是本公开一个实施例中步骤S102的子流程图。Fig. 2 is a sub-flowchart of step S102 in an embodiment of the present disclosure.
参考图2,在一个实施例中,步骤S102可以包括:Referring to FIG. 2, in one embodiment, step S102 may include:
步骤S1021,根据所述目标对象的标准特征图像获取所述目标对象的特征点;Step S1021, acquiring the feature points of the target object according to the standard feature image of the target object;
步骤S1022,根据所述目标对象的特征点在所述第一目标图像中进行特征点识别,以确定所述目标对象的定位框。Step S1022, performing feature point recognition in the first target image according to the feature points of the target object, so as to determine a positioning frame of the target object.
可以预先根据目标对象的标准特征图像获取目标对象的特征点。在目标检测任务的复演阶段,可以根据示教阶段提供的目标对象的标准特征图像来提取目标对象的特征点;在目标追踪任务的追踪阶段,可以根据目标追踪任务给定的目标对象的标准特征图像来提取目标对象的特征点。The feature points of the target object can be obtained in advance according to the standard feature image of the target object. In the replay stage of the target detection task, the feature points of the target object can be extracted according to the standard feature image of the target object provided in the teaching stage; feature image to extract feature points of the target object.
在本公开实施例中,可以使用卷积神经网络对当前图像进行局部特征点提取,将提取出的局部特征点与目标对象的特征点进行比对,以识别目标对象。In an embodiment of the present disclosure, a convolutional neural network may be used to extract local feature points from the current image, and the extracted local feature points are compared with feature points of the target object to identify the target object.
在图2所示实施例中,可以通过经过训练的神经网络模型在当前图像中识别目标对象。该神经网络模型例如可以为卷积神经网络模型(Convolutional Neural NetworkS1,CNN)。基于CNN的可学习性,利用CNN提取特征点可以更好得应对电塔绝缘子等局部无纹理、纹理不丰富或具有重复纹理特性的目标对象,准确获得目标对象的位置。通过使用CNN模型进行局部特征点匹配,相较传统的基于图像块的目标识别方法可以更好地应对不规则形状目标,减少背景匹配导致的误检问题。In the embodiment shown in FIG. 2 , the target object can be identified in the current image through the trained neural network model. The neural network model may be, for example, a convolutional neural network model (Convolutional Neural Network S1, CNN). Based on the learnability of CNN, using CNN to extract feature points can better deal with target objects such as tower insulators that have no local texture, not rich in texture, or have repeated texture characteristics, and accurately obtain the position of the target object. By using the CNN model for local feature point matching, compared with the traditional image block-based target recognition method, it can better deal with irregularly shaped targets and reduce the false detection problem caused by background matching.
在本公开的其他实施例中,还可以使用图像块检测方法对目标对象进行识别,或者,尺度不变特征转换(Scale-invariant feature transform,SIFT)算法、加速稳健特征(Speeded Up Robust Features,SURF)算法、快速特征点提取和描述(Oriented FAST and Rotated BRIEF,ORB)算法等目标识别算法,或者通过多种深度学习算法进行目标检测,本公开对此不作 特殊限制。In other embodiments of the present disclosure, the image block detection method may also be used to identify the target object, or the scale-invariant feature transform (Scale-invariant feature transform, SIFT) algorithm, Speeded Up Robust Features (Speeded Up Robust Features, SURF ) algorithm, fast feature point extraction and description (Oriented FAST and Rotated BRIEF, ORB) algorithm and other target recognition algorithms, or through multiple deep learning algorithms for target detection, this disclosure does not make special restrictions on this.
在一个实施中,可以从第一目标图像的中心点开始进行特征点识别。由于采集第一目标图像时,是假设当前位姿能够准确采集到目标对象的图像,即假设目标对象位于第一目标图像的中央,因此,从第一目标图像的中心点开始进行特征点识别可以提高识别效率。In one implementation, feature point recognition can be performed starting from the center point of the first target image. When collecting the first target image, it is assumed that the current pose can accurately capture the image of the target object, that is, it is assumed that the target object is located in the center of the first target image, therefore, starting from the center point of the first target image for feature point recognition can Improve recognition efficiency.
在步骤S104,当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。In step S104, when the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that The position of the target object is located at a preset position in the picture taken by the camera device.
该预设位置例如可以包括拍摄画面的中心区域,中心区域例如可以为拍摄图像的中心点四周预设长宽范围内的一个较小的区域,形状例如为矩形或圆形。The preset position may include, for example, a central area of the captured image, and the central area may be, for example, a smaller area within a preset length and width around the central point of the captured image, and its shape may be, for example, a rectangle or a circle.
图3是本公开一个实施例中步骤S104的子流程图。FIG. 3 is a sub-flowchart of step S104 in an embodiment of the present disclosure.
参考图3,在一个实施例中,步骤S104可以包括:Referring to FIG. 3, in one embodiment, step S104 may include:
步骤S1041,以第一目标图像的中心为坐标原点,在第一目标图像中确定目标对象的第一坐标;Step S1041, taking the center of the first target image as the coordinate origin, and determining the first coordinates of the target object in the first target image;
步骤S1042,根据第一坐标确定可移动平台的位置和姿态调节值,位置和姿态调节值包括水平调节值、垂直调节值、旋转角度调节值中的至少一种;Step S1042, determining the position and attitude adjustment values of the movable platform according to the first coordinates, where the position and attitude adjustment values include at least one of a horizontal adjustment value, a vertical adjustment value, and a rotation angle adjustment value;
步骤S1043,根据位置和姿态调节值调节可移动平台的位置和姿态。Step S1043, adjusting the position and attitude of the movable platform according to the position and attitude adjustment value.
当使用局部特征点比对方法在第一目标图像中识别目标对象时,可以获得目标对象的识别框,并以第一目标图像的中心为坐标源点,将该识别框在第一目标图像中的坐标确定为目标对象的坐标,以确定目标对象的第一坐标。When the local feature point comparison method is used to identify the target object in the first target image, the recognition frame of the target object can be obtained, and the center of the first target image is used as the coordinate source point, and the recognition frame is placed in the first target image The coordinates of are determined as the coordinates of the target object, so as to determine the first coordinates of the target object.
接下来,可以根据第一坐标确定可移动平台的位置和姿态调节值。例如,当第一坐标为(-50,10)的情况下,可以控制可移动平台向X轴的正方向移动50个坐标单位,向Y轴的负方向移动10个坐标单位,以使目标对象与坐标原点即第一目标图像的中心重合,使目标图像位于下一帧图像的中心位置。坐标单位与可移动平台的比例关系可以根据当前坐标系使用的比例尺来确定,该比例尺可以根据可移动平台的飞行高度或者可移动平台与目标对象的距离来确定,本公开对此不作特殊限制。Next, position and attitude adjustment values of the movable platform can be determined according to the first coordinates. For example, when the first coordinate is (-50, 10), the movable platform can be controlled to move 50 coordinate units in the positive direction of the X axis and 10 coordinate units in the negative direction of the Y axis, so that the target object Coincide with the coordinate origin, that is, the center of the first target image, so that the target image is located at the center of the next frame image. The proportional relationship between the coordinate unit and the movable platform can be determined according to the scale used in the current coordinate system. The scale can be determined according to the flying height of the movable platform or the distance between the movable platform and the target object, which is not particularly limited in the present disclosure.
除了调整水平调节值、垂直调节值,在一个实施例中,还可以调节可移动平台的拍摄角度,即控制可移动平台的旋转角度,以尽可能拍摄到目标对象的目标面,例如电塔设置有关键设施的一面、追踪目标的面部等。可移动平台的旋转角度调节值可以根据对目标对象的特征识别结果来判断,以确定当前拍摄的目标对象的侧面与想要拍摄的标准侧面之间的角度差等,再根据当前坐标系的比例尺和该角度差,换算得到可移动平台的旋转角度调节值。In addition to adjusting the horizontal adjustment value and vertical adjustment value, in one embodiment, the shooting angle of the movable platform can also be adjusted, that is, the rotation angle of the movable platform can be controlled, so as to capture the target surface of the target object as much as possible, such as the setting of the electric tower There is a side of a key facility, the face of a tracking target, etc. The adjustment value of the rotation angle of the movable platform can be judged according to the feature recognition results of the target object to determine the angle difference between the side of the target object currently photographed and the standard side to be photographed, etc., and then according to the scale of the current coordinate system and the angle difference to obtain the adjustment value of the rotation angle of the movable platform.
在另一个实施例中,还可以确定可移动平台距离目标对象的距离调节值。例如,当无人飞行器对目标对象进行俯拍时,受到强风影响导致机身的飞行高度变高,此时目标对象在当前图像中的识别框相比示教阶段或者预设的识别框尺寸变小,可以根据设定的飞行高度重新调整可移动平台的飞行高度,或者根据识别框的大小与预设的识别框标准值之间的 比例关系换算得到距离调整值,控制无人飞行器靠近或者远离目标对象。可移动平台的位置和姿态调整值的种类可以有多种,本领域技术人员可以根据实际情况自行设置。In another embodiment, an adjustment value of the distance between the movable platform and the target object may also be determined. For example, when an unmanned aerial vehicle takes a bird's-eye view of a target object, the flying height of the fuselage becomes higher due to the influence of strong winds. At this time, the recognition frame of the target object in the current image is smaller than the size of the recognition frame during the teaching stage or the preset recognition frame. Small, the flying height of the movable platform can be readjusted according to the set flying height, or the distance adjustment value can be converted according to the proportional relationship between the size of the recognition frame and the preset standard value of the recognition frame, and the UAV can be controlled to approach or stay away target. There are many types of position and attitude adjustment values of the movable platform, and those skilled in the art can set them by themselves according to the actual situation.
当摄像装置直接架设在可移动平台上时,可以控制可移动平台调整位置和姿态,以使摄像装置的拍摄中心对准目标对象。当摄像装置假设在可移动平台的云台上时,可以通过调节云台的位置和姿态,使摄像装置的拍摄中心对准目标对象。When the camera device is directly erected on the movable platform, the movable platform can be controlled to adjust its position and attitude so that the shooting center of the camera device is aligned with the target object. When the camera is assumed to be on the pan/tilt of the movable platform, the shooting center of the camera can be aligned with the target object by adjusting the position and attitude of the pan/tilt.
对可移动平台进行位姿调节后,默认当前拍摄中心已经对准目标对象,可以将焦距调整为第二预设焦距,以对目标对象进行拍摄。After adjusting the pose of the movable platform, the current shooting center has been aligned with the target object by default, and the focal length can be adjusted to the second preset focal length to shoot the target object.
第二预设焦距为能够准确观察到目标对象的预设焦距值。在复演阶段,第二预设焦距例如可以为示教阶段设置的理想拍摄焦距;在追踪阶段,第二预设焦距例如为预设的追踪拍摄焦距值。The second preset focal length is a preset focal length value at which the target object can be accurately observed. In the replay stage, the second preset focal length may be, for example, an ideal shooting focal length set in the teaching stage; in the tracking stage, the second preset focal length may be, for example, a preset tracking shooting focal length value.
在本公开实施例中,在根据目标对象在第一目标图像中的位置,调节可移动平台的位置和姿态的过程中,持续跟踪目标对象,以使目标对象持续在摄像装置拍摄到的画面中。In the embodiment of the present disclosure, during the process of adjusting the position and posture of the movable platform according to the position of the target object in the first target image, the target object is continuously tracked so that the target object continues to be in the picture captured by the camera device .
在一个实施例中,也可以设置在目标对象位于当前图像的中心区域时,不进行位姿调节,直接将焦距调整为第二预设焦距并拍摄,以降低计算量,提高计算效率。In one embodiment, it can also be set that when the target object is located in the central area of the current image, no pose adjustment is performed, and the focal length is directly adjusted to the second preset focal length for shooting, so as to reduce the calculation amount and improve the calculation efficiency.
在步骤S106,当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距。其中,在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。In step S106, when the target object cannot be recognized in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the The focal length of the camera device is equal to the second preset focal length. Wherein, during the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, according to the position of the target object in the current image, The position and posture of the movable platform are adjusted so that the position of the target object is located at a preset position in the picture taken by the camera device.
在本公开实施例中,连续增大所述摄像装置的焦距包括:以预设步长连续增大所述摄像装置的焦距。In an embodiment of the present disclosure, continuously increasing the focal length of the imaging device includes: continuously increasing the focal length of the imaging device with a preset step size.
步骤S106中的摄像装置采集到的当前图像并非拍摄的图像,而是摄像装置实时视野的缓存数据。该当前图像用以辅助图像识别和位置分析,在较短时间内即被删除。因此,当本公开实施例通过处理器执行时,处理器实时获取到该当前图像并对该当前图像进行分析,识别目标对象,以根据目标对象在当前图像中的位置在连续变焦的同时调节可移动平台的位姿,使目标对象位于摄像装置拍摄画面中的预设位置,该预设位置例如为中心区域。中心区域例如可以为当前图像的中心点四周预设长宽范围内的一个较小的区域,形状例如为矩形或圆形。The current image collected by the camera device in step S106 is not the captured image, but the cached data of the real-time field of view of the camera device. The current image is used to assist image recognition and location analysis, and is deleted within a short period of time. Therefore, when the embodiment of the present disclosure is executed by the processor, the processor acquires the current image in real time and analyzes the current image to identify the target object, so as to adjust the zoom while continuously zooming according to the position of the target object in the current image. The pose of the mobile platform is such that the target object is located at a preset position in the image captured by the camera device, and the preset position is, for example, a central area. The central area may be, for example, a smaller area within a preset length and width range around the central point of the current image, and its shape is, for example, a rectangle or a circle.
图4是本公开一个实施例中步骤S106的子流程图。FIG. 4 is a sub-flowchart of step S106 in an embodiment of the present disclosure.
参考图4,在一个实施例中,步骤S106可以包括:Referring to FIG. 4, in one embodiment, step S106 may include:
步骤S1061,根据所述目标对象的标准特征图像获取所述目标对象的特征点;Step S1061, acquiring feature points of the target object according to the standard feature image of the target object;
步骤S1061,根据所述目标对象的特征点在所述摄像装置采集到的当前图像中进行特征点识别,以确定所述目标对象的定位框。Step S1061, performing feature point recognition in the current image collected by the camera device according to the feature points of the target object, so as to determine a positioning frame of the target object.
在步骤S106识别目标对象的过程与在步骤S104识别目标对象的过程相似,均可以 基于卷积神经网络(CNN)等多种算法进行特征点识别,于此不再赘述。The process of identifying the target object in step S106 is similar to the process of identifying the target object in step S104, both of which can perform feature point identification based on various algorithms such as convolutional neural network (CNN), and will not be repeated here.
在进行特征识别时,也可以从当前图像的中心点开始进行特征点识别,提高识别效率。从当前图像的中心点开始进行特征点识别可以表现为在上一帧图像的识别框位置附近进行识别,以确定当前图像中目标对象的识别框。When performing feature recognition, feature point recognition can also be performed from the center point of the current image to improve recognition efficiency. Recognition of feature points starting from the center point of the current image can be represented as recognition near the position of the recognition frame of the previous frame image, so as to determine the recognition frame of the target object in the current image.
在一个实施例中,在步骤S1061,也可以根据上一帧图像中目标对象的识别框中的图像特征获取目标对象的特征点,以基于最近的信息提高目标对象的信息准确度,提高识别准确率。In one embodiment, in step S1061, the feature points of the target object can also be obtained according to the image features in the recognition frame of the target object in the previous frame image, so as to improve the information accuracy of the target object based on the latest information and improve the recognition accuracy Rate.
本公开提出的基于特征匹配定位目标和云台跟踪的鲁棒自动化巡检方案,可以解决针对例如电塔等目标的自动化精准定位和稳定拍摄问题。为了克服云台位置调整和变焦的时间里云台控制误差或强风带来的拍摄偏差问题,首先利用精准拍照目标匹配框作为初始化框对目标进行云台跟踪,克服云台控制和变焦过程中的偏差,达到云台增稳的效果,从而使控制过程中目标始终保持在画面中央,直到变焦结束拍摄到完整、清晰的巡检目标。相比于传统的目标检测方法,本发明基于CNN提取局部特征用于特征能更好地适应局部无纹理或重复纹理的情况。The robust automatic inspection solution based on feature matching to locate targets and pan-tilt tracking proposed in this disclosure can solve the problems of automatic precise positioning and stable shooting of targets such as electric towers. In order to overcome the problem of gimbal control error or shooting deviation caused by strong wind during the time of gimbal position adjustment and zooming, first use the precise photo target matching frame as the initialization frame to track the gimbal to overcome the gimbal control and zooming process. Deviation, to achieve the effect of gimbal stabilization, so that the target is always kept in the center of the screen during the control process, until the zoom ends to capture a complete and clear inspection target. Compared with the traditional target detection method, the present invention extracts local features based on CNN for features that can better adapt to the situation of local non-texture or repeated texture.
本公开实施例提出的方法,基于局部特征匹配定位目标获取精准拍照的初始化框,再结合目标的云台跟踪方法,实现复演过程中的云台增稳,最终达到精准、鲁棒的巡检目标拍摄效果,可用于解决自动巡检过程中由于相机(飞机)定位、云台控制不够精准或者由于相机(飞机)强风等外力因素造机身晃动,导致的目标不在画面中央或视野内的问题,可以应用于具备巡检功能的行业无人机。The method proposed in the embodiment of the present disclosure obtains the initialization frame for accurate photography based on local feature matching and positioning the target, and then combines the target pan-tilt tracking method to realize the stabilization of the pan-tilt during the replay process, and finally achieves accurate and robust inspection. The target shooting effect can be used to solve the problem that the target is not in the center of the screen or in the field of view during the automatic inspection process due to camera (aircraft) positioning, gimbal control is not accurate enough, or the camera (aircraft) shakes due to external factors such as strong wind , can be applied to industrial drones with inspection functions.
本公开实施例提出的结合精准拍照初始化框和云台跟踪的云台增稳巡检方案,是一种闭环控制的自动巡检方案。当复演拍摄巡检目标时,先利用特征点匹配方法获取在短焦画面内的目标框作为对巡检目标精准拍照的初始化框,然后再利用目标跟踪方法对该目标进行云台跟踪,以抵抗云台位姿调整和变焦过程中可能出现的累积控制误差或强风等外力造成的偏差。The pan-tilt stabilization inspection solution proposed in the embodiment of the present disclosure, which combines the precise camera initialization frame and the pan-tilt tracking, is an automatic inspection solution with closed-loop control. When replaying the inspection target, first use the feature point matching method to obtain the target frame in the short-focus picture as the initialization frame for accurate photography of the inspection target, and then use the target tracking method to track the target with the pan/tilt to Resist the accumulative control errors that may occur during the gimbal pose adjustment and zooming process or the deviation caused by external forces such as strong winds.
图5是本公开一个实施例中图像拍摄方法的流程图。Fig. 5 is a flowchart of an image capture method in an embodiment of the present disclosure.
参考图5,图像拍摄方法500可以包括:Referring to FIG. 5, an image capturing method 500 may include:
步骤S501,短焦拍摄复演图像;Step S501, short-focus shooting replay image;
步骤S502,通过CNN算法识别目标对象;Step S502, identifying the target object through the CNN algorithm;
步骤S503,提取目标对象的特征点和描述子;Step S503, extracting feature points and descriptors of the target object;
同时,在步骤S501’获取目标示教图;Simultaneously, in step S501 ' obtain target teaching figure;
在步骤S502’通过CNN算法识别目标对象;Identify target object by CNN algorithm in step S502';
在步骤S503’提取目标对象的特征点和描述子;Feature points and descriptors of the target object are extracted in step S503';
接下来,Next,
在步骤S504,特征点匹配;In step S504, the feature points are matched;
步骤S505,计算短焦复拍图目标框;Step S505, calculating the target frame of the short-focus composite image;
步骤S506,调整云台位姿和变焦;Step S506, adjusting the pose and zoom of the gimbal;
步骤S507,跟踪;Step S507, tracking;
步骤S508,判断变焦和控制是否结束,如果是,进入步骤S509使用长焦拍摄巡检目标然后结束流程,如果是,返回步骤S506重新调整云台位姿和变焦。Step S508, determine whether the zooming and control are over, if yes, go to step S509 to use telephoto to shoot the inspection target and then end the process, if yes, return to step S506 to readjust the pan/tilt pose and zoom.
在步骤S501,短焦拍摄复演图像是指在第一预设焦距下采集图像,属于对目标对象的实时观察。在步骤S501’,通过示教数据获得目标对象的示教图像,即目标示教图。In step S501 , short-focus shooting of replay images refers to capturing images at a first preset focal length, which belongs to real-time observation of a target object. In step S501', the teaching image of the target object, that is, the target teaching map is obtained through the teaching data.
在步骤S502、S503和步骤S502’、S503’,利用CNN算法分别在两张图片(复演图像和示教图)中识别目标对象并提取两张图片中的目标对象的特征点和描述子。In steps S502, S503 and steps S502', S503', the CNN algorithm is used to identify the target object in two pictures (replay image and teaching picture) and extract the feature points and descriptors of the target object in the two pictures.
其中,基于CNN的可学习性,利用CNN提取特征点可以更好得应对电塔绝缘子等纹理不丰富或具有重复纹理特性的目标。而局部特征点匹配的目标定位方法较基于图像块的方法可以更好地应对不规则形状目标,减少背景匹配导致的误检问题。其中,特征点匹配可以使用局部特征提取方法,也可以使用传统方法,包括但不限于SIFT、SURF、ORB算法等。Among them, based on the learnability of CNN, using CNN to extract feature points can better deal with objects such as tower insulators that are not rich in texture or have repetitive texture characteristics. Compared with the method based on image blocks, the target positioning method based on local feature point matching can better deal with irregular shape targets and reduce the false detection problem caused by background matching. Among them, the feature point matching can use local feature extraction methods, or traditional methods, including but not limited to SIFT, SURF, ORB algorithms, etc.
在步骤S504,对两张图片中提取的特征点和描述子进行特征点匹配,以根据匹配结果在步骤S505计算短焦复拍图像中的目标框,也称为提取初始化框。初始化框获取方法可替换为基于图像块的检测方法,不限于传统方法或深度学习方法。In step S504, feature point matching is performed on the feature points and descriptors extracted from the two pictures, so as to calculate the target frame in the short-focus reshot image in step S505 according to the matching result, which is also called extraction initialization frame. The initialization box acquisition method can be replaced by an image patch-based detection method, which is not limited to traditional methods or deep learning methods.
在步骤S506~步骤S508是循环迭代调整云台位姿的过程。Steps S506 to S508 are a process of cyclically and iteratively adjusting the pose of the pan/tilt.
在步骤S506,变焦是指连续增大焦距,例如可以为根据预设补偿增大焦距;调整云台位姿例如为在水平方向、垂直方向、偏转角度等参数上调整云台位姿,以调整拍摄角度。调整云台位姿和变焦可以同时进行,同时摄像装置持续采集实时图像。In step S506, zooming refers to continuously increasing the focal length, such as increasing the focal length according to preset compensation; adjusting the pan-tilt pose, for example, adjusting the pan-tilt pose on parameters such as the horizontal direction, vertical direction, and deflection angle, to adjust Filming angle. Adjusting the pose of the gimbal and zooming can be performed simultaneously, while the camera device continues to collect real-time images.
在步骤S506,根据摄像装置持续采集的图像,以及在图像中对目标对象的位置识别结果在步骤S507进行目标跟踪。目标跟踪可直接用本发明获取初始化框的特征点匹配方法完成,即对每一帧(或间隔若干帧)用特征点匹配方法更新目标框位置。云台跟踪(track)时,可以先在上一帧目标框内提取特征,然后在当前帧的旧框位置附近进行特征搜索和匹配,更新目标框位置,并控制云台使得画目标保持在画面中央,达到云台增稳效果,迭代此过程直到变焦和控制结束。变焦和控制结束的依据为达到预定焦距且目标框仍然在画面中央,此时拍摄目标即完成整个具有云台效果的对巡检目标精准复拍。In step S506, target tracking is performed in step S507 according to the images continuously collected by the camera device and the position recognition results of the target object in the images. The target tracking can be directly completed by the feature point matching method of the present invention to obtain the initialization frame, that is, for each frame (or several frames at intervals), the feature point matching method is used to update the position of the target frame. When the gimbal is tracking (track), you can first extract features in the target frame of the previous frame, then perform feature search and matching near the old frame position of the current frame, update the target frame position, and control the gimbal so that the drawn target remains on the screen Center, to achieve the effect of gimbal stabilization, iterate this process until the end of the zoom and control. The basis for the end of zooming and control is to reach the predetermined focal length and the target frame is still in the center of the screen. At this time, the shooting target has completed the entire accurate reshooting of the inspection target with the effect of the pan-tilt.
在步骤S508判断变焦和控制结束后,进入步骤S509使用长焦(第二预设焦距)拍摄巡检目标然后结束流程。After step S508 judges that the zooming and control are finished, go to step S509 to use the telephoto (the second preset focal length) to photograph the inspection target and then end the process.
本公开实施例利用基于CNN的特征点检测方法获取精准拍照初始化框,并且利用目标的云台跟踪方法进行云台增稳,实现巡检目标拍摄的闭环控制,克服变焦和云台位姿调整过程中因本身的云台控制误差和强风等外力因素造成的拍摄偏差,至少具有以下优点:The embodiments of the present disclosure use the CNN-based feature point detection method to obtain an accurate photo initialization frame, and use the target pan-tilt tracking method to stabilize the pan-tilt, realize the closed-loop control of the inspection target shooting, and overcome the process of zooming and pan-tilt pose adjustment The shooting deviation caused by external factors such as the cloud platform control error and strong wind has at least the following advantages:
1.基于CNN的可学习性,CNN提取局部特征能更好地适应局部无纹理或重复纹理的情况,准确获得目标框位置;1. Based on the learnability of CNN, the local features extracted by CNN can better adapt to the situation of local no texture or repeated texture, and accurately obtain the position of the target frame;
2.相比于一次目标检测直接控制云台位姿和变焦的拍摄方式,利用云台目标跟踪使在 整个控制过程中目标始终保持在画面较为中央的位置,可以更好地应对云台控制或强风等外力造成的目标拍摄偏差甚至丢失目标。2. Compared with the shooting method of directly controlling the pose and zoom of the gimbal with one target detection, using gimbal target tracking to keep the target in the center of the screen during the entire control process can better deal with gimbal control or Target shooting deviation or even loss of target caused by strong wind and other external forces.
图6是本公开另一个实施例中图像拍摄方法的流程图。Fig. 6 is a flowchart of an image capture method in another embodiment of the present disclosure.
参考图6,在一个实施例中,图像拍摄方法的完整过程可以包括:Referring to FIG. 6, in one embodiment, the complete process of the image capturing method may include:
步骤S601,在第一预设焦距获取第一图像,将第一图像被配置为当前图像,将第一预设焦距被配置为当前焦距。Step S601, acquiring a first image at a first preset focal length, configuring the first image as a current image, and configuring the first preset focal length as a current focal length.
步骤S602,在当前图像中识别目标对象。Step S602, identifying the target object in the current image.
步骤S603,判断是否识别到目标对象,如果识别到目标对象,进入步骤S604,否则进入步骤S613。Step S603, judging whether the target object is recognized, if the target object is recognized, go to step S604, otherwise go to step S613.
步骤S604,根据当前图像中目标对象的识别结果更新目标对象的当前特征点。Step S604, updating the current feature points of the target object according to the recognition result of the target object in the current image.
步骤S605,判断目标对象是否位于当前图像的中心,如果是,则进入步骤S606根据目标对象与当前图像的中心的坐标差值调整位姿,然后进入步骤S607;如果否,直接进入步骤S607。Step S605, determine whether the target object is located in the center of the current image, if yes, proceed to step S606 to adjust the pose according to the coordinate difference between the target object and the center of the current image, and then proceed to step S607; if not, directly proceed to step S607.
步骤S607,判断当前焦距是否等于第二预设焦距,如果等于第二预设焦距,进入步骤S608;否则,进入步骤S608,增大当前焦距,获取第二图像,将第二图像被配置为当前图像,返回步骤S602。Step S607, judge whether the current focal length is equal to the second preset focal length, if it is equal to the second preset focal length, go to step S608; otherwise, go to step S608, increase the current focal length, acquire a second image, and configure the second image as the current image, return to step S602.
步骤S609,获取第三图像,将第三图像被配置为当前图像。Step S609, acquiring a third image, and configuring the third image as a current image.
步骤S610,判断目标对象是否位于当前图像的中心,如果否,进入步骤S611根据目标对象与当前图像的中心的坐标差值调整位姿后,返回步骤S609,直至目标对象位于当前图像的中心;如果是,进入步骤S612对目标对象进行拍摄。Step S610, judge whether the target object is located in the center of the current image, if not, proceed to step S611 to adjust the pose according to the coordinate difference between the target object and the center of the current image, and return to step S609 until the target object is located in the center of the current image; if If yes, go to step S612 to shoot the target object.
步骤S613,如果未在当前图像中识别出目标对象,判断当前焦距是否等于第三预设焦距,如果否,进入步骤S614,减小当前焦距,获取第四图像,将第四图像被配置为当前图像,然后返回步骤S602;如果是,进入步骤S615输出识别失败信息。Step S613, if the target object is not identified in the current image, judge whether the current focal length is equal to the third preset focal length, if not, enter step S614, reduce the current focal length, obtain the fourth image, and configure the fourth image as the current image, and then return to step S602; if yes, proceed to step S615 to output recognition failure information.
在图6所示实施例中,步骤S601~S608是在第一图像中直接能够识别到目标对象时的迭代变焦方法。在步骤S601中,当前图像是一个参数,并非唯一的图像,它可以被赋值从而在不同时刻等于不同的图像;当前焦距同理,也是一个参数,并非唯一的值,它也可以被赋值从而在不同时刻等于不同的焦距值。In the embodiment shown in FIG. 6 , steps S601 to S608 are an iterative zooming method when the target object can be directly recognized in the first image. In step S601, the current image is a parameter, not the only image, and it can be assigned a value so as to be equal to different images at different times; the current focal length is also a parameter, not the only value, and it can also be assigned a value so that Different moments equal different focal length values.
步骤S602、S603中识别目标对象的方法如上述实施例所述,于此不再赘述。The method for identifying the target object in steps S602 and S603 is as described in the above-mentioned embodiment, and will not be repeated here.
在步骤S604,目标对象的当前特征点是一个参数,在当前图像等于第一图像时,目标对象的当前特征点等于示教图像中的目标对象的特征点,在当前图像等于其他图像时,尚未更新的目标对象的当前特征点等于上一帧图像中识别到的目标对象的特征点。因此,在步骤S604实时根据识别到的目标对象的特征点更新目标对象的特征点这个参数,可以保持目标对象的特征点是基于最新识别数据得到的,可以减少示教数据与实时情况不符造成的识别失误现象。In step S604, the current feature point of the target object is a parameter. When the current image is equal to the first image, the current feature point of the target object is equal to the feature point of the target object in the teaching image. When the current image is equal to other images, there is no The updated current feature points of the target object are equal to the feature points of the target object recognized in the previous frame image. Therefore, in step S604, the parameter of the feature points of the target object is updated in real time according to the feature points of the recognized target object, so that the feature points of the target object can be kept based on the latest recognition data, and the discrepancy between the teaching data and the real-time situation can be reduced. Identify errors.
在步骤S605、S606,如果目标图像不位于当前图像的中心(或者如前述实施例描写 的中心区域),则可以根据目标对象与当前图像的中心的坐标差值调整云台或无人飞行器的位置和姿态。计算目标对象的坐标时可以以当前图像的中心为原点计算。In steps S605 and S606, if the target image is not located in the center of the current image (or the central area described in the preceding embodiments), the position of the gimbal or the UAV can be adjusted according to the coordinate difference between the target object and the center of the current image and gesture. When calculating the coordinates of the target object, the center of the current image can be used as the origin for calculation.
在步骤S607,如果目标对象位于当前图像的中心,或者经过位姿调整后,目标图像位于当前图像的中心,则可以判断当前焦距是否达到了设置的拍摄焦距(第二预设焦距),如果没有达到,则进入步骤S608继续增大焦距,以放大目标对象在图像中占比,提高对目标对象的拍摄清晰度,在新的增大后的焦距下采集第二图像,并使用步骤S602~步骤S607的方式根据更大焦距下拍摄的图像进行位姿调整,使目标对象在更大焦距下也能位于当前图像的拍摄中心直至达到预设的拍摄焦距,即第二预设焦距。In step S607, if the target object is located at the center of the current image, or after pose adjustment, the target image is located at the center of the current image, it can be judged whether the current focal length has reached the set shooting focal length (the second preset focal length), if not If it is reached, go to step S608 and continue to increase the focal length to enlarge the proportion of the target object in the image, improve the shooting clarity of the target object, collect the second image at the new increased focal length, and use steps S602 to The method of S607 performs pose adjustment according to the image captured at a larger focal length, so that the target object can also be located at the shooting center of the current image at a larger focal length until reaching the preset shooting focal length, that is, the second preset focal length.
步骤S609~步骤S612是在第二预设焦距下进行拍摄微调进而完成拍摄的过程。Steps S609 to S612 are the process of fine-tuning the shooting at the second preset focal length to complete the shooting.
如果不需要对拍摄进行微调,在步骤S609就可以直接在第二预设焦距下采集第三图像,将第三图像作为目标对象的拍摄结果进行保存。If there is no need to fine-tune the shooting, in step S609 the third image can be captured directly at the second preset focal length, and the third image can be saved as the shooting result of the target object.
但是在一些情况下,当增大焦距后当前焦距等于第二预设焦距时,在第二预设焦距拍摄的第二图像被设置为当前图像,由此,在步骤S606根据当前图像中的目标对象调节(无人飞行器或云台的)位姿后,经过步骤S607的判断直接进入步骤S609拍摄第三图像,尚没有对调整位姿后的结果进行核对,即位姿调节是否到位。But in some cases, when the current focal length is equal to the second preset focal length after increasing the focal length, the second image taken at the second preset focal length is set as the current image, thus, in step S606, according to the target in the current image After the object adjusts the pose (of the unmanned aerial vehicle or gimbal), it directly proceeds to step S609 to take the third image after the judgment of step S607. The result after the pose adjustment has not been checked yet, that is, whether the pose adjustment is in place.
因此,在步骤S610可以对在第二预设焦距下进行位姿调节后采集(并不一定是拍摄)的第三图像进行判断,如果位姿调节没有到位(目标对象没有位于当前图像/第三图像的中心),则进入步骤S611继续调节位姿,直至位姿调节到位后,进入步骤S612进行拍摄。Therefore, in step S610, a judgment can be made on the third image acquired (not necessarily shot) after the pose adjustment is performed at the second preset focal length. If the pose adjustment is not in place (the target object is not located in the current image/third image center of the image), go to step S611 and continue to adjust the pose until the pose is adjusted in place, then go to step S612 to take pictures.
在进入步骤S612对目标对象进行拍摄之前,获取的第一图像、第二图像、第三图像均可以为照相机尚未按下拍摄键时镜头中实时变动的图像数据。Before entering step S612 to shoot the target object, the acquired first image, second image, and third image can all be image data that changes in real time in the lens when the camera has not pressed the shooting key.
步骤S613~步骤S615是发现目标丢失情况下的一种处理方法。在一些情况下,例如强风导致机身晃动时,可能导致采集的目标图像中没有目标对象,无论是基于第一预设焦距采集的第一图像还是基于增大后的焦距采集的第二图像。此时,可以减小当前焦距,以增大拍摄视野,重新识别定位目标对象。在当前焦距减小到第三预设焦距时,如果还是无法在当前图像中识别到目标对象,可以输出识别失败信息,报告目标丢失。第三预设焦距小于第一预设焦距,第三预设焦距可以由本领域技术人员根据摄像装置的拍摄能力自行设置。Steps S613 to S615 are a processing method when the target is found to be lost. In some cases, for example, when strong wind causes the fuselage to shake, there may be no target object in the collected target image, whether it is the first image collected based on the first preset focal length or the second image collected based on the increased focal length. At this time, the current focal length can be reduced to increase the shooting field of view and re-identify and locate the target object. When the current focal length is reduced to the third preset focal length, if the target object still cannot be recognized in the current image, recognition failure information may be output to report that the target is lost. The third preset focal length is shorter than the first preset focal length, and the third preset focal length can be set by those skilled in the art according to the shooting capability of the camera device.
图6所示实施例提供的方法首先控制可移动平台在一个较小的第一预设焦距下,按照设定的位置、高度进行拍摄,以首先确保目标对象在镜头中,然后采用迭代变焦定位的方法,不断定位目标对象,最后在能够保证拍摄清晰的第二预设焦距下对目标对象进行拍摄。The method provided by the embodiment shown in Fig. 6 firstly controls the movable platform to shoot according to the set position and height under a small first preset focal length, so as to first ensure that the target object is in the lens, and then adopts iterative zoom positioning The method continuously locates the target object, and finally shoots the target object at the second preset focal length that can ensure clear shooting.
经过图6所示实施例的循环迭代采集图像、识别目标对象、调整位姿、变焦,可以根据实时采集到的图像更新目标对象的特征信息和位置信息,进而逐步趋近理想的拍摄位姿、拍摄焦距,避免预先输入的控制参数出现偏差或者强风等外力导致的机身晃动问题造成对目标对象的拍摄失败。After the embodiment shown in Figure 6 iteratively collects images, recognizes the target object, adjusts the pose, and zooms, the feature information and position information of the target object can be updated according to the images collected in real time, and then gradually approach the ideal shooting pose, Shoot the focal length to avoid the failure of shooting the target object caused by the deviation of the pre-input control parameters or the shaking of the fuselage caused by external forces such as strong winds.
本公开实施例提供的结合精准拍照初始化框和云台跟踪的云台增稳巡检方案,是一种 闭环控制的自动巡检方案。当复演拍摄巡检目标时,先利用特征点匹配方法获取在短焦画面内的目标框作为对巡检目标精准拍照的初始化框,然后再利用目标跟踪方法对该目标进行云台跟踪,以抵抗云台位姿调整和变焦过程中可能出现的累积控制误差或强风等外力造成的偏差。云台跟踪(track)时,先在上一帧识别框内提取目标对象的当前特征点,然后在当前帧的旧框位置附近进行特征搜索和匹配,更新识别框位置,控制云台使得目标对象保持在拍摄画面中央,达到云台增稳效果,迭代此过程直到变焦和控制结束。变焦和控制结束的依据为达到预定焦距且目标框仍然在画面中央,此时拍摄目标即完成对巡检目标的精准复拍。相比于一次目标检测直接控制云台位姿和变焦的拍摄方式,利用云台目标跟踪使在整个控制过程中目标始终保持在画面较为中央的位置,可以更好地应对云台控制或强风等外力造成的目标拍摄偏差甚至丢失目标,实现复演过程中的云台增稳,最终达到精准、鲁棒的巡检目标拍摄效果。The gimbal stability enhancement inspection solution provided by the embodiments of the present disclosure, which combines the precise camera initialization frame and gimbal tracking, is an automatic inspection solution with closed-loop control. When replaying the inspection target, first use the feature point matching method to obtain the target frame in the short-focus picture as the initialization frame for accurate photography of the inspection target, and then use the target tracking method to track the target with the pan/tilt to Resist the accumulative control errors that may occur during the gimbal pose adjustment and zooming process or the deviation caused by external forces such as strong winds. When the gimbal is tracking (track), first extract the current feature points of the target object in the previous frame recognition frame, then perform feature search and matching near the old frame position of the current frame, update the recognition frame position, and control the gimbal so that the target object Keep in the center of the shooting frame to achieve the gimbal stabilization effect, and iterate this process until the zoom and control are over. The basis for the end of zooming and control is to reach the predetermined focal length and the target frame is still in the center of the screen. At this time, the shooting target has completed the precise reshooting of the inspection target. Compared with the shooting method of directly controlling the pose and zoom of the gimbal with one target detection, the target tracking of the gimbal is used to keep the target in the center of the screen during the entire control process, which can better deal with gimbal control or strong wind, etc. The target shooting deviation or even loss of target caused by external force can realize the stabilization of the gimbal during the replay process, and finally achieve accurate and robust inspection target shooting effect.
图7是本公开一个实施例中可移动平台的示意图。FIG. 7 is a schematic diagram of a movable platform in one embodiment of the present disclosure.
参考图7,可移动平台700可以包括:Referring to FIG. 7, the mobile platform 700 may include:
机体71; Body 71;
动力系统72,设于机体,动力系统用于为可移动平台提供动力;The power system 72 is located in the body, and the power system is used to provide power for the movable platform;
摄像装置73,设于机体,用于采集图像;The camera device 73 is arranged on the body and is used for collecting images;
存储器74;以及 memory 74; and
耦合到存储器的处理器75,处理器被配置为基于存储在存储器中的指令,执行如图1~图6所示实施例的图像拍摄方法。A processor 75 coupled to the memory, and the processor is configured to execute the image capturing method of the embodiment shown in FIGS. 1 to 6 based on instructions stored in the memory.
在本公开的一个示例性实施例中,在执行图像拍摄方法的过程中调节可移动平台700的位置和姿态时,处理器75控制动力系统72调节可移动平台700的位置和姿态。In an exemplary embodiment of the present disclosure, when adjusting the position and attitude of the movable platform 700 during the execution of the image capturing method, the processor 75 controls the power system 72 to adjust the position and attitude of the movable platform 700 .
在本公开的另一个实施例中,可移动平台700还包括云台76,摄像装置73搭载于云台76上。在执行图像拍摄方法的过程中调节可移动平台700的位置和姿态时,处理器75控制动力系统72调节云台76的位置和姿态,以保持目标对象位于拍摄中心。In another embodiment of the present disclosure, the movable platform 700 further includes a platform 76 on which the camera device 73 is mounted. When adjusting the position and attitude of the movable platform 700 during the execution of the image capture method, the processor 75 controls the power system 72 to adjust the position and attitude of the pan-tilt 76 to keep the target object at the shooting center.
本公开实施例可用于具备巡检功能的行业无人机,解决自动巡检过程中由于相机(飞机)定位、云台控制不够精准,导致目标不在画面中央或视野内的问题,以及解决自动巡检过程中由于相机(飞机)强风等外力因素造机身晃动,导致目标不在画面中央或视野内的问题。The embodiments of the present disclosure can be used for industrial drones with inspection functions, to solve the problem that the target is not in the center of the screen or in the field of view due to the camera (aircraft) positioning and pan/tilt control during the automatic inspection process, and to solve the problem of automatic inspection. During the inspection process, the camera (aircraft) shakes due to external factors such as strong winds, resulting in the problem that the target is not in the center of the screen or within the field of view.
对应于上述方法实施例,本公开还提供一种图像拍摄设备,可以用于执行上述方法实施例。Corresponding to the foregoing method embodiments, the present disclosure further provides an image capturing device, which may be used to execute the foregoing method embodiments.
图8是本公开示例性实施例中一种图像拍摄设备的方框图。FIG. 8 is a block diagram of an image capturing device in an exemplary embodiment of the present disclosure.
参考图8,图像拍摄装置800可以包括:Referring to FIG. 8, an image capture device 800 may include:
存储器81,被配置为存储程序代码;memory 81 configured to store program codes;
耦合到存储器81的一或多个处理器82,处理器82被配置为基于存储在存储器81中的指令执行以下方法:One or more processors 82 coupled to the memory 81, the processors 82 are configured to perform the following methods based on the instructions stored in the memory 81:
在第一预设焦距采集第一目标图像,在第一目标图像中识别目标对象;acquiring a first target image at a first preset focal length, and identifying a target object in the first target image;
当在第一目标图像中识别到目标对象时,根据目标对象在第一目标图像中的位置,调节可移动平台的位置和姿态,以使目标对象的位置位于摄像装置拍摄画面中的预设位置;When the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that the position of the target object is located at a preset position in the picture taken by the camera device ;
当在第一目标图像识别不到目标对象时,连续增大摄像装置的焦距,并根据摄像装置采集到的当前图像识别目标对象,直至摄像装置的焦距等于第二预设焦距;When the target object cannot be identified in the first target image, continuously increase the focal length of the camera, and identify the target object according to the current image collected by the camera until the focal length of the camera is equal to the second preset focal length;
其中,在调节摄像装置的焦距的过程中,当任一时刻根据摄像装置采集到的当前图像识别到目标对象时,根据目标对象在当前图像中的位置,调节可移动平台的位置和姿态,以使目标对象的位置位于摄像装置拍摄画面中的预设位置。Wherein, in the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, the position and posture of the movable platform are adjusted according to the position of the target object in the current image, so as to The position of the target object is located at the preset position in the shooting picture of the camera device.
在本公开的一个示例性实施例中,第二预设焦距以及采集第一目标图像时可移动平台的位置和姿态均根据目标检测任务的示教阶段的示教数据得到。In an exemplary embodiment of the present disclosure, the second preset focal length and the position and posture of the movable platform when capturing the first target image are obtained according to the teaching data in the teaching phase of the target detection task.
在本公开的一个示例性实施例中,第一预设焦距根据目标追踪任务的追踪范围得到。In an exemplary embodiment of the present disclosure, the first preset focal length is obtained according to the tracking range of the target tracking task.
在本公开的一个示例性实施例中,处理器82被配置为:以第一目标图像的中心区域位置为坐标原点,在第一目标图像中确定目标对象的第一坐标;根据第一坐标确定可移动平台的位置和姿态调节值,位置和姿态调节值包括水平调节值、垂直调节值、旋转角度调节值中的至少一种;根据位置和姿态调节值调节可移动平台的位置和姿态。In an exemplary embodiment of the present disclosure, the processor 82 is configured to: determine the first coordinates of the target object in the first target image by taking the position of the central region of the first target image as the coordinate origin; The position and attitude adjustment value of the movable platform, the position and attitude adjustment value includes at least one of the horizontal adjustment value, the vertical adjustment value, and the rotation angle adjustment value; adjust the position and attitude of the movable platform according to the position and attitude adjustment value.
在本公开的一个示例性实施例中,处理器82被配置为:根据目标对象的标准特征图像获取目标对象的特征点;根据目标对象的特征点在第一目标图像中进行特征点识别,以确定目标对象的定位框。In an exemplary embodiment of the present disclosure, the processor 82 is configured to: acquire the feature points of the target object according to the standard feature image of the target object; perform feature point recognition in the first target image according to the feature points of the target object, to Determines the anchor box for the target object.
在本公开的一个示例性实施例中,处理器82被配置为:根据目标对象的标准特征图像获取目标对象的特征点;根据目标对象的特征点在摄像装置采集到的当前图像中进行特征点识别,以确定目标对象的定位框。In an exemplary embodiment of the present disclosure, the processor 82 is configured to: obtain the feature points of the target object according to the standard feature image of the target object; Recognition to determine the positioning box of the target object.
在本公开的一个示例性实施例中,处理器82被配置为:从第一目标图像的中心区域开始进行特征点识别。In an exemplary embodiment of the present disclosure, the processor 82 is configured to perform feature point recognition starting from a central area of the first target image.
在本公开的一个示例性实施例中,处理器82被配置为:使用卷积神经网络对第一目标图像进行局部特征点提取;将提取出的局部特征点与目标对象的特征点进行比对,以识别目标对象。In an exemplary embodiment of the present disclosure, the processor 82 is configured to: use a convolutional neural network to extract local feature points from the first target image; compare the extracted local feature points with the feature points of the target object , to identify the target object.
在本公开的一个示例性实施例中,处理器82被配置为:以预设步长连续增大摄像装置的焦距。In an exemplary embodiment of the present disclosure, the processor 82 is configured to continuously increase the focal length of the camera device with a preset step size.
在本公开的一个示例性实施例中,处理器82被配置为:在根据目标对象在第一目标图像中的位置,调节可移动平台的位置和姿态的过程中,持续跟踪目标对象,以使目标对象持续在摄像装置拍摄到的画面中。In an exemplary embodiment of the present disclosure, the processor 82 is configured to continuously track the target object during the process of adjusting the position and posture of the movable platform according to the position of the target object in the first target image, so that The target object is continuously in the picture captured by the camera device.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. Actually, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided to be embodied by a plurality of modules or units.
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。Those skilled in the art can understand that various aspects of the present invention can be implemented as systems, methods or program products. Therefore, various aspects of the present invention can be embodied in the following forms, that is: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as "circuit", "module" or "system".
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementations, those skilled in the art can easily understand that the example implementations described here can be implemented by software, or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of software products, and the software products can be stored in a non-volatile storage medium (which can be CD-ROM, U disk, mobile hard disk, etc.) or on the network , including several instructions to make a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
在本公开的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有能够实现本说明书上述方法的程序产品。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本发明各种示例性实施方式的步骤。In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium on which a program product capable of implementing the above-mentioned method in this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes program code, and when the program product is run on a terminal device, the program code is used to make the The terminal device executes the steps according to various exemplary embodiments of the present invention described in the "Exemplary Method" section above in this specification.
根据本发明的实施方式的用于实现上述方法的程序产品可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。The program product for implementing the above method according to the embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program codes, and may run on a terminal device such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device.
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The program product may reside on any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。A computer readable signal medium may include a data signal carrying readable program code in baseband or as part of a carrier wave. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计 算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for carrying out the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages—such as Java, C++, etc., as well as conventional procedural programming languages. Programming language - such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server to execute. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, using an Internet service provider). business to connect via the Internet).
此外,上述附图仅是根据本发明示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not imply or limit the chronological order of these processes. In addition, it is also easy to understand that these processes may be executed synchronously or asynchronously in multiple modules, for example.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和构思由权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with the true scope and concept of the disclosure indicated by the appended claims.
工业实用性Industrial Applicability
本公开实施例通过在较短焦距定位目标对象,并不断调整可移动平台的位姿、增加焦距、重新定位目标对象,可以通过迭代对准过程不断实现对目标对象的对准,从而在无人控制的可移动平台进行自动拍摄时,使可移动平台克服给定位置不准(示教过程的控制误差)、强风等外力导致机身摇晃等问题,使可移动平台实现准确的无人自动拍摄。In the embodiment of the present disclosure, by locating the target object at a shorter focal length, continuously adjusting the pose of the movable platform, increasing the focal length, and repositioning the target object, the alignment of the target object can be continuously realized through an iterative alignment process. When the controlled movable platform is used for automatic shooting, the movable platform can overcome the problems of inaccurate given position (control error in the teaching process), strong wind and other external forces causing the fuselage to shake, so that the movable platform can realize accurate unmanned automatic shooting .

Claims (26)

  1. 一种图像拍摄方法,其特征在于,应用于可移动平台,所述可移动平台上搭载有摄像装置,所述可移动平台通过所述摄像装置采集图像,所述方法包括:An image capturing method, characterized in that it is applied to a movable platform, the movable platform is equipped with a camera device, and the movable platform collects images through the camera device, and the method comprises:
    在第一预设焦距采集第一目标图像,在所述第一目标图像中识别目标对象;acquiring a first target image at a first preset focal length, and identifying a target object in the first target image;
    当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置;When the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that the target object The position is located at the preset position in the picture taken by the camera device;
    当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距;When the target object cannot be identified in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the camera device the focal length is equal to the second preset focal length;
    其中,在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。Wherein, during the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, according to the position of the target object in the current image, The position and posture of the movable platform are adjusted so that the position of the target object is located at a preset position in the picture taken by the camera device.
  2. 如权利要求1所述的图像拍摄方法,其特征在于,所述方法应用于目标检测任务的复演阶段,所述第二预设焦距以及采集所述第一目标图像时所述可移动平台的位置和姿态均根据所述目标检测任务的示教阶段的示教数据得到。The image capturing method according to claim 1, characterized in that, the method is applied to the replay stage of the target detection task, the second preset focal length and the movable platform when capturing the first target image Both position and attitude are obtained according to the teaching data in the teaching phase of the target detection task.
  3. 如权利要求1所述的图像拍摄方法,其特征在于,所述方法应用于目标追踪任务的追踪阶段,所述第一预设焦距根据所述目标追踪任务的追踪范围得到。The image capturing method according to claim 1, wherein the method is applied in a tracking phase of a target tracking task, and the first preset focal length is obtained according to a tracking range of the target tracking task.
  4. 如权利要求1所述的图像拍摄方法,其特征在于,所述根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态包括:The image capturing method according to claim 1, wherein the adjusting the position and posture of the movable platform according to the position of the target object in the first target image comprises:
    以所述第一目标图像的中心为坐标原点,在所述第一目标图像中确定所述目标对象的第一坐标;Determining the first coordinates of the target object in the first target image with the center of the first target image as the coordinate origin;
    根据所述第一坐标确定所述可移动平台的位置和姿态调节值,所述位置和姿态调节值包括水平调节值、垂直调节值、旋转角度调节值中的至少一种;Determine the position and attitude adjustment values of the movable platform according to the first coordinates, and the position and attitude adjustment values include at least one of a horizontal adjustment value, a vertical adjustment value, and a rotation angle adjustment value;
    根据所述位置和姿态调节值调节所述可移动平台的位置和姿态。The position and attitude of the movable platform are adjusted according to the position and attitude adjustment value.
  5. 如权利要求1所述的图像拍摄方法,其特征在于,在所述第一目标图像中识别目标对象包括:The image capturing method according to claim 1, wherein identifying the target object in the first target image comprises:
    根据所述目标对象的标准特征图像获取所述目标对象的特征点;Acquiring the feature points of the target object according to the standard feature image of the target object;
    根据所述目标对象的特征点在所述第一目标图像中进行特征点识别,以确定所述目标对象的定位框。Perform feature point recognition in the first target image according to the feature points of the target object to determine a positioning frame of the target object.
  6. 如权利要求1所述的图像拍摄方法,其特征在于,根据所述摄像装置采集到的当前图像识别所述目标对象包括:The image capturing method according to claim 1, wherein identifying the target object according to the current image collected by the camera device comprises:
    根据所述目标对象的标准特征图像获取所述目标对象的特征点;Acquiring the feature points of the target object according to the standard feature image of the target object;
    根据所述目标对象的特征点在所述摄像装置采集到的当前图像中进行特征点识别,以确定所述目标对象的定位框。Perform feature point recognition in the current image collected by the camera device according to the feature points of the target object, so as to determine the positioning frame of the target object.
  7. 如权利要求5所述的图像拍摄方法,其特征在于,所述根据所述当前特征点在所述第一目标图像中进行特征点识别包括:The image capturing method according to claim 5, wherein said identifying feature points in said first target image according to said current feature points comprises:
    从所述第一目标图像的中心点开始进行特征点识别。The feature point recognition is performed starting from the center point of the first target image.
  8. 如权利要求5或7所述的图像拍摄方法,其特征在于,所述根据所述当前特征点在所述第一目标图像中进行特征点识别包括:The image capturing method according to claim 5 or 7, wherein said identifying feature points in said first target image according to said current feature points comprises:
    使用卷积神经网络对所述第一目标图像进行局部特征点提取;Using a convolutional neural network to extract local feature points from the first target image;
    将提取出的局部特征点与所述目标对象的特征点进行比对,以识别所述目标对象。The extracted local feature points are compared with the feature points of the target object to identify the target object.
  9. 如权利要求1所述的图像拍摄方法,其特征在于,所述连续增大所述摄像装置的焦距包括:以预设步长连续增大所述摄像装置的焦距。The image capturing method according to claim 1, wherein the continuously increasing the focal length of the imaging device comprises: continuously increasing the focal length of the imaging device with a preset step size.
  10. 如权利要求1所述的图像拍摄方法,其特征在于,在根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态的过程中,持续跟踪所述目标对象,以使所述目标对象持续在所述摄像装置拍摄到的画面中。The image capturing method according to claim 1, wherein, during the process of adjusting the position and posture of the movable platform according to the position of the target object in the first target image, continuously tracking the the target object, so that the target object remains in the picture captured by the camera device.
  11. 如权利要求1所述的图像拍摄方法,其特征在于,所述可移动平台包括无人飞行器。The image capture method of claim 1, wherein the movable platform comprises an unmanned aerial vehicle.
  12. 如权利要求11所述的图像拍摄方法,其特征在于,所述可移动平台还包括云台,所述云台挂载在所述无人飞行器上,所述摄像装置挂载在所述云台上。The image capturing method according to claim 11, wherein the movable platform further comprises a pan-tilt, the pan-tilt is mounted on the unmanned aerial vehicle, and the camera is mounted on the pan-tilt superior.
  13. 一种图像拍摄设备,其特征在于,包括:An image capturing device, characterized in that it comprises:
    存储器,被配置为存储程序代码;memory configured to store program code;
    耦合到所述存储器的一或多个处理器,所述处理器被配置为基于存储在所述存储器中的指令执行以下方法:one or more processors coupled to the memory, the processors configured to perform the following methods based on instructions stored in the memory:
    在第一预设焦距采集第一目标图像,在所述第一目标图像中识别目标对象;acquiring a first target image at a first preset focal length, and identifying a target object in the first target image;
    当在所述第一目标图像中识别到所述目标对象时,根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置;When the target object is recognized in the first target image, adjust the position and posture of the movable platform according to the position of the target object in the first target image, so that the target object The position is located at the preset position in the picture taken by the camera device;
    当在所述第一目标图像识别不到所述目标对象时,连续增大所述摄像装置的焦距,并根据所述摄像装置采集到的当前图像识别所述目标对象,直至所述摄像装置的焦距等于第二预设焦距;When the target object cannot be identified in the first target image, continuously increase the focal length of the camera device, and identify the target object according to the current image collected by the camera device until the camera device the focal length is equal to the second preset focal length;
    其中,在调节所述摄像装置的焦距的过程中,当任一时刻根据所述摄像装置采集到的当前图像识别到所述目标对象时,根据所述目标对象在所述当前图像中的位置,调节所述可移动平台的位置和姿态,以使所述目标对象的位置位于所述摄像装置拍摄画面中的预设位置。Wherein, during the process of adjusting the focal length of the camera device, when the target object is recognized according to the current image collected by the camera device at any time, according to the position of the target object in the current image, The position and posture of the movable platform are adjusted so that the position of the target object is located at a preset position in the picture taken by the camera device.
  14. 如权利要求13所述的图像拍摄设备,其特征在于,所述第二预设焦距以及采集所述第一目标图像时所述可移动平台的位置和姿态均根据所述目标检测任务的示教阶段 的示教数据得到。The image capturing device according to claim 13, wherein the second preset focal length and the position and posture of the movable platform when capturing the first target image are all based on the teaching of the target detection task Phase teaching data are obtained.
  15. 如权利要求13所述的图像拍摄设备,其特征在于,所述第一预设焦距根据所述目标追踪任务的追踪范围得到。The image capturing device according to claim 13, wherein the first preset focal length is obtained according to a tracking range of the target tracking task.
  16. 如权利要求13所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capture device of claim 13, wherein the processor is configured to:
    以所述第一目标图像的中心区域位置为坐标原点,在所述第一目标图像中确定所述目标对象的第一坐标;Determining the first coordinates of the target object in the first target image with the position of the central area of the first target image as the origin of coordinates;
    根据所述第一坐标确定所述可移动平台的位置和姿态调节值,所述位置和姿态调节值包括水平调节值、垂直调节值、旋转角度调节值中的至少一种;Determine the position and attitude adjustment values of the movable platform according to the first coordinates, and the position and attitude adjustment values include at least one of a horizontal adjustment value, a vertical adjustment value, and a rotation angle adjustment value;
    根据所述位置和姿态调节值调节所述可移动平台的位置和姿态。The position and attitude of the movable platform are adjusted according to the position and attitude adjustment value.
  17. 如权利要求13所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capture device of claim 13, wherein the processor is configured to:
    根据所述目标对象的标准特征图像获取所述目标对象的特征点;Acquiring the feature points of the target object according to the standard feature image of the target object;
    根据所述目标对象的特征点在所述第一目标图像中进行特征点识别,以确定所述目标对象的定位框。Perform feature point recognition in the first target image according to the feature points of the target object to determine a positioning frame of the target object.
  18. 如权利要求13所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capture device of claim 13, wherein the processor is configured to:
    根据所述目标对象的标准特征图像获取所述目标对象的特征点;Acquiring the feature points of the target object according to the standard feature image of the target object;
    根据所述目标对象的特征点在所述摄像装置采集到的当前图像中进行特征点识别,以确定所述目标对象的定位框。Perform feature point recognition in the current image collected by the camera device according to the feature points of the target object, so as to determine the positioning frame of the target object.
  19. 如权利要求17所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capture device of claim 17, wherein the processor is configured to:
    从所述第一目标图像的中心区域开始进行特征点识别。The feature point recognition is performed starting from the central area of the first target image.
  20. 如权利要求17或19所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capturing device according to claim 17 or 19, wherein the processor is configured to:
    使用卷积神经网络对所述第一目标图像进行局部特征点提取;Using a convolutional neural network to extract local feature points from the first target image;
    将提取出的局部特征点与所述目标对象的特征点进行比对,以识别所述目标对象。The extracted local feature points are compared with the feature points of the target object to identify the target object.
  21. 如权利要求13所述的图像拍摄设备,其特征在于,所述处理器被配置为:以预设步长连续增大所述摄像装置的焦距。The image capture device according to claim 13, wherein the processor is configured to: continuously increase the focal length of the camera with a preset step size.
  22. 如权利要求13所述的图像拍摄设备,其特征在于,所述处理器被配置为:The image capture device of claim 13, wherein the processor is configured to:
    在根据所述目标对象在所述第一目标图像中的位置,调节所述可移动平台的位置和姿态的过程中,持续跟踪所述目标对象,以使所述目标对象持续在所述摄像装置拍摄到的画面中。During the process of adjusting the position and posture of the movable platform according to the position of the target object in the first target image, continuously tracking the target object so that the target object is continuously on the camera device in the captured screen.
  23. 一种可移动平台,其特征在于,包括:A mobile platform, characterized in that it comprises:
    机体;body;
    动力系统,设于所述机体,所述动力系统用于为所述可移动平台提供动力;a power system, provided on the body, and the power system is used to provide power for the movable platform;
    摄像装置,设于所述机体,用于采集图像;a camera device, installed on the body, for collecting images;
    存储器;以及storage; and
    耦合到所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如权利要求1-12任一项所述的图像拍摄方法。A processor coupled to the memory, the processor configured to execute the image capturing method according to any one of claims 1-12 based on instructions stored in the memory.
  24. 如权利要求23所述的可移动平台,其特征在于,在执行所述图像拍摄方法的过程中调节所述可移动平台的位置和姿态时,所述处理器控制所述动力系统调节所述可移动平台的位置和姿态。The movable platform according to claim 23, wherein when adjusting the position and attitude of the movable platform during the execution of the image capturing method, the processor controls the power system to adjust the movable The position and attitude of the mobile platform.
  25. 如权利要求23所述的可移动平台,其特征在于,所述可移动平台还包括云台,所述摄像装置搭载于所述云台上;在执行所述图像拍摄方法的过程中调节所述可移动平台的位置和姿态时,所述处理器控制所述动力系统调节所述云台的位置和姿态。The movable platform according to claim 23, characterized in that, the movable platform further comprises a pan-tilt, and the camera device is mounted on the pan-tilt; during the process of executing the image capturing method, the When the position and attitude of the movable platform, the processor controls the power system to adjust the position and attitude of the platform.
  26. 一种计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如权利要求1-12任一项所述的图像拍摄方法。A computer-readable storage medium, on which a program is stored, and when the program is executed by a processor, the image capturing method according to any one of claims 1-12 is implemented.
PCT/CN2022/078433 2022-02-28 2022-02-28 Image photographing method and device, and movable platform WO2023159611A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/078433 WO2023159611A1 (en) 2022-02-28 2022-02-28 Image photographing method and device, and movable platform
CN202280050536.7A CN117716702A (en) 2022-02-28 2022-02-28 Image shooting method and device and movable platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/078433 WO2023159611A1 (en) 2022-02-28 2022-02-28 Image photographing method and device, and movable platform

Publications (1)

Publication Number Publication Date
WO2023159611A1 true WO2023159611A1 (en) 2023-08-31

Family

ID=87764477

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/078433 WO2023159611A1 (en) 2022-02-28 2022-02-28 Image photographing method and device, and movable platform

Country Status (2)

Country Link
CN (1) CN117716702A (en)
WO (1) WO2023159611A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116899832A (en) * 2023-09-13 2023-10-20 广东全丰智能装备有限公司 Dispensing manipulator control system and dispensing device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867362A (en) * 2016-04-20 2016-08-17 北京博瑞爱飞科技发展有限公司 Terminal equipment and control system of unmanned aerial vehicle
CN110291482A (en) * 2018-07-31 2019-09-27 深圳市大疆创新科技有限公司 It makes a return voyage control method, device and equipment
CN111432130A (en) * 2020-04-23 2020-07-17 西安智文琛软件有限公司 Automatic tracking focusing snapshot method, snapshot system, unmanned aerial vehicle and application
CN112084815A (en) * 2019-06-13 2020-12-15 成都天府新区光启未来技术研究院 Target detection method based on camera focal length conversion, storage medium and processor
JP6951796B1 (en) * 2020-05-15 2021-10-20 国立大学法人広島大学 Image recognition device, authentication system, image recognition method and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867362A (en) * 2016-04-20 2016-08-17 北京博瑞爱飞科技发展有限公司 Terminal equipment and control system of unmanned aerial vehicle
CN110291482A (en) * 2018-07-31 2019-09-27 深圳市大疆创新科技有限公司 It makes a return voyage control method, device and equipment
CN112084815A (en) * 2019-06-13 2020-12-15 成都天府新区光启未来技术研究院 Target detection method based on camera focal length conversion, storage medium and processor
CN111432130A (en) * 2020-04-23 2020-07-17 西安智文琛软件有限公司 Automatic tracking focusing snapshot method, snapshot system, unmanned aerial vehicle and application
JP6951796B1 (en) * 2020-05-15 2021-10-20 国立大学法人広島大学 Image recognition device, authentication system, image recognition method and program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116899832A (en) * 2023-09-13 2023-10-20 广东全丰智能装备有限公司 Dispensing manipulator control system and dispensing device
CN116899832B (en) * 2023-09-13 2023-12-29 广东全丰智能装备有限公司 Dispensing manipulator control system and dispensing device

Also Published As

Publication number Publication date
CN117716702A (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN112164015B (en) Monocular vision autonomous inspection image acquisition method and device and power inspection unmanned aerial vehicle
US11897606B2 (en) System and methods for improved aerial mapping with aerial vehicles
CN111272148B (en) Unmanned aerial vehicle autonomous inspection self-adaptive imaging quality optimization method for power transmission line
WO2020014909A1 (en) Photographing method and device and unmanned aerial vehicle
CN108803668B (en) Intelligent inspection unmanned aerial vehicle nacelle system for static target monitoring
WO2021189456A1 (en) Unmanned aerial vehicle inspection method and apparatus, and unmanned aerial vehicle
US11024052B2 (en) Stereo camera and height acquisition method thereof and height acquisition system
WO2020107372A1 (en) Control method and apparatus for photographing device, and device and storage medium
WO2019104641A1 (en) Unmanned aerial vehicle, control method therefor and recording medium
CN115439424A (en) Intelligent detection method for aerial video image of unmanned aerial vehicle
WO2020102976A1 (en) Cradle head adjustment method, cradle head adjustment device, mobile platform and medium
CN112653844A (en) Camera holder steering self-adaptive tracking adjustment method
TW201926240A (en) Panoramic photographing method for unmanned aerial vehicle and unmanned aerial vehicle using the same
WO2023159611A1 (en) Image photographing method and device, and movable platform
CN110337668B (en) Image stability augmentation method and device
CN110602376B (en) Snapshot method and device and camera
CN114326771A (en) Unmanned aerial vehicle shooting route generation method and system based on image recognition
WO2020061771A1 (en) Parameter processing method and device for camera and image processing apparatus
WO2021189429A1 (en) Image photographing method and device, movable platform, and storage medium
CN109062220B (en) Method and device for controlling terminal movement
CN114594770B (en) Inspection method for inspection robot without stopping
CN113438399B (en) Target guidance system, method for unmanned aerial vehicle, and storage medium
CN112702513B (en) Double-optical-pan-tilt cooperative control method, device, equipment and storage medium
JP2019219874A (en) Autonomous moving and imaging control system and autonomous moving body
WO2022000211A1 (en) Photography system control method, device, movable platform, and storage medium