WO2020107487A1 - 图像处理方法和无人机 - Google Patents

图像处理方法和无人机 Download PDF

Info

Publication number
WO2020107487A1
WO2020107487A1 PCT/CN2018/118787 CN2018118787W WO2020107487A1 WO 2020107487 A1 WO2020107487 A1 WO 2020107487A1 CN 2018118787 W CN2018118787 W CN 2018118787W WO 2020107487 A1 WO2020107487 A1 WO 2020107487A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature points
directions
feature point
successfully
depth value
Prior art date
Application number
PCT/CN2018/118787
Other languages
English (en)
French (fr)
Inventor
叶长春
周游
杨振飞
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2018/118787 priority Critical patent/WO2020107487A1/zh
Priority to CN201880042469.8A priority patent/CN110892354A/zh
Publication of WO2020107487A1 publication Critical patent/WO2020107487A1/zh
Priority to US17/231,974 priority patent/US20210256732A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • G05D1/0808Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/74Determining position or orientation of objects or cameras using feature-based methods involving reference images or patches
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64CAEROPLANES; HELICOPTERS
    • B64C39/00Aircraft not otherwise provided for
    • B64C39/02Aircraft not otherwise provided for characterised by special use
    • B64C39/024Aircraft not otherwise provided for characterised by special use of the remote controlled vehicle type, i.e. RPV
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64UUNMANNED AERIAL VEHICLES [UAV]; EQUIPMENT THEREFOR
    • B64U20/00Constructional aspects of UAVs
    • B64U20/80Arrangement of on-board electronics, e.g. avionics systems or wiring
    • B64U20/87Mounting of imaging devices, e.g. mounting of gimbals
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/10Simultaneous control of position or course in three dimensions
    • G05D1/101Simultaneous control of position or course in three dimensions specially adapted for aircraft
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/55Depth or shape recovery from multiple images
    • G06T7/593Depth or shape recovery from multiple images from stereo images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64UUNMANNED AERIAL VEHICLES [UAV]; EQUIPMENT THEREFOR
    • B64U10/00Type of UAV
    • B64U10/10Rotorcrafts
    • B64U10/13Flying platforms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64UUNMANNED AERIAL VEHICLES [UAV]; EQUIPMENT THEREFOR
    • B64U2101/00UAVs specially adapted for particular uses or applications
    • B64U2101/30UAVs specially adapted for particular uses or applications for imaging, photography or videography
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B64AIRCRAFT; AVIATION; COSMONAUTICS
    • B64UUNMANNED AERIAL VEHICLES [UAV]; EQUIPMENT THEREFOR
    • B64U50/00Propulsion; Power supply
    • B64U50/10Propulsion
    • B64U50/19Propulsion using electrically powered motors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10032Satellite or aerial image; Remote sensing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the invention relates to the technical field of a movable platform, in particular to an image processing method and a drone.
  • Computer vision technology is a simulation of biological vision using a computer and various imaging devices. By processing pictures or videos collected by the imaging device, three-dimensional information of the corresponding scene can be obtained.
  • UAV is an important application field of computer vision technology.
  • the UAV can perform the feature point follow-up matching of the multi-frame image to calculate the posture of the imaging device, and then measure its own moving distance and the three-dimensional position of the point in the image.
  • imaging equipment can be provided in multiple directions of the drone, for example, visual sensors are provided on the front and back of the drone. In each direction, the key reference frames are selected according to the respective poses of the visual sensors, the respective calculation results are calculated according to the respective key reference frames, and finally the calculation results in multiple directions are fused and used.
  • the invention provides an image processing method and an unmanned aerial vehicle, which simplifies the complexity of updating key reference frames and improves processing efficiency.
  • the present invention provides an image processing method applied to a drone, where the drone is provided with imaging equipment in at least two directions, the method includes:
  • the reference value of the first direction is used for Determine whether to update the key reference frames corresponding to the at least two directions respectively;
  • the present invention provides a drone.
  • the drone is provided with imaging devices in at least two directions.
  • the drone includes a memory and a processor.
  • the memory is used to store instructions.
  • the processor is used to execute instructions to achieve:
  • the first direction is determined in the at least two directions, and the reference value of the first direction is obtained.
  • the reference value in the first direction is used to determine whether to update the key reference frames corresponding to at least two directions respectively.
  • the present invention provides a storage medium, including: a readable storage medium and a computer program, where the computer program is used to implement the image processing method provided in any of the embodiments of the first aspect described above.
  • the present invention provides a program product that includes a computer program (ie, execution instructions), the computer program stored in a readable storage medium.
  • the processor may read the computer program from a readable storage medium, and the processor executes the computer program for performing the image processing method provided in any of the embodiments of the first aspect.
  • the invention provides an image processing method and a drone.
  • the image processing method is applied to a drone with imaging devices set in multiple directions.
  • the first direction is determined in at least two directions, and the reference value of the first direction is obtained, if If the reference value in the first direction satisfies the preset condition, key reference frames corresponding to at least two directions are updated. It is judged whether the condition for updating the key reference frame is met in only one direction. If it is satisfied, the corresponding key reference frames in all directions are switched simultaneously. The calculation amount is reduced, the complexity of updating the key reference frame is simplified, and the processing efficiency is improved.
  • FIG. 1 is a schematic structural diagram of an unmanned aerial system according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of an image processing method according to Embodiment 1 of the present invention.
  • FIG. 3 is a flowchart of an image processing method according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic diagram of the principle of a triangulation algorithm involved in an embodiment of the present invention.
  • FIG. 5 is a flowchart of an image processing method according to Embodiment 3 of the present invention.
  • FIG. 6 is a schematic structural diagram of a drone provided in Embodiment 1 of the present invention.
  • the embodiments of the present invention provide an image processing method and a drone. It should be noted that the image processing method provided by the embodiment of the present invention is not only applicable to drones, but also applicable to other movable platforms with imaging devices in at least two directions. For example, driverless cars.
  • the following description of the present invention takes the drone as an example.
  • the at least two directions may include at least two directions of the front, rear, lower, left, and right sides of the drone.
  • the imaging device may include at least one of the following: a monocular vision sensor, a binocular vision sensor, and a main camera.
  • two visual sensors are provided on the front of the drone. These two vision sensors form a binocular vision system. Similarly, two visual sensors are respectively arranged at the rear end and below the drone to form a binocular vision system.
  • a vision sensor can be set on the left and right sides of the UAV, respectively, to form a monocular vision system.
  • the main shooting camera can also be set on the drone to form a monocular vision system.
  • FIG. 1 is a schematic architectural diagram of an unmanned aerial system according to an embodiment of the present invention.
  • a rotorless unmanned aerial vehicle is used as an example for description.
  • the unmanned aerial vehicle 100 may include an unmanned aerial vehicle 110.
  • the unmanned aerial vehicle 110 may include a power system 150, a flight control system 160, and a frame.
  • the unmanned aerial system 100 may also include a pan/tilt 120.
  • the UAV system 100 may further include a display device 130.
  • the UAV 110 may communicate with the display device 130 wirelessly.
  • the rack may include a fuselage and a tripod (also called landing gear).
  • the fuselage may include a center frame and one or more arms connected to the center frame, the one or more arms extending radially from the center frame.
  • the tripod is connected to the fuselage for supporting the UAV 110 when it lands.
  • the power system 150 may include one or more electronic governors (abbreviated as electric governors) 151, one or more propellers 153, and one or more motors 152 corresponding to the one or more propellers 153, wherein the motor 152 is connected to Between the electronic governor 151 and the propeller 153, the motor 152 and the propeller 153 are disposed on the arm of the UAV 110; the electronic governor 151 is used to receive the driving signal generated by the flight control system 160 and provide driving according to the driving signal The current is given to the motor 152 to control the rotation speed of the motor 152. The motor 152 is used to drive the propeller to rotate, thereby providing power for the flight of the UAV 110, which enables the UAV 110 to achieve one or more degrees of freedom of movement.
  • electric governors abbreviated as electric governors
  • the UAV 110 may rotate about one or more rotation axes.
  • the rotation axis may include a roll axis (Roll), a yaw axis (Yaw), and a pitch axis (Pitch).
  • the motor 152 may be a DC motor or an AC motor.
  • the motor 152 may be a brushless motor or a brush motor.
  • the flight control system 160 may include a flight controller 161 and a sensing system 162.
  • the sensing system 162 is used to measure the motion information of the UAV, for example, the position information, attitude information and speed information of the UAV 110 in space, for example, three-dimensional position, three-dimensional angle, three-dimensional velocity, three-dimensional acceleration and three-dimensional angular velocity.
  • the sensing system 162 may include, for example, at least one of a gyroscope, an ultrasonic sensor, an electronic compass, an inertial measurement unit (Inertial Measurement Unit, IMU), a visual sensor, a global navigation satellite system, and a barometer.
  • the global navigation satellite system may be a global positioning system (Global Positioning System, GPS).
  • the flight controller 161 is used to control the flight of the UAV 110.
  • the flight of the UAV 110 can be controlled according to the attitude information measured by the sensor system 162. It should be understood that the flight controller 161 may control the unmanned aerial vehicle 110 according to a pre-programmed program instruction, or may control the unmanned aerial vehicle 110 through a shooting screen.
  • the gimbal 120 may include a motor 122.
  • the gimbal is used to carry the shooting device 123.
  • the flight controller 161 can control the movement of the gimbal 120 through the motor 122.
  • the gimbal 120 may further include a controller for controlling the movement of the gimbal 120 by controlling the motor 122.
  • the gimbal 120 may be independent of the UAV 110 or may be a part of the UAV 110.
  • the motor 122 may be a DC motor or an AC motor.
  • the motor 122 may be a brushless motor or a brush motor.
  • the gimbal may be located at the top of the UAV or at the bottom of the UAV.
  • the shooting device 123 may be, for example, a device for capturing images such as a camera or a video camera.
  • the shooting device 123 may communicate with the flight controller and perform shooting under the control of the flight controller.
  • the flight controller may also use the image captured by the shooting device 123 Control the unmanned aerial vehicle 110.
  • the photographing device 123 of this embodiment at least includes a photosensitive element, for example, a complementary metal oxide semiconductor (Complementary Metal Oxide Semiconductor (CMOS) sensor or a charge-coupled device (Charge-coupled Device, CCD) sensor. It can be understood that the photographing device 123 can also be directly fixed on the UAV 110, so that the gimbal 120 can be omitted.
  • CMOS Complementary Metal Oxide Semiconductor
  • CCD charge-coupled Device
  • the display device 130 is located on the ground side of the unmanned aerial system 100, can communicate with the unmanned aerial vehicle 110 in a wireless manner, and can be used to display the attitude information of the unmanned aerial vehicle 110.
  • the image captured by the photographing device may also be displayed on the display device 130. It should be understood that the display device 130 may be a device independent of the UAV 110.
  • the image coordinate system is a two-dimensional plane, also known as the image plane, which can be understood as the surface of the sensor in the shooting device. Each sensor has a certain size and a certain resolution, which determines the conversion relationship between millimeters and pixels.
  • the coordinates of a point in the image coordinate system can be expressed as (u, v) in pixels or (x, y) in millimeters.
  • the image coordinate system can be divided into an image pixel coordinate system and an image physical coordinate system.
  • the unit of the image pixel coordinate system can be pixels, and the two coordinate axes can be called U axis and V axis, respectively.
  • the unit of the image physical coordinate system can be millimeters, and the two coordinate axes can be called X axis and Y axis respectively.
  • the camera coordinate system is a three-dimensional coordinate system.
  • the origin of the camera coordinate system is the optical center of the camera (lens), the X axis (also called U axis) and the Y axis (also called V axis) of the camera coordinate system are the same as the X axis (U axis) of the image coordinate system and The Y axis (V axis) is parallel, and the Z axis is the optical axis of the camera.
  • the geodetic coordinate system is a three-dimensional coordinate system, which may also be called a world coordinate system, a navigation coordinate system, a local horizontal coordinate system, or a “North-East-DownCoordinate System (NED) coordinate system, which is generally used for navigation calculations.
  • NED North-East-DownCoordinate System
  • the X axis points to North
  • the Y axis points to East
  • the Z axis points to Down.
  • the X and Y axes are tangent to the earth's surface.
  • the execution subject may be a drone.
  • the drone is equipped with imaging equipment in at least two directions. This embodiment does not limit the number of imaging devices provided in each direction.
  • the image processing method provided in this embodiment may include:
  • the image to be processed in each direction may include an image collected by at least one imaging device in that direction.
  • S202 Determine a first direction in at least two directions according to the image to be processed in each of the at least two directions, and obtain a reference value in the first direction.
  • the reference value in the first direction is used to determine whether to update the key reference frames respectively corresponding to at least two directions.
  • each imaging device in each direction corresponds to a key reference frame.
  • the key reference frame is a frame in the multi-frame image collected by the imaging device before the current time.
  • the key reference frame is used as a comparison reference, and the position information of the image acquired by the imaging device after the key reference frame can be obtained through the key reference frame. Therefore, whether the key reference frame is appropriate will directly affect the accuracy of the image's position information, which in turn will affect the accuracy of the acquired UAV position, attitude or speed information.
  • the posture of the UAV and the posture of each imaging device change. Therefore, it is necessary to update the key reference frame of the imaging device.
  • each direction updates the key reference frame based on the change in the direction.
  • the time to update the key reference frame may be different in all directions. Since each direction separately judges whether to update the key reference frame, the calculation amount is huge and the processing efficiency is very low.
  • the first direction is determined first among at least two directions. Based on the reference values in the first direction, it is determined whether the key reference frames corresponding to each direction need to be updated simultaneously. Since the judgment only needs to be made in the first direction, the calculation amount is reduced, the complexity of updating the key reference frame is simplified, and the processing efficiency is improved.
  • the image processing method provided in this embodiment is applied to a drone with imaging devices set in multiple directions. By determining the first direction among the multiple directions, it is judged whether the condition for updating the key reference frame is satisfied in only one direction. If it is satisfied, the corresponding key reference frames in all directions are switched simultaneously. The calculation amount is reduced, the complexity of updating the key reference frame is simplified, and the processing efficiency is improved.
  • Embodiment 3 is a flowchart of an image processing method according to Embodiment 2 of the present invention.
  • the image processing method provided in this embodiment provides another implementation of the image processing method based on the embodiment shown in FIG. 2. It mainly provides an implementation manner of determining the first direction in at least two directions according to the image to be processed in each of the at least two directions in S202.
  • determining the first direction in the at least two directions according to the image to be processed in each of the at least two directions may include:
  • the depth value in each direction is determined according to the depth value corresponding to the successfully matched feature points, respectively.
  • the number of feature points successfully matched in each direction can reflect the magnitude of the change in that direction.
  • the greater the number of feature points the smaller the change in that direction.
  • the smaller the number of feature points the greater the change in that direction.
  • the depth value in each direction reflects the distance of the drone. The greater the depth value, the farther the drone is. Conversely, the smaller the depth value, the closer the drone.
  • KLT Kanade-Lucas-Tomasi feature tracker
  • determining the first direction according to the number of feature points and the depth value may include:
  • the ratio of the number of feature points to the depth value in each direction is obtained, and the values are sorted.
  • the direction corresponding to the maximum value of the ratio is determined as the first direction.
  • the ratio between the two can be calculated based on the number of feature points that match successfully and the depth value in that direction.
  • N can be used to indicate the number of feature points that have been successfully triangulated
  • d0 can be used to indicate the depth value in each direction. Compare the ratio N/d0 between the number of feature points that match successfully and the depth value d0 in that direction.
  • the larger the ratio the larger the numerator, and/or, the smaller the denominator.
  • the greater the number of feature points the smaller the change in that direction.
  • the smaller the depth value the closer the drone.
  • the direction corresponding to the maximum value of the ratio between the number of feature points and the depth value is determined as the first direction, which further improves the accuracy and rationality of determining the first direction.
  • the depth value in each direction will be described below.
  • the depth value in each direction is determined according to the depth value corresponding to the successfully matched feature point, which may include:
  • the depth value in each direction is the average value of the depth values corresponding to the feature points matched successfully.
  • the depth value in this direction is the average value of the depth values corresponding to the 10 matched feature points respectively.
  • the depth value in each direction is determined according to the depth value corresponding to the successfully matched feature point, which may include:
  • the depth value in each direction is a histogram statistical value based on the depth value of the feature points that match successfully.
  • the histogram is an accurate image representation of the distribution of numerical data, which can be normalized to display the "relative frequency". Taking the histogram statistics as the depth value in each direction, the frequency distribution is considered, which further improves the accuracy of the depth value in each direction.
  • the imaging device of the drone includes a binocular vision system provided with two imaging devices, and the image to be processed in each direction includes images collected by the two imaging devices respectively.
  • performing feature point extraction and feature point matching on the to-be-processed image in each direction to obtain the successfully matched feature points may include:
  • acquiring the depth value in each direction may include:
  • a binocular matching algorithm is used to obtain the depth value of the successfully matched feature points, and the depth value of each direction is determined according to the obtained depth value of the successfully matched feature points.
  • this implementation mode should be used in the direction of forming a binocular vision system.
  • a binocular matching algorithm is used to obtain the depth value in the direction.
  • obtaining the depth value in each direction may include:
  • a depth value of at least one matching feature point is acquired using a triangulation algorithm based on a plurality of images collected by at least one imaging device, then according to the acquired at least one matching feature point The depth value determines the depth value in each direction.
  • a triangulation algorithm is used to obtain the depth value of at least one matching feature point, and then the depth in each direction is determined according to the obtained depth value of at least one matching feature point .
  • this implementation mode should be used in the direction of forming a binocular vision system.
  • a triangulation algorithm is used to obtain the depth value in this direction.
  • FIG. 4 is a schematic diagram of the principle of a triangulation algorithm according to an embodiment of the present invention.
  • G represents the origin in the world coordinate system.
  • C0, C1, C2 are three different camera poses, shooting the same bee from different angles. It can be seen that the positions of the points on the images collected by bee stings at different angles are p0, p1, and p2, respectively. Knowing the camera poses of C0, C1, and C2 (by R for rotation transformation, by t for displacement transformation), the true three-dimensional position of bee sting P can be solved. It can be seen that this is very similar to GPS positioning. It is observed from multiple angles, and the pose is known, and the three-dimensional position of a certain point is solved.
  • this embodiment does not limit the number of angles to be observed in the triangulation algorithm, or the number of images to be acquired by the same imaging device. Can be greater than or equal to 2.
  • the imaging device of the drone includes a monocular vision system provided with an imaging device, and the image to be processed in each direction includes multiple images collected by the imaging device.
  • the image to be processed in each direction includes two images collected by the monocular vision system.
  • performing feature point extraction and feature point matching on the to-be-processed image in each direction to obtain the successfully matched feature points may include:
  • obtaining the depth value in each direction may include:
  • the depth value in each direction is determined according to the acquired depth value of the at least one successfully matched feature point.
  • this implementation can be applied in the direction of forming a monocular vision system.
  • the triangulation algorithm is used successfully at least once to obtain the depth value of at least one feature point that matches successfully, the depth value in the direction is obtained through the triangulation algorithm.
  • obtaining the depth value in each direction may further include:
  • the preset depth value is determined as the depth value in each direction.
  • this implementation method can be applied to a scene that uses a triangulation algorithm.
  • a triangulation algorithm For example, in the direction of forming a monocular vision system.
  • this direction forms a binocular vision system, only the image collected by one of the imaging devices uses a triangulation algorithm.
  • the triangulation algorithm is not successful at one time and the depth value of the matching feature point cannot be obtained, the preset depth value is determined as the depth value in the direction.
  • the specific value of the preset depth value is not limited. For example, 500 meters.
  • the first direction will be described below through specific scenarios.
  • the drone flew out of the window of a tall building. At this time, the height of the drone jumps.
  • the first direction When flying out of the window, the first direction is still considered to be the imaging device located under the drone, that is, the direction of looking down. Because in the downward direction, the triangulation algorithm has the most successful feature points. But in fact, due to the height jump, the depth of the downward looking direction is very large. At this time, the downward looking direction is no longer suitable as the first direction.
  • Re-determined first direction Because the depth of the point in the downward direction is very large, even if the number of points where the triangulation algorithm succeeds is relatively large, by comprehensively considering the number and depth of successful triangulation, compare N/d0 in each direction One direction is modified to other directions than looking down, for example, the direction of the back view. Among them, N represents the number of successful triangulation feature points. d0 represents the depth value in each direction.
  • the drone brakes and reverberates when flying in a low-altitude sports gear with a large attitude.
  • the original first direction the view angle (Field of Vision, FoV) in the downward direction is large, and the most feature points are seen. At this time, the first direction is still considered downward.
  • Redefined first direction When the drone's attitude is large, the drone is tilted forward, and the forward looking direction is closer to the ground. Compare the N/d0 in each direction, and then modify the first direction to the forward direction.
  • This embodiment provides an image processing method.
  • determining the first direction for each of at least two directions, feature point extraction and feature point matching are performed on the to-be-processed image in each direction to obtain the successfully matched features point.
  • the number of feature points successfully matched and the depth value in each direction are obtained, and in at least two directions, the first direction is determined according to the number of feature points and the depth value.
  • the image processing method provided in this embodiment improves the accuracy of determining the first direction by comprehensively considering the number of feature points and depth values of the matching success.
  • Embodiment 5 is a flowchart of an image processing method according to Embodiment 3 of the present invention.
  • the image processing method provided in this embodiment provides another implementation of the image processing method based on the embodiment shown in FIG. 2. It mainly provides an implementation manner of obtaining the reference value in the first direction in S202.
  • acquiring the reference value in the first direction may include:
  • two images may be selected from the images to be processed in the first direction to obtain the reference value in the first direction.
  • the two acquired images may include two images collected by the same imaging device in the first direction.
  • time interval between two images collected by the same imaging device.
  • the time interval is less than or equal to the preset time interval. This embodiment does not limit the specific value of the preset time interval.
  • the two images collected by the same imaging device include two adjacent frames of images collected by the same imaging device.
  • the reference value in the first direction includes a success rate of matching feature points between two images.
  • the corresponding preset condition is that the success rate of feature point matching is less than or equal to the second preset threshold.
  • updating key reference frames corresponding to at least two directions may include:
  • the key reference frames corresponding to at least two directions are updated, respectively.
  • the higher the success rate of feature point matching the smaller the change in the first direction. Conversely, the lower the success rate of feature point matching, the greater the change in the first direction. If the success rate of feature point matching is less than or equal to a certain value, and the change is large enough, the current key reference frame is already inaccurate, so the key reference frames corresponding to at least two directions are updated.
  • the specific value of the second preset threshold is not limited. For example, 50%.
  • the reference value in the first direction includes the parallax of the feature points successfully matched between the two images.
  • the corresponding preset condition is that the disparity of the feature points successfully matched between the two images is greater than or equal to the third preset threshold.
  • updating key reference frames corresponding to at least two directions may include:
  • the key reference frames corresponding to the at least two directions are updated.
  • the greater the parallax of the feature points matched successfully the greater the change in the first direction. Conversely, the smaller the parallax of the feature points that match successfully, the smaller the change in the first direction. If the parallax of the feature points matched successfully is greater than or equal to a certain value, and the change is large enough, the current key reference frame is already inaccurate. Therefore, update the key reference frames corresponding to at least two directions respectively.
  • the specific value of the third preset threshold is not limited. For example, 10 pixels.
  • the parallax can be determined according to the parallax of all the feature points successfully matched between the two images.
  • the reference value in the first direction may be the average value of the parallax of all the feature points successfully matched between the two images.
  • the reference value in the first direction may be a histogram statistical value of the disparity of all feature points successfully matched between the two images.
  • the reference value in the first direction includes a success rate of matching feature points between two images and a parallax of feature points matching successfully between the two images. Specifically, if the success rate of the feature point matching is greater than the second preset threshold, the parallax of the feature points of the successful matching between the two images is further determined. If the parallax of the successfully matched feature points between the two images is greater than or equal to the third preset threshold, the key reference frames corresponding to the at least two directions are updated.
  • This embodiment provides an image processing method.
  • the reference value in the first direction can be obtained according to the two images. If the reference value in the first direction satisfies the update condition of the key reference frame, the corresponding key reference frames in all directions are simultaneously switched. The calculation amount is reduced, the complexity of updating the key reference frame is simplified, and the processing efficiency is improved.
  • Embodiment 4 of the present invention also provides an image processing method.
  • This embodiment provides another implementation of the image processing method based on the embodiments shown in FIGS. 2 to 5.
  • the second direction is determined in the at least two directions.
  • the depth value corresponding to each direction reflects the distance of the drone in each direction. The greater the depth value, the farther the drone is in this direction. Conversely, the smaller the depth value, the closer the drone is in this direction.
  • the second direction is determined in at least two directions by the depth value corresponding to each of the at least two directions. The second direction is used to provide the main basis for selecting the data source when acquiring the position, attitude and speed information of the UAV. The accuracy of determining the position, attitude and speed information of the UAV has been improved.
  • determining the second direction in at least two directions according to the depth value corresponding to each of the at least two directions may include:
  • the direction corresponding to the minimum value of the depth value is determined as the second direction.
  • the accuracy of selecting the data source is improved.
  • the image processing method provided in this embodiment may further include:
  • the current frame image to be processed is acquired.
  • the feature points in the current frame image that match the corresponding key reference frame successfully are obtained.
  • the first value feature points in the second direction and the preset value feature points in other directions except the second direction are acquired.
  • the first values are larger than the preset values corresponding to the other directions.
  • the second direction is looking down.
  • the second direction is the main data source, the accuracy of selecting the data source is improved.
  • the specific values of the first value and the preset value corresponding to each other direction are not limited.
  • the preset values corresponding to the other directions may be the same or different.
  • the image processing method provided in this embodiment may further include:
  • the three-dimensional position information of the feature points is obtained according to the feature points in the current frame image in at least two directions that match the corresponding key reference frames successfully.
  • the three-dimensional position information may be three-dimensional position information in the UAV coordinate system or three-dimensional position information in the imaging device coordinate system or three-dimensional position information in the world coordinate system.
  • the motion information of the drone may be acquired through an algorithm such as Kalman Filter.
  • the motion information of the drone may include at least one of the following: position information of the drone, attitude information of the drone, and speed information of the drone.
  • the image processing method provided in this embodiment determines the second direction in at least two directions according to the depth value corresponding to each of the at least two directions.
  • the second direction is used to provide the main basis for selecting the data source when acquiring the position, attitude and speed information of the UAV. The accuracy of determining the position, attitude and speed information of the UAV has been improved.
  • Embodiment 5 of the present invention also provides an image processing method.
  • This embodiment provides another implementation of the image processing method on the basis of the foregoing method embodiments 1 to 4.
  • the feature points that have been successfully matched can be made more accurate, thereby improving the accuracy of updating the key reference frame and improving the accuracy of determining the UAV motion information.
  • the execution position of the outliers among the feature points that successfully perform the elimination matching is not limited, as long as the feature points that successfully match are output, the outliers can be eliminated.
  • a step of removing outliers from the feature points that match successfully may be performed.
  • obtaining the three-dimensional position information of the feature point according to the feature point in the current frame image in at least two directions that matches the corresponding key reference frame successfully, and obtaining the motion information of the drone according to the three-dimensional position information may include:
  • removing outliers from the feature points that match successfully may include:
  • the epipolar constraint algorithm is used to eliminate outliers in the matching feature points.
  • removing outliers from the feature points that match successfully may include:
  • the two-dimensional position information and the first external parameter, the key reference frame and the second external parameter of the current frame image are acquired.
  • the first external parameter may include a rotation matrix and/or a displacement matrix, which refers to data obtained by measurement by an inertial measurement unit (Inertial Measurement Unit, IMU) and other sensors.
  • the second external parameter may include a rotation matrix and/or a displacement matrix, which is based on the three-dimensional position information of the feature point in the key reference frame currently corresponding to each direction, and the corresponding key reference frame in the current frame image to be processed in each direction The two-dimensional location information of the matched feature points and the first external reference are obtained.
  • a PNP (Perspective-n-Point) perspective n-point algorithm may be used to obtain the second external parameter.
  • the second external parameters corresponding to the multiple feature points in the current frame image are obtained, and by mutually checking the second external parameters corresponding to the multiple feature points, the feature points that fail the verification, that is, the outliers, can be eliminated.
  • the PNP algorithm combined with the verification algorithm eliminates outliers, which further improves the accuracy of eliminating outliers.
  • this embodiment does not limit the implementation of the verification algorithm.
  • it may be Random Sample Consensus (RANSAC) algorithm.
  • RANSAC Random Sample Consensus
  • obtaining the three-dimensional position information of the feature point in the key reference frame currently corresponding to each direction may include:
  • a binocular matching algorithm or a triangulation algorithm is used to obtain the three-dimensional position information of the feature point in the key reference frame currently corresponding to each direction.
  • the matching feature points are obtained through images collected by two imaging devices in the binocular vision system, outliers in the matching feature points can be eliminated.
  • the proportion of feature points with a disparity value greater than or equal to the fourth preset threshold is greater than or equal to the fifth preset threshold, then for each disparity value greater than or equal to the fourth preset
  • the threshold feature points are compared with the difference between the depth values of each feature point obtained by using the binocular matching algorithm and the triangulation algorithm, respectively.
  • each feature point is eliminated.
  • the parallax value of each successfully matched feature point Probability statistics for all parallax values.
  • the disparity value of 80% of the feature points is less than 1.5 pixels.
  • the fourth preset threshold is 1.5 pixels.
  • the fifth preset threshold is 20%.
  • the depth value of each feature point obtained by the binocular matching algorithm and the triangulation algorithm are respectively used, and the difference between the depth values is compared. If the difference is greater than or equal to the sixth preset threshold, the feature point is eliminated.
  • a part of the feature points are distinguished by probability statistics, and then the outlier points are continuously screened out through the binocular matching algorithm and the triangulation algorithm, thereby eliminating the outlier points.
  • the accuracy of eliminating outliers has been further improved.
  • removing outliers from the feature points that match successfully may further include:
  • each feature point in the current frame image For each feature point in the current frame image to be processed in each direction in at least two directions that matches the corresponding key reference frame successfully, obtain each feature point in the current frame image according to the three-dimensional position information of each feature point Reprojected two-dimensional position information.
  • the reprojection error of each feature point is obtained.
  • each feature point in the current frame image to be processed in each direction that matches the corresponding key reference frame successfully, first, through the conversion relationship between the three-dimensional position information and the two-dimensional position information, according to the three-dimensional The position information obtains reprojected two-dimensional position information after reprojection. After that, the two-dimensional position information of the feature point in the current frame image is obtained according to the current frame image. Compare the two two-dimensional position information with reprojection. If the reprojection error is greater than or equal to the seventh preset threshold, each feature point is eliminated.
  • the feature point A is successfully matched with the key reference frame in the forward view direction.
  • the three-dimensional position information of the feature point A can be obtained.
  • the feature point A is reprojected in the current frame image to obtain the reprojected two-dimensional position information, assuming that the corresponding point is A'.
  • a and A' should coincide, or the reprojection error between the two should be less than a very small value.
  • the re-projection error between the two is large and is greater than the seventh preset threshold, it means that the feature point A is an outlier and needs to be deleted.
  • the conversion relationship between the three-dimensional position information and the two-dimensional position information is not limited.
  • the conversion relationship between the three-dimensional position information and the two-dimensional position information is not limited.
  • the camera model equation according to the camera model equation.
  • the camera model is briefly described below.
  • [u, v, 1] T represents the 2D point in the image coordinate system (Homogeneous image coordinates).
  • [x w ,y w ,z w ] T represents a 3D point in the world coordinate system (World coordinates).
  • the matrix K is called the camera calibration matrix (Camera calibration matrix), that is, the camera's internal parameters (Intrinsic Parameters).
  • the matrix K contains 5 internal parameters. details as follows:
  • ⁇ x fm x
  • ⁇ y fm y
  • f is the focal length
  • mx my are the number of pixels per unit distance (scale factors) in the x and y directions.
  • is the skew parameter between the x and y axes (CCD camera, pixels are not square).
  • ⁇ 0 , v 0 is the optical point (principal point).
  • the matrix R is called a rotation matrix (Rotation Matrix), and the matrix T is called a displacement matrix (Translation Matrix).
  • R and T are the camera's external parameters (ExtrinsicMatrix), used to express the rotation and displacement transformation of the world coordinate system to the camera coordinate system in three-dimensional space.
  • two-dimensional position information can be obtained according to the three-dimensional position information.
  • the drone is hovering, and the texture scene is below.
  • the object below is a pure white table.
  • the original first direction when the drone is hovering, due to the weak texture of the pure white table, the number of feature point matching errors is large. Since the feature points that match incorrectly cannot be effectively eliminated, the first direction is still regarded as the downward direction.
  • Re-determined first direction After excluding incorrectly matched feature points, the direction with the largest number of successful triangulation points is no longer the downward direction.
  • the first direction can be modified to other more suitable directions such as a forward looking direction or a rear looking direction according to the aforementioned method.
  • the image processing method provided in this embodiment can make the matching feature points more accurate by removing outliers from the matching feature points, thereby improving the accuracy of updating the key reference frame and improving the determination of the drone The accuracy of sports information.
  • FIG. 6 is a schematic structural diagram of a drone provided in Embodiment 1 of the present invention. As shown in FIG. 6, the drone provided in this embodiment is used to execute the image processing method provided in the above method embodiment. As shown in FIG. 6, in the drone provided in this embodiment, the drone is provided with imaging devices in at least two directions.
  • the drone includes a memory 62 and a processor 61.
  • the memory 62 is used to store instructions.
  • the processor 61 is used to execute instructions to realize:
  • the first direction is determined in the at least two directions, and the reference value of the first direction is obtained.
  • the reference value in the first direction is used to determine whether to update the key reference frames corresponding to at least two directions respectively.
  • the processor 61 is specifically used for:
  • feature point extraction and feature point matching are performed on the image to be processed in each direction to obtain the feature points that match successfully.
  • the feature points matched successfully the number of feature points matched successfully and the depth value in each direction are obtained.
  • the depth value in each direction is determined according to the depth value corresponding to the successfully matched feature points, respectively.
  • the first direction is determined according to the number of feature points and the depth value.
  • the processor 61 is specifically used for:
  • the ratio of the number of feature points to the depth value in each direction is obtained, and the values are sorted.
  • the direction corresponding to the maximum value of the ratio is determined as the first direction.
  • the depth value in each direction is determined according to the depth value corresponding to the successfully matched feature points, including:
  • the depth value in each direction is the average value of the depth values corresponding to the feature points matched successfully. or,
  • the depth value in each direction is a histogram statistical value based on the depth value of the feature points that match successfully.
  • the imaging device includes a binocular vision system provided with two imaging devices, and the image to be processed in each direction includes images collected by the two imaging devices respectively.
  • the processor 61 is specifically used for:
  • a binocular matching algorithm is used to obtain the depth value of the successfully matched feature point, and the depth value in each direction is determined according to the acquired depth value of the successfully matched feature point.
  • the processor 61 is also used for:
  • the depth value of each direction is determined according to the acquired depth value of at least one successfully matched feature point.
  • the imaging device includes a monocular vision system provided with an imaging device, and the image to be processed in each direction includes multiple images collected by the imaging device.
  • the processor 61 is specifically used for:
  • the depth value in each direction is determined according to the acquired depth value of the at least one successfully matched feature point.
  • the processor 61 is also used for:
  • the preset depth value is determined as the depth value in each direction.
  • the processor 61 is specifically used for:
  • the reference values in the first direction are obtained from the two images.
  • the reference value in the first direction includes a success rate of matching feature points between two images.
  • the preset condition is that the success rate of feature point matching is less than or equal to the second preset threshold.
  • the processor 61 is specifically used for:
  • the key reference frames corresponding to at least two directions are updated, respectively.
  • the reference value in the first direction further includes the parallax of the feature points that are successfully matched between the two images.
  • the preset condition is that the disparity of the feature points successfully matched between the two images is greater than or equal to the third preset threshold.
  • the processor 61 is specifically used for:
  • the key reference frames corresponding to the at least two directions are updated.
  • the reference value in the first direction is the average value of the parallax of all successfully matched feature points between the two images.
  • the two images include two images collected by the same imaging device in the first direction.
  • the two images collected by the same imaging device include two adjacent frames of images collected by the same imaging device.
  • the processor 61 is also used for:
  • the second direction is determined in at least two directions.
  • the processor 61 is specifically used for:
  • the direction corresponding to the minimum value of the depth value is determined as the second direction.
  • the processor 61 is also used for:
  • the current frame image to be processed is acquired.
  • the feature points in the current frame image that match the corresponding key reference frame successfully are obtained.
  • the first value feature points in the second direction and the preset value feature points in other directions except the second direction are acquired.
  • the first values are larger than the preset values corresponding to the other directions.
  • the processor 61 is also used for:
  • the three-dimensional position information of the feature points is obtained according to the feature points in the current frame image in at least two directions that match the corresponding key reference frames successfully.
  • the three-dimensional position information is three-dimensional position information in the UAV coordinate system or three-dimensional position information in the imaging device coordinate system or three-dimensional position information in the world coordinate system.
  • the motion information of the drone includes at least one of the following: position information of the drone, attitude information of the drone, and speed information of the drone.
  • the processor 61 is also used for:
  • the processor 61 is specifically used for:
  • the epipolar constraint algorithm is used to eliminate outliers in the matching feature points.
  • the processor 61 is specifically used for:
  • the two-dimensional position information and the first external parameter, the key reference frame and the second external parameter of the current frame image are acquired.
  • the processor 61 is specifically used for:
  • a binocular matching algorithm or a triangulation algorithm is used to obtain the three-dimensional position information of the feature point in the key reference frame currently corresponding to each direction.
  • the processor 61 is also used to:
  • the proportion of feature points with a disparity value greater than or equal to the fourth preset threshold is greater than or equal to the fifth preset threshold, then for each disparity value greater than or equal to the fourth preset
  • the threshold feature points are compared with the difference between the depth values of each feature point obtained by using the binocular matching algorithm and the triangulation algorithm, respectively.
  • each feature point is eliminated.
  • the processor 61 is also used for:
  • each feature point in the current frame image For each feature point in the current frame image to be processed in each direction in at least two directions that matches the corresponding key reference frame successfully, obtain each feature point in the current frame image according to the three-dimensional position information of each feature point Reprojected two-dimensional position information;
  • the reprojection error of each feature point is obtained.
  • the at least two directions include at least two directions of the front, rear, lower, left, and right sides of the drone.
  • the imaging device includes at least one of the following: a monocular vision sensor, a binocular vision sensor, and a main camera.
  • the drone provided in this embodiment is used to execute the image processing method provided in the above method embodiment.
  • the technical principles and technical effects are similar, and will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Mechanical Engineering (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Studio Devices (AREA)

Abstract

本发明提供一种图像处理方法和无人机。其中,图像处理方法应用于无人机,无人机在至少两个方向上设置有成像设备,图像处理方法包括:获取至少两个方向中每个方向的待处理图像;根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,并获取第一方向的参考值;第一方向的参考值用于确定是否更新至少两个方向分别对应的关键参考帧;若第一方向的参考值满足预设条件,则更新至少两个方向分别对应的关键参考帧。简化了更新关键参考帧的复杂度,提升了处理效率。

Description

图像处理方法和无人机 技术领域
本发明涉及可移动平台技术领域,尤其涉及一种图像处理方法和无人机。
背景技术
计算机视觉技术是使用计算机及各种成像设备对生物视觉的一种模拟,通过对成像设备采集的图片或者视频进行处理,可以获得相应场景的三维信息。
无人机是计算机视觉技术的一个重要应用领域。无人机通过对成像设备采集的图像提取特征点,再进行多帧图像的特征点跟随匹配,可以计算成像设备的位姿,进而可以测算自身的移动距离以及图像中点的三维位置。目前,无人机的多个方向上均可以设置有成像设备,例如,无人机的前后均设置有视觉传感器。在每个方向上,按照视觉传感器各自的位姿来选取关键参考帧,根据各自的关键参考帧计算出各自的计算结果,最后再对多个方向的计算结果融合使用。
但是,由于每个方向各自选取关键参考帧,并且各自更新关键参考帧,导致计算量巨大,计算资源的耗费很大,降低了无人机的处理效率。
发明内容
本发明提供一种图像处理方法和无人机,简化了更新关键参考帧的复杂度,提升了处理效率。
第一方面,本发明提供一种图像处理方法,应用于无人机,所述无人机在至少两个方向上设置有成像设备,所述方法包括:
获取所述至少两个方向中每个方向的待处理图像;
根据所述至少两个方向中每个方向的待处理图像,在所述至少两个方向中确定第一方向,并获取所述第一方向的参考值;所述第一方向的参考值用于确定是否更新所述至少两个方向分别对应的关键参考帧;
若所述第一方向的参考值满足预设条件,则更新所述至少两个方向分别 对应的关键参考帧。
第二方面,本发明提供一种无人机,无人机在至少两个方向上设置有成像设备,无人机包括存储器和处理器。
存储器用于存储指令。
处理器用于运行指令以实现:
获取至少两个方向中每个方向的待处理图像。
根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,并获取第一方向的参考值。第一方向的参考值用于确定是否更新至少两个方向分别对应的关键参考帧。
若第一方向的参考值满足预设条件,则更新至少两个方向分别对应的关键参考帧。
第三方面,本发明提供一种存储介质,包括:可读存储介质和计算机程序,所述计算机程序用于实现上述第一方面任一实施方式提供的图像处理方法。
第四方面,本发明提供一种程序产品,该程序产品包括计算机程序(即执行指令),该计算机程序存储在可读存储介质中。处理器可以从可读存储介质读取该计算机程序,处理器执行该计算机程序用于执行上述第一方面任一实施方式提供的图像处理方法。
本发明提供一种图像处理方法和无人机。图像处理方法应用于在多个方向设置成像设备的无人机。通过获取至少两个方向中每个方向的待处理图像,根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,并获取第一方向的参考值,若第一方向的参考值满足预设条件,则更新至少两个方向分别对应的关键参考帧。由于仅在一个方向上判断是否满足更新关键参考帧的条件。如果满足,则同时切换所有方向上各自对应的关键参考帧。降低了计算量,简化了更新关键参考帧的复杂度,提升了处理效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在 不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为根据本发明的实施例的无人飞行系统的示意性架构图;
图2为本发明实施例一提供的图像处理方法的流程图;
图3为本发明实施例二提供的图像处理方法的流程图;
图4为本发明实施例涉及的三角化算法的原理示意图;
图5为本发明实施例三提供的图像处理方法的流程图;
图6为本发明实施例一提供的无人机的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供了图像处理方法和无人机。需要说明,本发明实施例提供的图像处理方法,不仅适用于无人机,还可以适用于其他在至少两个方向上带有成像设备的可移动平台。例如,无人驾驶的汽车。以下对本发明的描述以无人机为示例进行说明。可选的,所述至少两个方向可以包括无人机的前方、后方、下方、左侧和右侧中的至少两个方向。可选的,成像设备可以包括下列中的至少一种:单目视觉传感器、双目视觉传感器和主拍摄相机。
例如,在一个示例中,无人机的前端设置两个视觉传感器。这两个视觉传感器形成双目视觉系统。相似的,无人机的后端和下方分别设置两个视觉传感器,分别形成双目视觉系统。无人机的左侧和右侧可以分别设置一个视觉传感器,分别形成单目视觉系统。无人机上还可以设置主拍摄相机,形成单目视觉系统。
图1为根据本发明的实施例的无人飞行系统的示意性架构图。本实施例以旋翼无人飞行器为例进行说明。
无人飞行系统100可以包括无人飞行器110。无人飞行器110可以包括 动力系统150、飞行控制系统160和机架。可选的,无人飞行系统100还可以包括云台120。可选的,无人飞行系统100还可以包括显示设备130。无人飞行器110可以与显示设备130进行无线通信。
机架可以包括机身和脚架(也称为起落架)。机身可以包括中心架以及与中心架连接的一个或多个机臂,一个或多个机臂呈辐射状从中心架延伸出。脚架与机身连接,用于在无人飞行器110着陆时起支撑作用。
动力系统150可以包括一个或多个电子调速器(简称为电调)151、一个或多个螺旋桨153以及与一个或多个螺旋桨153相对应的一个或多个电机152,其中电机152连接在电子调速器151与螺旋桨153之间,电机152和螺旋桨153设置在无人飞行器110的机臂上;电子调速器151用于接收飞行控制系统160产生的驱动信号,并根据驱动信号提供驱动电流给电机152,以控制电机152的转速。电机152用于驱动螺旋桨旋转,从而为无人飞行器110的飞行提供动力,该动力使得无人飞行器110能够实现一个或多个自由度的运动。在某些实施例中,无人飞行器110可以围绕一个或多个旋转轴旋转。例如,上述旋转轴可以包括横滚轴(Roll)、偏航轴(Yaw)和俯仰轴(pitch)。应理解,电机152可以是直流电机,也可以交流电机。另外,电机152可以是无刷电机,也可以是有刷电机。
飞行控制系统160可以包括飞行控制器161和传感系统162。传感系统162用于测量无人飞行器的运动信息,例如无人飞行器110在空间的位置信息、姿态信息和速度信息,例如,三维位置、三维角度、三维速度、三维加速度和三维角速度等。传感系统162例如可以包括陀螺仪、超声传感器、电子罗盘、惯性测量单元(Inertial Measurement Unit,IMU)、视觉传感器、全球导航卫星系统和气压计等传感器中的至少一种。例如,全球导航卫星系统可以是全球定位系统(Global Positioning System,GPS)。飞行控制器161用于控制无人飞行器110的飞行,例如,可以根据传感系统162测量的姿态信息控制无人飞行器110的飞行。应理解,飞行控制器161可以按照预先编好的程序指令对无人飞行器110进行控制,也可以通过拍摄画面对无人飞行器110进行控制。
云台120可以包括电机122。云台用于携带拍摄装置123。飞行控制器161可以通过电机122控制云台120的运动。可选地,作为另一实施例,云 台120还可以包括控制器,用于通过控制电机122来控制云台120的运动。应理解,云台120可以独立于无人飞行器110,也可以为无人飞行器110的一部分。应理解,电机122可以是直流电机,也可以是交流电机。另外,电机122可以是无刷电机,也可以是有刷电机。还应理解,云台可以位于无人飞行器的顶部,也可以位于无人飞行器的底部。
拍摄装置123例如可以是照相机或摄像机等用于捕获图像的设备,拍摄装置123可以与飞行控制器通信,并在飞行控制器的控制下进行拍摄,飞行控制器也可以根据拍摄装置123拍摄的图像控制无人飞行器110。本实施例的拍摄装置123至少包括感光元件,该感光元件例如为互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)传感器或电荷耦合元件(Charge-coupled Device,CCD)传感器。可以理解,拍摄装置123也可直接固定于无人飞行器110上,从而云台120可以省略。
显示设备130位于无人飞行系统100的地面端,可以通过无线方式与无人飞行器110进行通信,并且可以用于显示无人飞行器110的姿态信息。另外,还可以在显示设备130上显示拍摄装置拍摄的图像。应理解,显示设备130可以是独立于无人飞行器110的设备。
应理解,上述对于无人飞行系统各组成部分的命名仅是出于标识的目的,并不应理解为对本发明的实施例的限制。
下面对本发明实施例涉及的坐标系进行介绍。
1)图像坐标系
图像坐标系是一个二维平面,又称为像平面,可以理解为拍摄装置中传感器的表面。每个传感器都有一定的尺寸,也有一定的分辨率,这就确定了毫米与像素点之间的转换关系。图像坐标系中一个点的坐标可以以像素为单位表示为(u,v),也可以为毫米为单位表示为(x,y)。或者说,图像坐标系可以分为图像像素坐标系和图像物理坐标系。图像像素坐标系的单位可以为像素,两个坐标轴可以分别称为U轴和V轴。图像物理坐标系的单位可以为毫米,两个坐标轴可以分别称为X轴和Y轴。
2)相机坐标系
相机坐标系为三维坐标系。相机坐标系的原点为相机(透镜)的光心, 相机坐标系的X轴(也称为U轴)与Y轴(也称为V轴)分别与图像坐标系的X轴(U轴)与Y轴(V轴)平行,Z轴为相机的光轴。
3)大地坐标系(ground坐标系)
大地坐标系为三维坐标系,也可以称为世界坐标系、导航坐标系、当地水平坐标系或者“北东地”坐标系(North-East-DownCoordinateSystem,NED),通常用于导航计算时使用。
在大地坐标系中,X轴指向北方(North),Y轴指向东方(East),Z轴指向地心(Down)。X轴与Y轴与地球表面相切。
图2为本发明实施例一提供的图像处理方法的流程图。本实施例提供的图像处理方法,执行主体可以为无人机。无人机在至少两个方向上设置有成像设备。本实施例对于每个方向上设置的成像设备的数量不做限定。如图2所示,本实施例提供的图像处理方法,可以包括:
S201、获取至少两个方向中每个方向的待处理图像。
其中,每个方向的待处理图像,可以包括该方向上至少一个成像设备采集的图像。
S202、根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,并获取第一方向的参考值。
其中,第一方向的参考值用于确定是否更新至少两个方向分别对应的关键参考帧。
具体的,每个方向上的每个成像设备都各自对应有关键参考帧。关键参考帧是成像设备在当前时刻之前采集的多帧图像中的一帧。关键参考帧作为比较基准,通过关键参考帧可以获得成像设备在关键参考帧之后采集的图像的位置信息。因此,关键参考帧是否合适,将直接影响图像的位置信息的准确性,进而影响到获取的无人机位置、姿态或速度信息的准确性。无人机在飞行过程中,无人机的位姿以及各个成像设备的位姿是变化的。因此,需要对成像设备的关键参考帧进行更新。
在现有方式中,每个方向基于该方向的变化情况,各自更新关键参考帧。各个方向上更新关键参考帧的时间可能不同。由于每个方向分别判断是否更新关键参考帧,导致运算量巨大,处理效率很低。
在本实施例中,在至少两个方向中先确定第一方向。基于第一方向的参考值,确定是否需要同时更新每个方向各自对应的关键参考帧。由于只需要在第一方向这一个方向上进行判断,因此降低了计算量,简化了更新关键参考帧的复杂度,提升了处理效率。
S203、若第一方向的参考值满足预设条件,则更新至少两个方向分别对应的关键参考帧。
需要说明的是,第一方向的参考值不同,其对应的预设条件可以不同。本实施例对于预设条件不做限定。
可见,本实施例提供的图像处理方法,应用于在多个方向设置成像设备的无人机。通过在多个方向中确定第一方向,仅在一个方向上判断是否满足更新关键参考帧的条件。如果满足,则同时切换所有方向上各自对应的关键参考帧。降低了计算量,简化了更新关键参考帧的复杂度,提升了处理效率。
图3为本发明实施例二提供的图像处理方法的流程图。本实施例提供的图像处理方法,在图2所示实施例的基础上,提供了图像处理方法的另一种实现方式。主要提供了S202中,根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向的实现方式。
如图3所示,S202中,根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,可以包括:
S301、对于至少两个方向中的每个方向,对每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点。对于匹配成功的特征点,获取匹配成功的特征点数和每个方向的深度值。
其中,每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的。
S302、在至少两个方向中,根据特征点数和深度值确定第一方向。
具体的,每个方向上匹配成功的特征点的数量,可以反映出该方向发生变化的大小。特征点的数量越多,说明该方向发生的变化越小。反之,特征点的数量越小,说明该方向发生的变化越大。每个方向的深度值,反映了无人机距离的远近。深度值越大,说明无人机越远。反之,深度值越小,说明无人机越近。
通过综合考虑匹配成功的特征点数和深度,提升了确定第一方向的准确性。
需要说明的是,本实施例对于特征点提取和特征点匹配的方法不做限定。例如,特征点匹配可以采用卡纳德-卢卡斯-托马西特征跟踪器(Kanade–Lucas–Tomasi feature tracker,KLT)。
可选的,S302中,根据特征点数和深度值确定第一方向,可以包括:
获取特征点数与每个方向的深度值的比值,并对比值进行排序,比值的最大值对应的方向确定为第一方向。
具体的,在每个方向上,根据匹配成功的特征点数和该方向的深度值,可以计算出两者的比值。例如,可以用N表示三角化成功的特征点的数量,d0表示每个方向的深度值,比较匹配成功的特征点数N和该方向的深度值d0的比值N/d0。对于一个比值,比值越大,说明分子越大,和/或,分母越小。特征点的数量越多,说明该方向发生的变化越小。深度值越小,说明无人机越近。
可见,将特征点数与深度值之间的比值的最大值对应的方向,确定为第一方向,进一步提升了确定第一方向的准确性和合理性。
下面对每个方向的深度值进行说明。
可选的,在一种实现方式中,S301中,每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的,可以包括:
每个方向的深度值为根据匹配成功的特征点分别对应的深度值的平均值。
例如,匹配成功的特征点为10个。那么,该方向的深度值为10个匹配成功的特征点分别对应的深度值的平均值。
可选的,在另一种实现方式中,S301中,每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的,可以包括:
每个方向的深度值为根据匹配成功的特征点的深度值的直方图统计值。
其中,直方图是数值数据分布的精确图像表示,可以归一化的显示“相对频率”。将直方图统计值作为每个方向的深度值,考虑了频率分布,进一步提升了每个方向深度值的准确度。
下面根据不同场景对如何获取每个方向的深度值进行说明。
可选的,在一种实现方式中,无人机的成像设备包括设置有两个成像设 备的双目视觉系统,每个方向的待处理图像包括两个成像设备分别采集的图像。
S301中,对每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点,可以包括:
对两个成像设备分别采集的图像进行特征点提取和特征点匹配,获取匹配成功的特征点数。
S301中,若特征点数大于或者等于第一预设阈值,则获取每个方向的深度值,可以包括:
采用双目匹配算法获取匹配成功的特征点的深度值,并根据获取的匹配成功的特征点的深度值确定每个方向的深度值。
具体的,该种实现方式应可以用于形成双目视觉系统的方向上。当匹配成功的特征点数大于或者等于第一预设阈值,采用双目匹配算法获得该方向的深度值。
可选的,若特征点数小于第一预设阈值,则S301中,获取每个方向的深度值,可以包括:
对于两个成像设备中的至少一个成像设备,若根据至少一个成像设备采集的多个图像采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的至少一个匹配成功的特征点的深度值确定每个方向的深度值。可选地,根据至少一个成像设备采集的两个图像采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的至少一个匹配成功的特征点的深度值确定每个方向的深度。
具体的,该种实现方式应可以用于形成双目视觉系统的方向上。当匹配成功的特征点数小于第一预设阈值,采用三角化算法获得该方向的深度值。
下面对三角化算法进行简单说明。
图4为本发明实施例涉及的三角化算法的原理示意图。如图4所示,G代表世界坐标系下的原点。C0,C1,C2是三个不同的相机位姿,从不同角度来拍摄同一个蜜蜂。可以看到,蜜蜂蛰在不同角度采集的图像上的点的位置不同,分别是p0,p1,p2。在已知C0,C1,C2的相机位姿(通过R表示旋转变换,通过t表示位移变换)的情况下,可以求解出蜜蜂蛰P的真实三维位置。可以看出,这个和GPS定位是很类似的,都是从多个角度观测,并 且已知位姿,求解某一点的三维位置。
理论上,P(x,y,z)投影到C0机位的归一化平面上是:
Figure PCTCN2018118787-appb-000001
实际可以测得p 0=[u 0,v 0] T。理想情况下,p 0′=p 0。但是实际上并不会完美相等,这里所产生的的误差就是重投影误差。我们要使误差最小化,所以需要用多个机位的图像观测,转化为最优化问题:
Figure PCTCN2018118787-appb-000002
可见,通过三角化算法,通过至少两个角度的观测,在已知位姿变化时,可以获得某一点的三维位置。
需要说明的是,本实施例对于三角化算法中需要观测的角度数量,或者说,同一个成像设备需要采集的图像的数量不做限定。可以大于或者等于2。
可选的,在另一种实现方式中,无人机的成像设备包括设置一个成像设备的单目视觉系统,每个方向的待处理图像包括该成像设备采集的多个图像。可选地,每个方向的待处理图像包括该单目视觉系统采集的两个图像。
S301中,对每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点,可以包括:
对两个图像进行特征点提取和特征点匹配,获取匹配成功的特征点数。
S301中,获取每个方向的深度值,可以包括:
若采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的至少一个匹配成功的特征点的深度值确定每个方向的深度值。
具体的,该种实现方式可以应用于形成单目视觉系统的方向上。当采用三角化算法至少成功一次,获得至少一个匹配成功的特征点的深度值时,通过三角化算法获得该方向的深度值。
可选的,S301中,获取每个方向的深度值,还可以包括:
若采用三角化算法无法获取任意一个匹配成功的特征点的深度值,则将预设深度值确定为每个方向的深度值。
具体的,该种实现方式可以应用于采用三角化算法的场景中。例如,在形成单目视觉系统的方向上。又例如,虽然该方向形成双目视觉系统,但是 仅通过其中一个成像设备采集的图像采用三角化算法。而且,当采用三角化算法一次都没有成功,无法获得匹配成功的特征点的深度值时,将预设深度值确定为该方向的深度值。
需要说明的是,本实施例对于预设深度值的具体取值不做限定。例如,500米。
下面通过具体场景对第一方向进行说明。
可选的,在一个示例中,无人机从高楼的窗户飞出。此时,无人机的高度发生跳变。
原来的第一方向:刚飞出窗户时,第一方向仍然认为是位于无人机的下方的成像设备,即下视方向。因为在下视方向,三角化算法成功的特征点点数最多。但实际上由于高度跳变,下视方向的深度值很大,此时下视方向已不再适合作为第一方向了。
重新确定的第一方向:因为下视方向的点深度很大,所以,即使三角化算法成功的点数比较大,通过综合考虑三角化成功的点数和深度,比较各个方向的N/d0,将第一方向修改为除下视之外的其他方向,例如后视方向。其中,N表示三角化成功的特征点的数量。d0表示每个方向的深度值。
可选的,在另一个示例中,无人机在低空运动档位大姿态飞行时刹车回荡。
原来的第一方向:下视方向的视角(Field of Vision,FoV)大,看到的特征点点数最多,此时第一方向仍然认为是下视。
重新确定的第一方向:当无人机的姿态很大时,无人机向前倾斜,此时前视方向距离地面更近。比较各个方向的N/d0,此时将第一方向修改为前视方向。
本实施例提供一种图像处理方法,在确定第一方向时,对于至少两个方向中的每个方向,对每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点。对于匹配成功的特征点,获取匹配成功的特征点数和每个方向的深度值,在至少两个方向中,根据特征点数和深度值确定第一方向。本实施例提供的图像处理方法,通过综合考虑匹配成功的特征点数和深度值,提升了确定第一方向的准确性。
图5为本发明实施例三提供的图像处理方法的流程图。本实施例提供的图像处理方法,在图2所示实施例的基础上,提供了图像处理方法的另一种实现方式。主要提供了S202中,获取第一方向的参考值的实现方式。
如图5所示,S202中,获取第一方向的参考值,可以包括:
S501、在第一方向对应的待处理图像中获取两个图像。
S502、根据两个图像获取第一方向的参考值。
具体的,在确定第一方向后,可以从第一方向的待处理图像中选取两个图像,以获取第一方向的参考值。
可选的,获取的两个图像可以包括第一方向上同一个成像设备采集的两个图像。
其中,同一个成像设备采集的两个图像之间可以存在时间间隔。为了提升第一方向的参考值的准确性,所述时间间隔小于或者等于预设时间间隔。本实施例对于预设时间间隔的具体取值不做限定。
可选的,同一个成像设备采集的两个图像包括同一个成像设备采集的相邻两帧图像。
下面,对第一方向的参考值的实现方式进行说明。
可选的,在一种实现方式中,第一方向的参考值包括两个图像之间进行特征点匹配的成功率。
其对应的预设条件为:特征点匹配的成功率小于或者等于第二预设阈值。
相应的,S203中,若第一方向的参考值满足预设条件,则更新至少两个方向对应的关键参考帧,可以包括:
若特征点匹配的成功率小于或者等于第二预设阈值,则更新至少两个方向分别对应的关键参考帧。
具体的,特征点匹配的成功率越高,说明第一方向上发生的变化越小。反之,特征点匹配的成功率越低,说明第一方向上发生的变化越大。如果特征点匹配的成功率小于或等于一定数值,发生的变化足够大时,当前的关键参考帧已经不准确了,因此,更新至少两个方向分别对应的关键参考帧。
需要说明的是,本实施例对于第二预设阈值的具体取值不做限定。例如,50%。
可选的,在另一种实现方式中,第一方向的参考值包括两个图像之间匹 配成功的特征点的视差。
其对应的预设条件为:两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值。
相应的,S203中,若第一方向的参考值满足预设条件,则更新至少两个方向对应的关键参考帧,可以包括:
若两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值,则更新至少两个方向分别对应的关键参考帧。
具体的,匹配成功的特征点的视差越大,说明第一方向上发生的变化越大。反之,匹配成功的特征点的视差越小,说明第一方向上发生的变化越小。如果匹配成功的特征点的视差大于或等于一定数值,发生的变化足够大时,当前的关键参考帧已经不准确了,因此,更新至少两个方向分别对应的关键参考帧。
需要说明的是,本实施例对于第三预设阈值的具体取值不做限定。例如,10个像素。
需要说明的是,第一方向的参考值包括两个图像之间匹配成功的特征点的视差时,该视差可以根据两个图像之间所有匹配成功的特征点的视差确定。
可选的,第一方向的参考值可以为两个图像之间所有匹配成功的特征点的视差的平均值。
可选的,第一方向的参考值可以为两个图像之间所有匹配成功的特征点的视差的直方图统计值。
可选地,在一种实现方式中,第一方向的参考值包括两个图像之间进行特征点匹配的成功率和两个图像之间匹配成功的特征点的视差。具体地,若特征点匹配的成功率大于第二预设阈值时,进一步判断两个图像之间匹配成功的特征点的视差。若两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值,则更新至少两个方向分别对应的关键参考帧。
本实施例提供一种图像处理方法,通过在第一方向对应的待处理图像中获取两个图像,根据两个图像可以获取第一方向的参考值。如果第一方向的参考值满足关键参考帧的更新条件,则同时切换所有方向上各自对应的关键参考帧。降低了计算量,简化了更新关键参考帧的复杂度,提升了处理效率。
本发明实施例四还提供一种图像处理方法。本实施例在图2~图5所示实施例的基础上,提供了图像处理方法的另一种实现方式。
本实施例提供的图像处理方法,还可以包括:
根据至少两个方向中每个方向分别对应的深度值,在至少两个方向中确定第二方向。
具体的,每个方向分别对应的深度值,反映了无人机在每个方向上的距离远近。深度值越大,说明无人机在该方向上越远。反之,深度值越小,说明无人机在该方向上越近。通过至少两个方向中每个方向分别对应的深度值,在至少两个方向中确定第二方向。第二方向用于后续获取无人机的位置、姿态和速度信息时为选择数据来源提供主要依据。提升了确定无人机的位置、姿态和速度信息的准确性。
可选的,根据至少两个方向中每个方向分别对应的深度值,在至少两个方向中确定第二方向,可以包括:
在至少两个方向中,将深度值的最小值对应的方向确定为第二方向。
通过将深度值最小的方向,即无人机距离最近的方向确定为第二方向,提升了选择数据来源的准确性。
可选的,本实施例提供的图像处理方法,还可以包括:
对于至少两个方向中的每个方向,获取待处理的当前帧图像。
根据每个方向当前对应的关键参考帧,获取当前帧图像中与对应的关键参考帧匹配成功的特征点。
根据每个方向上与对应的关键参考帧匹配成功的特征点,获取第二方向上第一数值个特征点,以及除第二方向之外的其他方向上预设数值个特征点。其中,第一数值均大于其他方向分别对应的预设数值。
下面通过示例进行说明。
假设,至少两个方向包括无人机的前方(前视)、后方(后视)、下方(下视)、左侧(左视)和右侧(右视)。第二方向为下视。在选择数据来源时,以下视为主要数据来源。例如,在下视方向上选择50个匹配成功的特征点。在其他的每个方向上,各选取30个匹配成功的特征点。这样,一共选取50+4*30=170个特征点。而且,由于第二方向为主要数据来源,提升了选择数据来源的准确性。
需要说明的是,本实施例对于第一数值和其他每个方向分别对应的预设数值的具体取值不做限定。其他各个方向分别对应的预设数值可以相同,也可以不同。
可选的,本实施例提供的图像处理方法,还可以包括:
根据至少两个方向上的当前帧图像中与对应的关键参考帧匹配成功的特征点获取特征点的三维位置信息。
根据三维位置信息获取无人机的运动信息。可选的,三维位置信息可以为在无人机坐标系中的三维位置信息或者成像设备坐标系中的三维位置信息或者在世界坐标系中的三维位置信息。
可选地,获取特征点的三维位置信息后,可以通过诸如卡尔曼滤波器(Kalman Filter)等算法,获取无人机的运动信息。
可选的,无人机的运动信息可以包括下列中的至少一项:无人机的位置信息、无人机的姿态信息和无人机的速度信息。
本实施例提供的图像处理方法,通过根据至少两个方向中每个方向分别对应的深度值,在至少两个方向中确定第二方向。第二方向用于后续获取无人机的位置、姿态和速度信息时为选择数据来源提供主要依据。提升了确定无人机的位置、姿态和速度信息的准确性。
本发明实施例五还提供一种图像处理方法。本实施例在上述方法实施例一~实施例四的基础上,提供了图像处理方法的另一种实现方式。
本实施例提供的图像处理方法,还可以包括:
剔除匹配成功的特征点中的离群点(outlier)。
具体的,通过剔除匹配成功的特征点中的离群点,可以使得获得匹配成功的特征点更加准确,进而提升了关键参考帧更新的准确率,提升了确定无人机运动信息的准确性。
需要说明的是,本实施例对于执行剔除匹配成功的特征点中的离群点的执行位置不做限定,只要输出了匹配成功的特征点,均可以剔除其中的离群点。例如,S301中,获取匹配成功的特征点之后,可以执行剔除匹配成功的特征点中离群点的步骤。
相应的,根据至少两个方向上的当前帧图像中与对应的关键参考帧匹配 成功的特征点获取特征点的三维位置信息,根据三维位置信息获取无人机的运动信息,可以包括:
根据至少两个方向上已经执行剔除离群点操作的特征点获取特征点的三维位置信息,根据三维位置信息获取无人机的运动信息,
可选的,在一种实现方式中,剔除匹配成功的特征点中的离群点,可以包括:
采用极线约束算法剔除匹配成功的特征点中的离群点。
可选的,在另一种实现方式中,剔除匹配成功的特征点中的离群点,可以包括:
对于至少两个方向中的每个方向,获取每个方向当前对应的关键参考帧中特征点的三维位置信息、获取每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的特征点的二维位置信息,以及获取关键参考帧与当前帧图像的第一外参。
根据三维位置信息、二维位置信息和第一外参,获取关键参考帧与当前帧图像的第二外参。
获取多个第二外参,将获取的多个第二外参相互校验,其中,校验不通过的特征点为匹配成功的特征点中的离群点。
剔除匹配成功的特征点中的离群点。
其中,第一外参可以包括旋转矩阵和/或位移矩阵,是指通过惯性测量单元(Inertial measurement unit,IMU)等传感器测量获得的数据。第二外参可以包括旋转矩阵和/或位移矩阵,是根据每个方向当前对应的关键参考帧中特征点的三维位置信息、每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的特征点的二维位置信息,以及第一外参获得数据。可选的,可以采用PNP(Perspective-n-Point)透视n点算法获得第二外参。然后,获取当前帧图像中的多个特征点对应的第二外参,通过对多个特征点对应的第二外参相互校验,可以剔除校验不通过的特征点,即离群点。
通过PNP算法结合校验算法剔除离群点,进一步提升了剔除离群点的准确率。
需要说明的是,本实施例对于校验算法的实现方式不做限定。例如,可以为随机抽样一致性(Random sample consensus,RANSAC)算法。
可选的,获取每个方向当前对应的关键参考帧中特征点的三维位置信息,可以包括:
采用双目匹配算法或者三角化算法,获取每个方向当前对应的关键参考帧中特征点的三维位置信息。
可选的,在又一种实现方式中,若匹配成功的特征点是通过双目视觉系统中两个成像设备分别采集的图像获得的,剔除匹配成功的特征点中的离群点,还可以包括:
获取每个匹配成功的特征点的视差值。
若在所有匹配成功的特征点中,视差值大于或者等于第四预设阈值的特征点的占比大于或者等于第五预设阈值,则针对每个视差值大于或者等于第四预设阈值的特征点,比较分别采用双目匹配算法和三角化算法获得的每个特征点的深度值之间的差值。
若差值大于或者等于第六预设阈值,则剔除每个特征点。
具体的,首先获取每个匹配成功的特征点的视差值。对所有视差值进行概率统计。假设,80%的特征点的视差值都小于1.5像素。此时,第四预设阈值为1.5像素。第五预设阈值为20%。那么,需要进一步检查剩下的20%的特征点的视差值为什么取值较大。此时,针对剩下的20%的每个特征点,分别采用双目匹配算法和三角化算法获得的每个特征点的深度值,并比较深度值之间的差值。如果差值大于或者等于第六预设阈值,则剔除该特征点。
通过概率统计先区分出一部分特征点,再通过双目匹配算法和三角化算法继续在这部分特征点中筛选离群点,从而剔除离群点。进一步提升了剔除离群点的准确率。
可选的,在又一种实现方式中,剔除匹配成功的特征点中的离群点,还可以包括:
针对至少两个方向中每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的每个特征点,根据每个特征点的三维位置信息获得每个特征点在当前帧图像中的重投影二维位置信息。
根据每个特征点在当前帧图像中的二维位置信息以及重投影二维位置信息,获得每个特征点的重投影误差。
若重投影误差大于或者等于第七预设阈值,则剔除每个特征点。
具体的,对于每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的每个特征点,先通过三维位置信息与二维位置信息之间的转换关系,根据特征点的三维位置信息获得进行重投影后的重投影二维位置信息。之后,根据当前帧图像获得特征点在当前帧图像中的二维位置信息。将这两个二维位置信息进行重投影比较。如果重投影误差大于或者等于第七预设阈值,则剔除每个特征点。
通过示例进行说明。
假设,在无人机前视方向上的当前帧图像中,存在特征点A。特征点A与前视方向的关键参考帧匹配成功。通过计算,可以获得特征点A的三维位置信息。现在,根据特征点A的三维位置信息对特征点A在当前帧图像中进行重投影,得到重投影二维位置信息,假设对应的点为A’。理论上,A与A’应该重合,或者两者之间的重投影误差小于很小的值。相反的,如果两者之间的重投影误差很大,大于第七预设阈值了,则说明特征点A为离群点,需要删除。
需要说明的是,本实施例对于三维位置信息与二维位置信息之间的转换关系不做限定。例如,根据相机模型方程获得。
下面对相机模型进行简单说明。
Figure PCTCN2018118787-appb-000003
其中,[u,v,1] T表示图像坐标系(Homogeneous image coordinates)中的2D点。
[x w,y w,z w] T表示世界坐标系(World coordinates)中的3D点。
矩阵K称为摄像机标定矩阵(Camera calibration matrix),即,相机的内参(Intrinsic Parameters)。
对于有限投影相机(Finite projective camera)来说,矩阵K包含了5个内参。具体如下:
Figure PCTCN2018118787-appb-000004
其中,α x=fm x,α y=fm y,f为焦距(focal length),mx和my为x、 y方向上,单位距离的像素数(scale factors)。γ为x、y轴之间的畸变参数(skew parameters)(CCD相机,像素不为正方形)。μ 0,v 0为光心位置(principal point)。
矩阵R称为旋转矩阵(Rotation Matrix),矩阵T称为位移矩阵(Translation Matrix)。R和T为相机的外参(Extrinsic Matrix),用于表达三维空间中,世界坐标系到相机坐标系的旋转与位移变换。
可见,通过相机模型,可以根据三维位置信息获得二维位置信息。
下面通过具体场景对剔除离群点的效果进行说明。
可选的,在一个示例中,无人机悬停,下方为纹理场景。例如,下方物体为纯白色桌子。
原来的第一方向:无人机悬停的时候,由于纯白色桌子纹理很弱,特征点匹配错误的数量较多。由于不能有效剔除匹配错误的特征点,导致第一方向仍然认为是下视方向。
重新确定的第一方向:将错误匹配的特征点剔除后,三角化成功点的数量最多的方向不再是下视方向。此时,可以根据前述方法将第一方向修改为前视方向或者后视方向等其他更为合适的方向。
本实施例提供的图像处理方法,通过剔除匹配成功的特征点中的离群点,可以使得获得匹配成功的特征点更加准确,进而提升了关键参考帧更新的准确率,提升了确定无人机运动信息的准确性。
图6为本发明实施例一提供的无人机的结构示意图。如图6所示,本实施例提供的无人机,用于执行上述方法实施例提供的图像处理方法。如图6所示,本实施例提供的无人机,无人机在至少两个方向上设置有成像设备,无人机包括存储器62和处理器61。
存储器62用于存储指令。
处理器61用于运行指令以实现:
获取至少两个方向中每个方向的待处理图像。
根据至少两个方向中每个方向的待处理图像,在至少两个方向中确定第一方向,并获取第一方向的参考值。第一方向的参考值用于确定是否更新至少两个方向分别对应的关键参考帧。
若第一方向的参考值满足预设条件,则更新至少两个方向分别对应的关键参考帧。
可选的,处理器61具体用于:
对于至少两个方向中的每个方向,对每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点。对于匹配成功的特征点,获取匹配成功的特征点数和每个方向的深度值。其中,每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的。
在至少两个方向中,根据特征点数和深度值确定第一方向。
可选的,处理器61具体用于:
获取特征点数与每个方向的深度值的比值,并对比值进行排序,比值的最大值对应的方向确定为第一方向。
可选的,每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的,包括:
每个方向的深度值为根据匹配成功的特征点分别对应的深度值的平均值。或者,
每个方向的深度值为根据匹配成功的特征点的深度值的直方图统计值。
可选的,成像设备包括设置有两个成像设备的双目视觉系统,每个方向的待处理图像包括两个成像设备分别采集的图像。
处理器61具体用于:
对两个成像设备分别采集的图像进行特征点提取和特征点匹配,获取匹配成功的特征点数。
若特征点数大于或者等于第一预设阈值,则采用双目匹配算法获取匹配成功的特征点的深度值,并根据获取的匹配成功的特征点的深度值确定每个方向的深度值。
可选的,处理器61还用于:
若特征点数小于第一预设阈值,则对于两个成像设备中的至少一个成像设备,若根据至少一个成像设备采集的多个图像采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的至少一个匹配成功的特征点的深度值确定每个方向的深度值。
可选的,成像设备包括设置一个成像设备的单目视觉系统,每个方向的 待处理图像包括该成像设备采集的多个图像。
处理器61具体用于:
对多个图像进行特征点提取和特征点匹配,获取匹配成功的特征点数。
若采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的至少一个匹配成功的特征点的深度值确定每个方向的深度值。
可选的,处理器61还用于:
若采用三角化算法无法获取任意一个匹配成功的特征点的深度值,则将预设深度值确定为每个方向的深度值。
可选的,处理器61具体用于:
在第一方向对应的待处理图像中获取两个图像。
根据两个图像获取第一方向的参考值。
可选的,第一方向的参考值包括两个图像之间进行特征点匹配的成功率。
预设条件为特征点匹配的成功率小于或者等于第二预设阈值。
处理器61具体用于:
若特征点匹配的成功率小于或者等于第二预设阈值,则更新至少两个方向分别对应的关键参考帧。
可选的,第一方向的参考值还包括两个图像之间匹配成功的特征点的视差。
预设条件为两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值。
处理器61具体用于:
若两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值,则更新至少两个方向分别对应的关键参考帧。
可选的,第一方向的参考值为两个图像之间所有匹配成功的特征点的视差的平均值。
可选的,两个图像包括第一方向上同一个成像设备采集的两个图像。
可选的,同一个成像设备采集的两个图像包括同一个成像设备采集的相邻两帧图像。
可选的,处理器61还用于:
根据至少两个方向中每个方向分别对应的深度值,在至少两个方向中确 定第二方向。
可选的,处理器61具体用于:
在至少两个方向中,将深度值的最小值对应的方向确定为第二方向。
可选的,处理器61还用于:
对于至少两个方向中的每个方向,获取待处理的当前帧图像。
根据每个方向当前对应的关键参考帧,获取当前帧图像中与对应的关键参考帧匹配成功的特征点。
根据每个方向上与对应的关键参考帧匹配成功的特征点,获取第二方向上第一数值个特征点,以及除第二方向之外的其他方向上预设数值个特征点。其中,第一数值均大于其他方向分别对应的预设数值。
可选的,处理器61还用于:
根据至少两个方向上的当前帧图像中与对应的关键参考帧匹配成功的特征点获取特征点的三维位置信息。
根据三维位置信息获取无人机的运动信息。
可选的,三维位置信息为在无人机坐标系中的三维位置信息或者成像设备坐标系中的三维位置信息或者在世界坐标系中的三维位置信息。
可选的,无人机的运动信息包括下列中的至少一项:无人机的位置信息、无人机的姿态信息和无人机的速度信息。
可选的,处理器61还用于:
剔除匹配成功的特征点中的离群点。
可选的,处理器61具体用于:
采用极线约束算法剔除匹配成功的特征点中的离群点。
可选的,处理器61具体用于:
对于至少两个方向中的每个方向,获取每个方向当前对应的关键参考帧中特征点的三维位置信息、获取每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的特征点的二维位置信息,以及获取关键参考帧与当前帧图像的第一外参。
根据三维位置信息、二维位置信息和第一外参,获取关键参考帧与当前帧图像的第二外参。
获取多个第二外参,将获取的多个第二外参相互校验,其中,校验不通 过的特征点为匹配成功的特征点中的离群点。
剔除匹配成功的特征点中的离群点。
可选的,处理器61具体用于:
采用双目匹配算法或者三角化算法,获取每个方向当前对应的关键参考帧中特征点的三维位置信息。
可选的,若匹配成功的特征点是通过双目视觉系统中两个成像设备分别采集的图像获得的,处理器61还用于:
获取每个匹配成功的特征点的视差值。
若在所有匹配成功的特征点中,视差值大于或者等于第四预设阈值的特征点的占比大于或者等于第五预设阈值,则针对每个视差值大于或者等于第四预设阈值的特征点,比较分别采用双目匹配算法和三角化算法获得的每个特征点的深度值之间的差值。
若差值大于或者等于第六预设阈值,则剔除每个特征点。
可选的,处理器61还用于:
针对至少两个方向中每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的每个特征点,根据每个特征点的三维位置信息获得每个特征点在当前帧图像中的重投影二维位置信息;
根据每个特征点在当前帧图像中的二维位置信息以及重投影二维位置信息,获得每个特征点的重投影误差。
若重投影误差大于或者等于第七预设阈值,则剔除每个特征点。
可选的,至少两个方向包括无人机的前方、后方、下方、左侧和右侧中的至少两个方向。
可选的,成像设备包括下列中的至少一种:单目视觉传感器、双目视觉传感器和主拍摄相机。
本实施例提供的无人机,用于执行上述方法实施例提供的图像处理方法。技术原理和技术效果相似,此处不再赘述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而 前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明实施例的技术方案,而非对其限制;尽管参照前述各实施例对本发明实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的范围。

Claims (58)

  1. 一种图像处理方法,其特征在于,应用于无人机,所述无人机在至少两个方向上设置有成像设备,所述方法包括:
    获取所述至少两个方向中每个方向的待处理图像;
    根据所述至少两个方向中每个方向的待处理图像,在所述至少两个方向中确定第一方向,并获取所述第一方向的参考值;所述第一方向的参考值用于确定是否更新所述至少两个方向分别对应的关键参考帧;
    若所述第一方向的参考值满足预设条件,则更新所述至少两个方向分别对应的关键参考帧。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述至少两个方向中每个方向的待处理图像,在所述至少两个方向中确定第一方向,包括:
    对于所述至少两个方向中的每个方向,对所述每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点;对于匹配成功的特征点,获取匹配成功的特征点数和所述每个方向的深度值;其中,所述每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的;
    在所述至少两个方向中,根据特征点数和深度值确定所述第一方向。
  3. 根据权利要求2所述的方法,其特征在于,所述根据特征点数和深度值确定所述第一方向,包括:
    获取特征点数与所述每个方向的深度值的比值,并对所述比值进行排序,所述比值的最大值对应的方向确定为所述第一方向。
  4. 根据权利要求2所述的方法,其特征在于,所述每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的,包括:
    所述每个方向的深度值为根据匹配成功的特征点分别对应的深度值的平均值;或者,
    所述每个方向的深度值为根据匹配成功的特征点的深度值的直方图统计值。
  5. 根据权利要求2所述的方法,其特征在于,所述成像设备包括设置有两个成像设备的双目视觉系统,所述每个方向的待处理图像包括所述两个成像设备分别采集的图像;
    所述对所述每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点,包括:
    对所述两个成像设备分别采集的图像进行特征点提取和特征点匹配,获取匹配成功的特征点数;
    若特征点数大于或者等于第一预设阈值,则获取所述每个方向的深度值,包括:
    采用双目匹配算法获取匹配成功的特征点的深度值,并根据获取的所述匹配成功的特征点的深度值确定所述每个方向的深度值。
  6. 根据权利要求5所述的方法,其特征在于,还包括:
    若所述特征点数小于所述第一预设阈值,则获取所述每个方向的深度值,包括:
    对于所述两个成像设备中的至少一个成像设备,若根据所述至少一个成像设备采集的多个图像采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的所述至少一个匹配成功的特征点的深度值确定所述每个方向的深度值。
  7. 根据权利要求2所述的方法,其特征在于,所述成像设备包括设置有一个成像设备的单目视觉系统,所述每个方向的待处理图像包括所述成像设备采集的多个图像;
    所述对所述每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点,包括:
    对所述多个图像进行特征点提取和特征点匹配,获取匹配成功的特征点数;
    获取所述每个方向的深度值,包括:
    若采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的所述至少一个匹配成功的特征点的深度值确定所述每个方向的深度值。
  8. 根据权利要求6或7所述的方法,其特征在于,获取所述每个方向的深度值,还包括:
    若采用三角化算法无法获取任意一个匹配成功的特征点的深度值,则将预设深度值确定为所述每个方向的深度值。
  9. 根据权利要求1所述的方法,其特征在于,所述获取所述第一方向的参考值,包括:
    在所述第一方向对应的待处理图像中获取两个图像;
    根据所述两个图像获取所述第一方向的参考值。
  10. 根据权利要求9所述的方法,其特征在于,所述第一方向的参考值包括所述两个图像之间进行特征点匹配的成功率;
    所述预设条件为特征点匹配的成功率小于或者等于第二预设阈值;
    其中,所述若所述第一方向的参考值满足预设条件,则更新所述至少两个方向对应的关键参考帧,包括:
    若所述特征点匹配的成功率小于或者等于第二预设阈值,则更新所述至少两个方向分别对应的关键参考帧。
  11. 根据权利要求9所述的方法,其特征在于,所述第一方向的参考值包括所述两个图像之间匹配成功的特征点的视差;
    所述预设条件为所述两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值;
    其中,所述若所述第一方向的参考值满足预设条件,则更新所述至少两个方向对应的关键参考帧,包括:
    若所述两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值,则更新所述至少两个方向分别对应的关键参考帧。
  12. 根据权利要求11所述的方法,其特征在于,所述第一方向的参考值为所述两个图像之间所有匹配成功的特征点的视差的平均值。
  13. 根据权利要求9所述的方法,其特征在于,所述两个图像包括所述第一方向上同一个成像设备采集的两个图像。
  14. 根据权利要求13所述的方法,其特征在于,所述同一个成像设备采集的两个图像包括所述同一个成像设备采集的相邻两帧图像。
  15. 根据权利要求2所述的方法,其特征在于,还包括:
    根据所述至少两个方向中每个方向分别对应的深度值,在所述至少两个方向中确定第二方向。
  16. 根据权利要求15所述的方法,其特征在于,所述根据所述至少两个方向中每个方向分别对应的深度值,在所述至少两个方向中确定第二方向,包括:
    在所述至少两个方向中,将深度值的最小值对应的方向确定为所述第二方向。
  17. 根据权利要求15所述的方法,其特征在于,还包括:
    对于所述至少两个方向中的每个方向,获取待处理的当前帧图像;
    根据所述每个方向当前对应的关键参考帧,获取所述当前帧图像中与对应的关键参考帧匹配成功的特征点;
    根据每个方向上与对应的关键参考帧匹配成功的特征点,获取所述第二方向上第一数值个特征点,以及除所述第二方向之外的其他方向上预设数值个特征点;其中,所述第一数值均大于所述其他方向分别对应的预设数值。
  18. 根据权利要求17所述的方法,其特征在于,还包括:
    根据所述至少两个方向上的所述当前帧图像中与对应的关键参考帧匹配成功的特征点获取所述特征点的三维位置信息;
    根据所述三维位置信息获取所述无人机的运动信息。
  19. 根据权利要求18所述的方法,其特征在于,所述三维位置信息为在无人机坐标系中的三维位置信息或者成像设备坐标系中的三维位置信息或者在世界坐标系中的三维位置信息。
  20. 根据权利要求18所述的方法,其特征在于,所述无人机的运动信息包括下列中的至少一项:所述无人机的位置信息、所述无人机的姿态信息和所述无人机的速度信息。
  21. 根据权利要求2所述的方法,其特征在于,还包括:
    剔除匹配成功的特征点中的离群点。
  22. 根据权利要求21所述的方法,其特征在于,所述剔除匹配成功的特征点中的离群点,包括:
    采用极线约束算法剔除匹配成功的特征点中的离群点。
  23. 根据权利要求21所述的方法,其特征在于,所述剔除匹配成功的特征点中的离群点,包括:
    对于所述至少两个方向中的每个方向,获取所述每个方向当前对应的关键参考帧中特征点的三维位置信息、获取所述每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的特征点的二维位置信息,以及获取所述关键参考帧与所述当前帧图像的第一外参;
    根据所述三维位置信息、所述二维位置信息和所述第一外参,获取所述关键参考帧与所述当前帧图像的第二外参;
    获取多个所述第二外参,将获取的多个所述第二外参相互校验,其中,校验不通过的特征点为所述匹配成功的特征点中的离群点;
    剔除所述匹配成功的特征点中的离群点。
  24. 根据权利要求23所述的方法,所述获取所述每个方向当前对应的关键参考帧中特征点的三维位置信息,包括:
    采用双目匹配算法或者三角化算法,获取所述每个方向当前对应的关键 参考帧中特征点的三维位置信息。
  25. 根据权利要求21或23所述的方法,其特征在于,若匹配成功的特征点是通过双目视觉系统中两个成像设备分别采集的图像获得的,所述剔除匹配成功的特征点中的离群点,还包括:
    获取每个匹配成功的特征点的视差值;
    若在所有匹配成功的特征点中,视差值大于或者等于第四预设阈值的特征点的占比大于或者等于第五预设阈值,则针对每个视差值大于或者等于第四预设阈值的特征点,比较分别采用双目匹配算法和三角化算法获得的所述每个特征点的深度值之间的差值;
    若所述差值大于或者等于第六预设阈值,则剔除所述每个特征点。
  26. 根据权利要求21所述的方法,其特征在于,所述剔除匹配成功的特征点中的离群点,还包括:
    针对所述至少两个方向中每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的每个特征点,根据所述每个特征点的三维位置信息获得所述每个特征点在所述当前帧图像中的重投影二维位置信息;
    根据所述每个特征点在所述当前帧图像中的二维位置信息以及重投影二维位置信息,获得所述每个特征点的重投影误差;
    若所述重投影误差大于或者等于第七预设阈值,则剔除所述每个特征点。
  27. 根据权利要求1所述的方法,其特征在于,所述至少两个方向包括无人机的前方、后方、下方、左侧和右侧中的至少两个方向。
  28. 根据权利要求1所述的方法,其特征在于,所述成像设备包括下列中的至少一种:单目视觉传感器、双目视觉传感器和主拍摄相机。
  29. 一种无人机,其特征在于,所述无人机在至少两个方向上设置有成像设备,所述无人机包括存储器和处理器;
    所述存储器用于存储指令;
    所述处理器用于运行所述指令以实现:
    获取所述至少两个方向中每个方向的待处理图像;
    根据所述至少两个方向中每个方向的待处理图像,在所述至少两个方向中确定第一方向,并获取所述第一方向的参考值;所述第一方向的参考值用于确定是否更新所述至少两个方向分别对应的关键参考帧;
    若所述第一方向的参考值满足预设条件,则更新所述至少两个方向分别对应的关键参考帧。
  30. 根据权利要求29所述的无人机,其特征在于,所述处理器具体用于:
    对于所述至少两个方向中的每个方向,对所述每个方向的待处理图像进行特征点提取和特征点匹配,获取匹配成功的特征点;对于匹配成功的特征点,获取匹配成功的特征点数和所述每个方向的深度值;其中,所述每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的;
    在所述至少两个方向中,根据特征点数和深度值确定所述第一方向。
  31. 根据权利要求30所述的无人机,其特征在于,所述处理器具体用于:
    获取特征点数与所述每个方向的深度值的比值,并对所述比值进行排序,所述比值的最大值对应的方向确定为所述第一方向。
  32. 根据权利要求30所述的无人机,其特征在于,所述每个方向的深度值是根据匹配成功的特征点分别对应的深度值确定的,包括:
    所述每个方向的深度值为根据匹配成功的特征点分别对应的深度值的平均值;或者,
    所述每个方向的深度值为根据匹配成功的特征点的深度值的直方图统计值。
  33. 根据权利要求30所述的无人机,其特征在于,所述成像设备包括设置有两个成像设备的双目视觉系统,所述每个方向的待处理图像包括所述两个成像设备分别采集的图像;
    所述处理器具体用于:
    对所述两个成像设备分别采集的图像进行特征点提取和特征点匹配,获取匹配成功的特征点数;
    若特征点数大于或者等于第一预设阈值,则采用双目匹配算法获取匹配成功的特征点的深度值,并根据获取的所述匹配成功的特征点的深度值确定所述每个方向的深度值。
  34. 根据权利要求33所述的无人机,其特征在于,所述处理器还用于:
    若所述特征点数小于所述第一预设阈值,则对于所述两个成像设备中的至少一个成像设备,若根据所述至少一个成像设备采集的多个图像采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的所述至少一个匹配成功的特征点的深度值确定所述每个方向的深度值。
  35. 根据权利要求30所述的无人机,其特征在于,所述成像设备包括设置有一个成像设备的单目视觉系统,所述每个方向的待处理图像包括该成像设备采集的多个图像;
    所述处理器具体用于:
    对所述多个图像进行特征点提取和特征点匹配,获取匹配成功的特征点数;
    若采用三角化算法获取至少一个匹配成功的特征点的深度值,则根据获取的所述至少一个匹配成功的特征点的深度值确定所述每个方向的深度值。
  36. 根据权利要求34或35所述的无人机,其特征在于,所述处理器还用于:
    若采用三角化算法无法获取任意一个匹配成功的特征点的深度值,则将预设深度值确定为所述每个方向的深度值。
  37. 根据权利要求29所述的无人机,其特征在于,所述处理器具体用于:
    在所述第一方向对应的待处理图像中获取两个图像;
    根据所述两个图像获取所述第一方向的参考值。
  38. 根据权利要求37所述的无人机,其特征在于,所述第一方向的参考值包括所述两个图像之间进行特征点匹配的成功率;
    所述预设条件为特征点匹配的成功率小于或者等于第二预设阈值;
    所述处理器具体用于:
    若所述特征点匹配的成功率小于或者等于第二预设阈值,则更新所述至少两个方向分别对应的关键参考帧。
  39. 根据权利要求37所述的无人机,其特征在于,所述第一方向的参考值还包括所述两个图像之间匹配成功的特征点的视差;
    所述预设条件为所述两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值;
    所述处理器具体用于:
    若所述两个图像之间匹配成功的特征点的视差大于或者等于第三预设阈值,则更新所述至少两个方向分别对应的关键参考帧。
  40. 根据权利要求39所述的无人机,其特征在于,所述第一方向的参考值为所述两个图像之间所有匹配成功的特征点的视差的平均值。
  41. 根据权利要求37所述的无人机,其特征在于,所述两个图像包括所述第一方向上同一个成像设备采集的两个图像。
  42. 根据权利要求41所述的无人机,其特征在于,所述同一个成像设备采集的两个图像包括所述同一个成像设备采集的相邻两帧图像。
  43. 根据权利要求30所述的无人机,其特征在于,所述处理器还用于:
    根据所述至少两个方向中每个方向分别对应的深度值,在所述至少两个方向中确定第二方向。
  44. 根据权利要求43所述的无人机,其特征在于,所述处理器具体用于:
    在所述至少两个方向中,将深度值的最小值对应的方向确定为所述第二 方向。
  45. 根据权利要求43所述的无人机,其特征在于,所述处理器还用于:
    对于所述至少两个方向中的每个方向,获取待处理的当前帧图像;
    根据所述每个方向当前对应的关键参考帧,获取所述当前帧图像中与对应的关键参考帧匹配成功的特征点;
    根据每个方向上与对应的关键参考帧匹配成功的特征点,获取所述第二方向上第一数值个特征点,以及除所述第二方向之外的其他方向上预设数值个特征点;其中,所述第一数值均大于所述其他方向分别对应的预设数值。
  46. 根据权利要求45所述的无人机,其特征在于,所述处理器还用于:
    根据所述至少两个方向上的所述当前帧图像中与对应的关键参考帧匹配成功的特征点获取所述特征点的三维位置信息;
    根据所述三维位置信息获取所述无人机的运动信息。
  47. 根据权利要求46所述的无人机,其特征在于,所述三维位置信息为在无人机坐标系中的三维位置信息或者成像设备坐标系中的三维位置信息或者在世界坐标系中的三维位置信息。
  48. 根据权利要求46所述的无人机,其特征在于,所述无人机的运动信息包括下列中的至少一项:所述无人机的位置信息、所述无人机的姿态信息和所述无人机的速度信息。
  49. 根据权利要求30所述的无人机,其特征在于,所述处理器还用于:
    剔除匹配成功的特征点中的离群点。
  50. 根据权利要求49所述的无人机,其特征在于,所述处理器具体用于:
    采用极线约束算法剔除匹配成功的特征点中的离群点。
  51. 根据权利要求49所述的无人机,其特征在于,所述处理器具体用于:
    对于所述至少两个方向中的每个方向,获取所述每个方向当前对应的关键参考帧中特征点的三维位置信息、获取所述每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的特征点的二维位置信息,以及获取所述关键参考帧与所述当前帧图像的第一外参;
    根据所述三维位置信息、所述二维位置信息和所述第一外参,获取所述关键参考帧与所述当前帧图像的第二外参;
    获取多个所述第二外参,将获取的多个所述第二外参相互校验,其中,校验不通过的特征点为所述匹配成功的特征点中的离群点;
    剔除所述匹配成功的特征点中的离群点。
  52. 根据权利要求51所述的无人机,所述处理器具体用于:
    采用双目匹配算法或者三角化算法,获取所述每个方向当前对应的关键参考帧中特征点的三维位置信息。
  53. 根据权利要求49或51所述的无人机,其特征在于,若匹配成功的特征点是通过双目视觉系统中两个成像设备分别采集的图像获得的,所述处理器还用于:
    获取每个匹配成功的特征点的视差值;
    若在所有匹配成功的特征点中,视差值大于或者等于第四预设阈值的特征点的占比大于或者等于第五预设阈值,则针对每个视差值大于或者等于第四预设阈值的特征点,比较分别采用双目匹配算法和三角化算法获得的所述每个特征点的深度值之间的差值;
    若所述差值大于或者等于第六预设阈值,则剔除所述每个特征点。
  54. 根据权利要求49所述的无人机,其特征在于,所述处理器还用于:
    针对所述至少两个方向中每个方向上待处理的当前帧图像中与对应的关键参考帧匹配成功的每个特征点,根据所述每个特征点的三维位置信息获得所述每个特征点在所述当前帧图像中的重投影二维位置信息;
    根据所述每个特征点在所述当前帧图像中的二维位置信息以及重投影二维位置信息,获得所述每个特征点的重投影误差;
    若所述重投影误差大于或者等于第七预设阈值,则剔除所述每个特征点。
  55. 根据权利要求29所述的无人机,其特征在于,所述至少两个方向包括无人机的前方、后方、下方、左侧和右侧中的至少两个方向。
  56. 根据权利要求29所述的无人机,其特征在于,所述成像设备包括下列中的至少一种:单目视觉传感器、双目视觉传感器和主拍摄相机。
  57. 一种计算机存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如权利要求1-28任一项的图像处理方法。
  58. 一种计算机程序,其特征在于,当所述计算机程序被计算机执行时,用于实现如权利要求1-28任一项的图像处理方法。
PCT/CN2018/118787 2018-11-30 2018-11-30 图像处理方法和无人机 WO2020107487A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2018/118787 WO2020107487A1 (zh) 2018-11-30 2018-11-30 图像处理方法和无人机
CN201880042469.8A CN110892354A (zh) 2018-11-30 2018-11-30 图像处理方法和无人机
US17/231,974 US20210256732A1 (en) 2018-11-30 2021-04-15 Image processing method and unmanned aerial vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/118787 WO2020107487A1 (zh) 2018-11-30 2018-11-30 图像处理方法和无人机

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/231,974 Continuation US20210256732A1 (en) 2018-11-30 2021-04-15 Image processing method and unmanned aerial vehicle

Publications (1)

Publication Number Publication Date
WO2020107487A1 true WO2020107487A1 (zh) 2020-06-04

Family

ID=69746140

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/118787 WO2020107487A1 (zh) 2018-11-30 2018-11-30 图像处理方法和无人机

Country Status (3)

Country Link
US (1) US20210256732A1 (zh)
CN (1) CN110892354A (zh)
WO (1) WO2020107487A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862848B (zh) * 2022-07-05 2022-10-21 江苏顺联工程建设有限公司 一种市政施工用吊装设备的智能控制方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045276A (zh) * 2015-07-03 2015-11-11 深圳一电科技有限公司 无人机飞行控制方法及装置
CN106516140A (zh) * 2016-10-14 2017-03-22 北京小米移动软件有限公司 一种具有航拍功能的飞行器
US20170253332A1 (en) * 2016-03-01 2017-09-07 Amazon Technologies, Inc. Six degree of freedom aerial vehicle with offset propulsion mechanisms
WO2018010097A1 (en) * 2016-07-12 2018-01-18 SZ DJI Technology Co., Ltd. Systems and methods for multi-orientation flight
CN108476288A (zh) * 2017-05-24 2018-08-31 深圳市大疆创新科技有限公司 拍摄控制方法及装置
CN108616738A (zh) * 2017-01-16 2018-10-02 翔升(上海)电子技术有限公司 用于无人机的图像处理方法、装置和系统

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6421622B1 (en) * 1998-06-05 2002-07-16 Crossbow Technology, Inc. Dynamic attitude measurement sensor and method
US20060209015A1 (en) * 2005-03-18 2006-09-21 Feldmeier David C Optical navigation system
EP1876411A4 (en) * 2005-04-25 2011-06-29 Geo Technical Lab Co Ltd METHOD FOR ANALYZING THE PICTURE POSITION
CN102104775B (zh) * 2009-12-18 2013-04-17 华为技术有限公司 一种帧率调整方法和装置
KR101708659B1 (ko) * 2014-06-17 2017-02-22 주식회사 유진로봇 이동 로봇의 맵을 업데이트하기 위한 장치 및 그 방법
WO2016187757A1 (en) * 2015-05-23 2016-12-01 SZ DJI Technology Co., Ltd. Sensor fusion using inertial and image sensors
KR102457617B1 (ko) * 2015-09-16 2022-10-21 한화테크윈 주식회사 영상 움직임 추정 방법 및 장치, 영상 안정화 방법 및 장치, 및 컴퓨터 기록매체
CN106934827A (zh) * 2015-12-31 2017-07-07 杭州华为数字技术有限公司 三维场景的重建方法和装置
CN106559605A (zh) * 2016-11-17 2017-04-05 天津大学 基于改进的块匹配算法的数字视频稳像方法
CN108121764B (zh) * 2016-11-26 2022-03-11 星克跃尔株式会社 图像处理装置、图像处理方法、电脑程序及电脑可读取记录介质
CN106688017B (zh) * 2016-11-28 2019-03-01 深圳市大疆创新科技有限公司 生成点云地图的方法、计算机系统和装置
US10957068B2 (en) * 2017-01-06 2021-03-23 Canon Kabushiki Kaisha Information processing apparatus and method of controlling the same
CN107197121B (zh) * 2017-06-14 2019-07-26 长春欧意光电技术有限公司 一种基于舰载设备的电子稳像方法
CN108597036B (zh) * 2018-05-03 2022-04-12 三星电子(中国)研发中心 虚拟现实环境危险感知方法及装置
CN108805908B (zh) * 2018-06-08 2020-11-03 浙江大学 一种基于时序网格流叠加的实时视频稳像方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045276A (zh) * 2015-07-03 2015-11-11 深圳一电科技有限公司 无人机飞行控制方法及装置
US20170253332A1 (en) * 2016-03-01 2017-09-07 Amazon Technologies, Inc. Six degree of freedom aerial vehicle with offset propulsion mechanisms
WO2018010097A1 (en) * 2016-07-12 2018-01-18 SZ DJI Technology Co., Ltd. Systems and methods for multi-orientation flight
CN106516140A (zh) * 2016-10-14 2017-03-22 北京小米移动软件有限公司 一种具有航拍功能的飞行器
CN108616738A (zh) * 2017-01-16 2018-10-02 翔升(上海)电子技术有限公司 用于无人机的图像处理方法、装置和系统
CN108476288A (zh) * 2017-05-24 2018-08-31 深圳市大疆创新科技有限公司 拍摄控制方法及装置

Also Published As

Publication number Publication date
CN110892354A (zh) 2020-03-17
US20210256732A1 (en) 2021-08-19

Similar Documents

Publication Publication Date Title
US20210012520A1 (en) Distance measuring method and device
WO2020014909A1 (zh) 拍摄方法、装置和无人机
WO2020113423A1 (zh) 目标场景三维重建方法、系统及无人机
WO2019113966A1 (zh) 一种避障方法、装置和无人机
CN111344644B (zh) 用于基于运动的自动图像捕获的技术
CN106873619B (zh) 一种无人机飞行路径的处理方法
CN108235815B (zh) 摄像控制装置、摄像装置、摄像系统、移动体、摄像控制方法及介质
EP3531375B1 (en) Method and apparatus for measuring distance, and unmanned aerial vehicle
WO2021035731A1 (zh) 无人飞行器的控制方法、装置及计算机可读存储介质
TW201832185A (zh) 利用陀螺儀的相機自動校準
WO2019144300A1 (zh) 目标检测方法、装置和可移动平台
CN108450032B (zh) 飞行控制方法和装置
US20210264666A1 (en) Method for obtaining photogrammetric data using a layered approach
JP2015114954A (ja) 撮影画像解析方法
WO2021081774A1 (zh) 一种参数优化方法、装置及控制设备、飞行器
WO2021081707A1 (zh) 数据处理方法、装置、可移动平台及计算机可读存储介质
WO2019183789A1 (zh) 无人机的控制方法、装置和无人机
WO2019189381A1 (ja) 移動体、制御装置、および制御プログラム
WO2020019175A1 (zh) 图像处理方法和设备、摄像装置以及无人机
WO2021013143A1 (zh) 装置、摄像装置、移动体、方法以及程序
US20210256732A1 (en) Image processing method and unmanned aerial vehicle
WO2021056411A1 (zh) 航线调整方法、地面端设备、无人机、系统和存储介质
WO2020113417A1 (zh) 目标场景三维重建方法、系统及无人机
JP2020016663A (ja) 検査システム
WO2021035746A1 (zh) 图像处理方法、装置和可移动平台

Legal Events

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

Ref document number: 18941496

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18941496

Country of ref document: EP

Kind code of ref document: A1