WO2019140688A1 - Image processing method and apparatus and computer readable storage medium - Google Patents

Image processing method and apparatus and computer readable storage medium Download PDF

Info

Publication number
WO2019140688A1
WO2019140688A1 PCT/CN2018/073632 CN2018073632W WO2019140688A1 WO 2019140688 A1 WO2019140688 A1 WO 2019140688A1 CN 2018073632 W CN2018073632 W CN 2018073632W WO 2019140688 A1 WO2019140688 A1 WO 2019140688A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
deformation
feature
folding
feature point
Prior art date
Application number
PCT/CN2018/073632
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 CN201880012242.9A priority Critical patent/CN110313020A/en
Priority to PCT/CN2018/073632 priority patent/WO2019140688A1/en
Publication of WO2019140688A1 publication Critical patent/WO2019140688A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image processing method, device, and computer readable storage medium.
  • Computer animation is a technique for making animations by means of a computer, including two-dimensional animation (2D) and three-dimensional animation (3D).
  • Computer animation can be done by CG (Computer Graphics).
  • CG Computer Graphics
  • the field of visual design and production using computer technology is called CG
  • CG is a general term for all graphics drawn by computer, such as web design, film and television special effects, multimedia technology, and the like.
  • the invention provides an image processing method, a device and a computer readable storage medium, which can reduce the acquisition complexity of an image having a folding effect (such as a folding city special effect) and improve the user experience.
  • a folding effect such as a folding city special effect
  • a first aspect of the embodiments of the present invention provides an image processing method, where the method includes:
  • a second aspect of embodiments of the present invention provides an image processing apparatus including a memory and a processor
  • the memory is configured to store program code
  • the processor is configured to invoke the program code, when the program code is executed, to perform the following operations: acquiring a plurality of 2D original images including a target object;
  • a third aspect of the embodiments of the present invention provides a computer readable storage medium, where the computer readable storage medium stores computer instructions, and when the computer instructions are executed, the image processing method is implemented, that is, the embodiment of the present invention The image processing method proposed in the first aspect.
  • the mobile platform since the mobile platform has good trajectory planning and has functions such as automatic flight and intelligent following, after the mobile platform acquires multiple 2D original images including the target object, the mobile platform can acquire according to the 2D original image. Folding the effect of 2D virtual images, reducing the acquisition complexity of images with folding effects (such as folding city effects), the above process is automatically completed, the user can shoot images with folding effect without intervention, and improve the user experience.
  • Figure 1 is a schematic structural view of a drone
  • FIG. 2 is a schematic diagram of an embodiment of an image processing method
  • Figure 3 is a schematic diagram of a deformation function
  • FIG. 4 is a schematic diagram of another embodiment of an image processing method
  • 5A-5F are schematic views of conversion of feature points
  • FIG. 6 is a schematic diagram of another embodiment of an image processing method
  • FIG. 7 is a schematic diagram of an embodiment of another image processing method
  • Figure 8 is a block diagram of one embodiment of an image processing apparatus.
  • first, second, third, etc. may be used to describe various information in the present invention, such information should not be limited to these terms. These terms are used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information without departing from the scope of the invention.
  • second information may also be referred to as the first information.
  • word "if” may be interpreted as "when", or "when", or "in response to determination.”
  • An embodiment of the present invention provides an image processing method for acquiring an image having a folding effect (such as a folding city effect), and the method can be applied to an image processing device.
  • the image processing device may acquire a plurality of original images including the target object for the mobile platform, and use the original images to obtain an image having a folding effect.
  • the image processing device may also be a control device. After the mobile platform acquires a plurality of original images including the target object, the original image is sent to the control device, and after the control device acquires the plurality of original images including the target object, the original image is utilized. Get an image with a folding effect.
  • the mobile platform may include, but is not limited to, a robot, a drone, an unmanned vehicle, a VR glasses, and an AR glasses.
  • control device may include, but is not limited to: a remote control, a smart phone/mobile phone, a tablet, a personal digital assistant (PDA), a laptop computer, a desktop computer, a media content player, a video game station/system, a virtual reality system, Augmented reality systems, wearable devices (eg, watches, glasses, gloves, headwear (eg, hats, helmets, virtual reality headsets, augmented reality headsets, head mounted devices (HMD), headbands), pendants , armbands, leg loops, shoes, vests, gesture recognition devices, microphones, any electronic device capable of providing or rendering image data, without limitation.
  • PDA personal digital assistant
  • the image processing device is a mobile platform, and the mobile platform is an unmanned aerial vehicle.
  • the unmanned aerial vehicle is installed with a cloud platform, and the shooting device (such as a camera, a camera, etc.) is fixed on the cloud platform, and the drone has Good trajectory planning, with automatic flight and intelligent following functions, can obtain multiple original images containing the target object through the shooting device, and obtain the image with folding effect according to the original image.
  • FIG. 1 for a schematic diagram of the structure of the drone.
  • 10 indicates the nose of the drone
  • 11 indicates the propeller of the drone
  • 12 indicates the fuselage of the drone
  • 13 indicates the tripod of the drone
  • 14 indicates the gimbal on the drone
  • 15 indicates the mount of the gimbal 14
  • the photographing apparatus 15 is connected to the body 12 of the drone through the pan/tilt head 14, 16 is a photographing lens of the photographing apparatus, and 17 is a target object.
  • the pan/tilt head 14 may be a three-axis pan/tilt head, that is, the pan/tilt head 14 rotates on the axis of the pan/tilt (Roll axis), the pitch axis (Pitch axis), and the yaw axis (Yaw axis). As shown in Fig. 1, 1 indicates the Roll axis of the pan/tilt head, 2 indicates the Pitch axis of the pan/tilt head, and 3 indicates the Yaw axis of the pan/tilt head.
  • the roll angle of the pan/tilt changes; when the pan/tilt is rotated with the Pitch axis as the axis, the pitch angle of the pan/tilt changes; when the pan/tilt is rotated with the Yaw axis as the axis, The yaw angle of the gimbal has changed.
  • the photographing device 15 rotates following the rotation of the pan-tilt 14 so that the photographing device 15 can be taken from different photographing directions and photographing angles.
  • the target object 17 is photographed.
  • the fuselage 12 of the drone can also be rotated by the Roll axis, the Pitch axis, and the Yaw axis of the fuselage.
  • the roll angle of the fuselage changes;
  • the body of the drone rotates with the Pitch axis as the axis, the pitch angle of the fuselage changes;
  • the body of the drone rotates with the Yaw axis as the axis, the yaw angle of the fuselage changes.
  • FIG. 2 is a flowchart of an image processing method according to an embodiment of the present invention.
  • the method may be applied to an image processing device, and the method may include:
  • Step 201 Acquire a plurality of 2D original images including the target object.
  • the acquiring a plurality of 2D original images including the target object includes: planning a flight trajectory of the mobile platform (such as a drone) according to the location of the target object, and controlling the mobile platform to fly according to the flight trajectory, and the flight process on the mobile platform A plurality of 2D original images containing the target object are acquired.
  • the drone it has a good trajectory planning, with automatic flight and intelligent following functions. Therefore, the flight path of the drone can be planned according to the position of the target object, and the drone automatically flies according to the flight trajectory. During the automatic flight, the drone maintains the orientation of the shooting device in real time, ensuring that the target object is always at the center of the screen, so that multiple images containing the target object can be acquired by the shooting device, and the image containing the target object is called for convenience of distinction. 2D original image.
  • Step 202 Acquire a first type of point cloud of a 3D scene of the target object according to the plurality of 2D original images.
  • the first type of point cloud for acquiring a 3D scene of the target object according to the plurality of 2D original images includes: processing a plurality of 2D original images by an image processing algorithm to obtain a first type of point cloud of the 3D scene of the target object, where
  • the first type of point cloud may include a plurality of feature points having three-dimensional information.
  • the image processing algorithm may include, but is not limited to, a SfM (Structure from Motion) algorithm; the SfM algorithm may include: a sparse SfM algorithm; or a dense SfM algorithm.
  • SfM Structure from Motion
  • the image processing algorithm is used to process a plurality of 2D original images to obtain a first type of point cloud, and the process is not limited.
  • the input data is a plurality of 2D original images
  • the output data can be obtained after initializing the image sequence and camera calibration, extracting feature points and calculating feature descriptions, image matching calculations, solving motion estimation structure problems, and optional optimization processing.
  • the output data is the first type of cloud point of the 3D scene of the target object.
  • the first type of point cloud is a collection of multiple feature points, each of which has three-dimensional information, that is, three-dimensional coordinates (X, Y, Z).
  • each feature point can also have contents such as laser reflection intensity and color information, and there is no limitation thereto.
  • the sparse SfM algorithm can be used, and the first type of point cloud obtained by the sparse SfM algorithm is a sparse point cloud, that is, the number of feature points is relatively small, and the distance between the feature points and the feature points is relatively large.
  • a dense SfM algorithm can be used.
  • the first type of point cloud obtained by the dense SfM algorithm is a dense point cloud, that is, the number of feature points is relatively large, and the distance between the feature points and the feature points is relatively small.
  • Step 203 Perform a folding process on the first type of point cloud by using a deformation function to obtain a second type of point cloud.
  • the deformation function may include, but is not limited to: an exponential function; or a parabolic function; or an Archimedes spiral function, the deformation function is not limited, and may be selected according to experience, as long as the first type of point cloud can be performed Folding can be done.
  • the first type of point cloud is folded by using a deformation function to obtain a second type of point cloud (which may also include multiple feature points having three-dimensional information), which may include:
  • N deformation points are selected on the curve corresponding to the deformation function, and N is a positive integer greater than or equal to 1.
  • the value of N can be selected according to experience, such as 5, 10, etc., which is not limited.
  • selecting N deformation points on the curve corresponding to the deformation function may include: selecting a deformation point every first distance in the direction of the abscissa of the curve corresponding to the deformation function; or, in the ordinate direction of the curve corresponding to the deformation function, Select a deformation point every second distance.
  • the first distance can be configured according to experience, and there is no limitation on this.
  • the second distance can be configured according to experience, and there is no limitation on this.
  • FIG. 5A is a schematic diagram of a curve corresponding to a deformation function
  • FIG. 5A is a side view of a plane as an example. It is assumed that the flight direction is the x direction, the direction is the z direction, and the y direction is confirmed by the right hand rule.
  • N deformation points can be selected from the curve corresponding to the deformation function, and the adjacent two deformation points form a line segment, and the more the number of deformation points, the closer the line segment composed of the deformation points is to the curve, so that the multi-line segment is used. Approximate approximation curve.
  • the deformation point O, the deformation point A, the deformation point B, the deformation point C, and the deformation point D may be selected from the curve corresponding to the deformation function.
  • the number of deformation points can be more.
  • other methods may be used to select the deformation point, such as the distance between the deformation point O and the deformation point A, and the deformation point A and The distance of the deformation point B is different, and there is no limitation on this.
  • the line segment between the deformation point O and the deformation point A, the deformation point A and the deformation point B can be used.
  • the line segment between the line segment, the deformation point B and the deformation point C, the line segment between the deformation point C and the deformation point D approximates the curve corresponding to the deformation function, that is, approximates the curve shown in FIG. 5A.
  • an RDP (Ramer Douglas Peucker, Douglas-Pucker) algorithm can also be used.
  • the RDP algorithm is only an example, and no limitation is imposed thereon.
  • the RDP algorithm is an algorithm that approximates a curve as a series of points and reduces the number of points. As the number of points increases, the more the number of line segments is fitted, the closer it is to the original curve, but the higher the complexity; as the number of points decreases, the smaller the number of line segments fit, the greater the difference from the original curve, but The lower the complexity. Therefore, it is possible to select an appropriate number of points based on experience, and there is no limitation thereto.
  • Step 2032 Determine, for each feature point in the first type of point cloud, at least one deformation point corresponding to the feature point.
  • the deformation point corresponding to the feature point may be determined according to the abscissa value of the feature point.
  • the determining the at least one deformation point corresponding to the feature point may include: selecting an abscissa value (ie, an abscissa value of the deformation point) that is smaller than the feature point based on an abscissa value of each of the N deformation points.
  • the deformation point of the abscissa value, the selected deformation point is used as the deformation point corresponding to the feature point.
  • the abscissa value of the deformation point O is X O
  • the abscissa value of the deformation point A is X A
  • the abscissa value of the deformation point B is X B
  • the abscissa value of the deformation point C is X.
  • the horizontal coordinate value of the deformation point D is X D
  • the feature point 1 in the first type of point cloud is described (hereinafter, the feature point 1 is taken as an example, and the processing manner of each feature point in the first type of point cloud is The feature point 1 is similar, and will not be described later.
  • the abscissa value of the feature point 1 is located between X C and X D , and the abscissa value of the deformation point O, the deformation point A, the deformation point B, and the deformation point C are both It is smaller than the abscissa value of the feature point 1, and therefore, the deformation point corresponding to the feature point 1 is determined to be the deformation point O, the deformation point A, the deformation point B, and the deformation point C.
  • Step 2033 the feature points are folded by using the determined slope of each deformation point, and the folded feature points are obtained, that is, each feature point in the first type of point cloud corresponds to a folded feature point.
  • the feature point is folded by using the determined slope of each deformation point to obtain the folded feature point, including: if the feature point corresponds to the M deformation points, then the first deformation point to the Mth deformation point The order is obtained by using M slopes corresponding to the slopes of the M deformation points, and the feature points are subjected to M folding processing to obtain the folded feature points; M is a positive integer greater than or equal to 1, and M is less than or equal to N.
  • the feature point 1 is subjected to folding processing using the slope corresponding to the deformation point O (that is, the slope of the line segment between the deformation point O and the deformation point A) to obtain the feature point 1a.
  • the feature point 1a is subjected to folding processing using the slope corresponding to the deformation point A (that is, the slope of the line segment between the deformation point A and the deformation point B) to obtain the feature point 1b.
  • the feature point 1b is subjected to folding processing using the slope corresponding to the deformation point B (that is, the slope of the line segment between the deformation point B and the deformation point C) to obtain the feature point 1c.
  • the feature point 1c is folded to obtain the feature point 1d, and the folded feature point of the feature point 1 is the feature point 1d. .
  • the feature point is folded by using the determined slope of each deformation point to obtain the folded feature point, including: if the feature point corresponds to the M deformation points, the slope corresponding to the i-th deformation point is used.
  • the feature point is subjected to the ith folding process to obtain the i-th post-folding feature point; wherein, the value of i is 1, 2, ..., M, M is a positive integer greater than or equal to 1, and M is less than or equal to N.
  • the feature point 1 is subjected to the first folding process by the slope corresponding to the first deformation point O, and the first post-folding feature point 1a is obtained.
  • the feature point 1a is subjected to the second folding process by the slope corresponding to the second deformation point A, and the second post-folding feature point 1b is obtained.
  • the feature point 1b is subjected to the third folding process by the slope corresponding to the third deformation point B, and the third post-folding feature point 1c is obtained.
  • the feature point 1c is subjected to the fourth folding process using the slope corresponding to the fourth deformation point C to obtain the fourth post-folding feature point 1d. Therefore, the post-folding feature point of the feature point 1 is the feature point 1d.
  • the process of performing the i-th folding process on the feature point by using the slope corresponding to the i-th deformation point to obtain the i-th post-folding feature point may include the following steps:
  • Step 20331 Acquire a rotation parameter of the coordinate system by using a slope corresponding to the i-th deformation point.
  • the obtaining the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point may include: obtaining a first angle of the i-th deformation point and the abscissa by using a slope corresponding to the i-th deformation point. Obtaining a target angle corresponding to the i-th deformation point by using the first angle and the second angle; wherein the second angle may be an angle between the i-1th deformation point and the abscissa.
  • the rotation parameter of the coordinate system is acquired by using the target angle corresponding to the i-th deformation point (the rotation parameter may also be referred to as a rotation matrix, that is, a Rotation Matrix).
  • the obtaining the first angle between the i-th deformation point and the abscissa by using the slope corresponding to the i-th deformation point may include: using the coordinate value of the i-th deformation point and the coordinate value of the i+1th deformation point, Obtain a slope corresponding to the i-th deformation point, and obtain a first angle by using a slope corresponding to the i-th deformation point.
  • the coordinate value of the deformation point C and the coordinate value of the deformation point D can be used to obtain the slope corresponding to the deformation point C, and the slope corresponding to the deformation point C is obtained.
  • the first angle (angle 3) of the deformation point B, the first angle (angle 2) of the deformation point A, and the first angle (angle 1) of the deformation point O can be obtained.
  • the obtaining the target angle corresponding to the i-th deformation point by using the first angle and the second angle may include: determining a difference between the first angle and the second angle as the target angle corresponding to the i-th deformation point .
  • the target angle is the difference between the angle 4 corresponding to the deformation point C and the angle 3 corresponding to the deformation point B.
  • the acquiring the rotation parameter of the coordinate system by using the target angle corresponding to the i-th deformation point may include: converting the target angle into a rotation matrix; and determining the rotation matrix as a rotation parameter of the coordinate system. Further, converting the target angle into a rotation matrix may include: converting the target angle into a rotation matrix by using a formula: ⁇ is the target angle.
  • Step 20332 Acquire a displacement parameter of the coordinate system by using an abscissa value of the i-th deformation point.
  • Obtaining the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point may include: constructing the displacement matrix by using the abscissa value of the i-th deformation point; determining the displacement matrix as the displacement parameter of the coordinate system.
  • constructing the displacement matrix by using the abscissa value of the i-th deformation point may include: constructing the displacement matrix by using the following formula: [x, 0, 0] T ; wherein x is the abscissa value of the i-th deformation point.
  • Step 20333 Perform the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point. For example, using the rotation parameter and the displacement parameter, the i-th folding feature point corresponding to the i-1th feature point corresponding to the feature point is subjected to the ith folding process to obtain the i-th post-folding feature point.
  • the i-th folding feature point corresponding to the i-1th feature point of the feature point is subjected to the ith folding process, and the ith post-folding feature point corresponding to the feature point is obtained, including:
  • step 2033 the feature point 1 can be subjected to the first folding process using the slope corresponding to the deformation point O to obtain the feature point 1a, and the feature point 1a is subjected to the second folding process using the slope corresponding to the deformation point A to obtain the feature point.
  • step 2033 the feature point 1b is subjected to the third folding process using the slope corresponding to the deformation point B to obtain the feature point 1c, and the feature point 1c is subjected to the fourth folding process by the slope corresponding to the deformation point C to obtain the feature point 1d.
  • the above folding process may be a transformation problem between different coordinate systems (such as F 0 , F 1 , F 2 , F 3 , etc.), so as long as the rotation parameter R between the coordinate systems is known (such as Rotation)
  • the folding process can be achieved by the Matrix and the displacement parameter T (eg Translation Matrix).
  • the adjacent coordinate systems are only the target angles, for example, the target angle ⁇ 1 of the deformation point O is the difference between the angles 1 and 0, and the deformation point
  • the target angle ⁇ 2 of A is the difference between the angle 2 and the angle 1
  • the target angle ⁇ 3 of the deformation point B is the difference between the angle 3 and the angle 2
  • the target angle ⁇ 4 of the deformation point C is the difference between the angle 4 and the angle 3.
  • the target angle can be converted into a rotation matrix, see the above conversion formula.
  • the rotation parameter R1 of the deformation point O can be obtained.
  • the rotation parameter R2 of the deformation point A can be obtained, and when ⁇ 3 is substituted into the above formula, the deformation point B can be obtained.
  • the rotation parameter R4 of the deformation point C can be obtained.
  • the displacement is the distance of each deformation point on the horizontal axis, such as the abscissa value X O of the deformation point O , and the abscissa of the deformation point A.
  • the value of X a, point B strain X-abscissa value B, the strain point of the abscissa value C X-C and the like can be configured using a strain point X O O displacement parameters Tl, X a displacement parameters configured using strain point a T2, using X B to construct the displacement parameter T3 of the deformation point B, the displacement parameter T4 of the deformation point C is constructed by X C .
  • three-dimensional information of the feature point 1d can be obtained.
  • multiple feature points may be folded together.
  • all the feature points corresponding to the deformation point O are folded.
  • the specific folding formula refer to feature point 1, and details are not described herein.
  • all the feature points corresponding to the deformation point O can be converted from the original coordinate system F 0 to the folded coordinate system F 1 .
  • all the feature points corresponding to the deformation point A are folded.
  • No further details are provided here.
  • all the feature points corresponding to the deformation point A can be converted from the original coordinate system F 1 to The folded coordinate system F 2 , and so on.
  • Step 2034 Determine the folded feature points corresponding to each feature point in the first type of point cloud as the second type of point cloud. That is to say, after folding each feature point in the first type of point cloud to obtain the folded feature point, all the folded feature points can be determined as the second type point cloud.
  • the second type of point cloud may include the folded feature point 1d corresponding to the feature point 1, the folded feature point 2d corresponding to the feature point 2, the folded feature point 3c corresponding to the feature point 3, and so on.
  • Step 204 projecting the second type of point cloud onto the image plane to obtain a 2D virtual image having a folding effect. For example, each feature point in the second type of point cloud (ie, the folded feature point) is projected onto the image plane.
  • the second type of point cloud is projected onto the image plane to obtain a 2D virtual image (ie, a final target image) having a folding effect (such as a folded city effect), which may include:
  • Step 2041 Obtain location information and posture information corresponding to the mobile platform.
  • the obtaining the location information and the posture information corresponding to the mobile platform may include: acquiring the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images; or acquiring the shooting position and shooting corresponding to the mobile platform according to the plurality of 2D original images. a gesture, and acquiring a virtual position and a virtual posture according to the shooting position and the shooting attitude.
  • the shooting position and the shooting attitude corresponding to the mobile platform can be obtained by other methods.
  • the shooting position and the shooting posture corresponding to the mobile platform can be directly measured by the sensor of the mobile platform, and no limitation is imposed thereon.
  • the acquiring the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images may include: after obtaining the plurality of 2D original images, the shooting positions of the mobile platform may be obtained by using the 2D original images (ie, the actual position and Attitude), thereby obtaining a photographing position (Rotation) and a photographing posture (Rotation), and the manner in which the photographing position and the photographing posture are acquired is not limited.
  • the mobile platform has a multi-sensor fusion positioning system (such as VO, IMU, GPS, etc.), and the multi-sensor fusion positioning system can give the position and attitude relationship of each 2D original image, thereby reducing positional uncertainty.
  • the multi-sensor fusion positioning system can give the position and attitude relationship of each 2D original image, thereby reducing positional uncertainty.
  • the acquiring the virtual position and the virtual posture according to the shooting position and the shooting attitude may include: virtualizing a virtual machine position, that is, a virtual position and a virtual posture, according to the actual shooting position and the shooting posture. For example, a curve is virtualized according to a plurality of actual shooting positions and shooting positions, and a viewing angle is selected from the curve as a virtual position and a virtual posture.
  • a virtual machine position that is, a virtual position and a virtual posture
  • a curve is virtualized according to a plurality of actual shooting positions and shooting positions, and a viewing angle is selected from the curve as a virtual position and a virtual posture.
  • Step 2042 Projecting each feature point in the second type of point cloud to the image plane of the mobile platform according to the location information and the posture information corresponding to the mobile platform, to obtain a 2D virtual image having a folding effect.
  • the feature image and the posture information corresponding to the mobile platform are used to project each feature point in the second type of point cloud to the image plane of the mobile platform to obtain a 2D virtual image having a folding effect, which may include: using a mobile platform corresponding to the mobile platform The internal parameter, the position information, and the posture information, projecting each feature point in the second type of point cloud to the image plane of the mobile platform, and obtaining a 2D pixel point corresponding to each feature point; The 2D pixel points corresponding to each feature point constitute a 2D virtual image.
  • each feature point in the second type of point cloud is projected onto the image plane of the mobile platform by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, to obtain a 2D pixel point corresponding to each feature point.
  • the method may include: acquiring a 2D pixel corresponding to the feature point in the second type of point cloud by using the following formula:
  • K is an internal parameter corresponding to the mobile platform
  • R is the position information
  • T is the posture information
  • (x w , y w , z w ) is a three-dimensional corresponding to the feature points in the second type of point cloud.
  • the information, (u, v) is two-dimensional information corresponding to 2D pixel points corresponding to the feature points.
  • the second type of point cloud obtained in step 203 may include a plurality of feature points (ie, a plurality of post-folded feature points), each feature point having three-dimensional information, such as (x w , y w , z w ).
  • the second type of point cloud includes the above-mentioned feature point 1d, and the feature point 1d is taken as an example for description.
  • the processing of the other feature points in the second type of point cloud is similar to the processing of the feature point 1d, and will not be described again.
  • the three-dimensional information (x w , y w , z w ) corresponding to the feature point 1d can be obtained, and then the three-dimensional information (x w , y w , z w ) corresponding to the feature point 1d is substituted into the above formula.
  • a 2D pixel point corresponding to the feature point 1d can be obtained.
  • the 2D pixel points corresponding to each feature point can be obtained, and then the 2D pixel points can be composed into a 2D virtual image, and the 2D virtual image is also It is a 2D virtual image with a folding effect, which is a 2D image.
  • the internal reference K corresponding to the mobile platform is a matrix
  • the internal parameter K is a known parameter, which is a camera internal parameter, and no limitation is imposed thereon.
  • the position information R may be a rotation matrix
  • the attitude information T may be a displacement matrix
  • the rotation matrix R and the displacement matrix T are camera external parameters
  • the rotation and displacement transformation of the world coordinate system to the camera coordinate system are expressed in a three-dimensional space. There is no limit to this.
  • each feature point in the second type of point cloud is a 3D feature point
  • the 3D feature point can be converted into a 2D pixel point.
  • all 2D pixel points are composed into a 2D virtual image, so that the folded three-dimensional model can be reconverted into a 2D virtual image, that is, a 2D virtual image with a folding effect is obtained.
  • the mobile platform since the mobile platform has good trajectory planning and has functions such as automatic flight and intelligent following, after the mobile platform acquires multiple 2D original images including the target object, the mobile platform can acquire according to the 2D original image. Folding the effect of 2D virtual images, reducing the acquisition complexity of images with folding effects (such as folding city effects), the above process is automatically completed, the user can shoot images with folding effect without intervention, and improve the user experience.
  • the first type of point cloud when the first type of point cloud is obtained by using the dense SfM algorithm, most or all 2D points of the 2D original image correspond to 3D feature points in the first type of point cloud, so that in the second type of point cloud There are corresponding 3D feature points in the middle.
  • the first type of point cloud when the first type of point cloud is obtained by using the sparse SfM algorithm, only part of the 2D point in the 2D original image (for convenience of distinction, this part of the 2D point is called a 2D feature point) corresponds to the first type of point cloud.
  • the method may further include:
  • Step 701 Determine a 2D feature point corresponding to each feature point in the second type of point cloud from the 2D original image.
  • the feature points in the second type of point cloud correspond to the feature points in the first type of point cloud, and the feature points in the first type of point cloud are acquired based on the 2D feature points in the 2D original image, therefore, the second Each feature point in the class point cloud has a corresponding 2D feature point in the 2D original image.
  • Step 702 The 2D original image is divided into a plurality of triangular regions by using the 2D feature points; wherein, for each triangular region, three 2D feature points and a plurality of 2D original points may be included.
  • the dividing the 2D original image into the plurality of triangular regions by using the 2D feature points may include: connecting the 2D feature points in the 2D original image into a plurality of triangular regions by using a triangulation algorithm.
  • the 2D feature points may be triangulated by a triangulation algorithm (such as the Delaunay Triangulation algorithm), thereby dividing a plurality of triangular regions, and the triangle is divided.
  • a triangulation algorithm such as the Delaunay Triangulation algorithm
  • the three vertices of each triangle area are three 2D feature points, and the other points in the triangle area are 2D original points.
  • Step 703 For each triangular region, use the three 2D feature points included in the triangular region to acquire projection parameters corresponding to the triangular region (for projecting the 2D original point to the 2D virtual image).
  • the obtaining the projection parameters corresponding to the triangular region by using the three 2D feature points included in the triangular region includes: using the two 2D feature points in the 2D original image, the two 2D feature points in the The two-dimensional information in the 2D virtual image acquires projection parameters corresponding to the triangular region.
  • obtaining the projection parameters corresponding to the triangular region by using the two-dimensional information of the two 2D feature points in the 2D original image and the two-dimensional information of the three 2D feature points in the 2D virtual image may include: Obtain the projection parameters corresponding to the triangle region by using the following formula:
  • p' is two-dimensional information of the 2D feature point in the 2D virtual image
  • p is the two-dimensional information of the 2D feature point in the 2D original image
  • a and t are projection parameters corresponding to the triangular region.
  • the triangular region includes 3 2D feature points, which are assumed to be 2D feature points 1, 2D feature points 2 and 2D feature points 3, because 2D feature points 1 are in the 2D original image.
  • the dimension information p 1 is known, the 2D information p 1 ' of the 2D feature point 1 in the 2D virtual image is known, the 2D information p 2 of the 2D feature point 2 in the 2D original image is known, and the 2D feature point 2 is in 2D
  • the two-dimensional information p 2 ' in the virtual image is known, the two-dimensional information p 3 of the 2D feature point 3 in the 2D original image is known, and the two-dimensional information p 3 ' of the 2D feature point 3 in the 2D virtual image is known, Therefore, by the above p 1 , p 1 ', p 2 , p 2 ', p 3 , p 3 ', six unknown parameters can be calculated, so that the projection parameters A and t corresponding to the triangular regions can be calculated.
  • Step 704 Perform projection processing on all 2D original points in the triangular area by using projection parameters corresponding to the triangular area, that is, project all 2D original points in the triangular area to the 2D virtual image.
  • the projecting the all 2D original points in the triangular region by using the projection parameters corresponding to the triangular regions may include: projecting the 2D original points in the triangular region to the 2D virtual image by using the following formula: Where p is the two-dimensional information of the 2D original point in the 2D original image, A and t are the projection parameters corresponding to the triangular region, and p' is the two-dimensional information of the 2D original point in the 2D virtual image. Since p, A, and t are known, p' can be calculated by the above formula, and p' is two-dimensional information of the 2D original point in the 2D virtual image, that is, the 2D original point is projected to the 2D virtual image.
  • all 2D original points in the triangular region can be projected to the 2D virtual image. Furthermore, after performing the above processing for each of the triangular regions, all 2D original points of all the triangular regions can be projected to the 2D virtual image. Through the above processing, all 2D original points in the 2D original image can be projected to the 2D virtual image.
  • an embodiment of the present invention further provides an image processing apparatus 80, which includes a memory 801 and a processor 802 (such as one or more processors).
  • a processor 802 such as one or more processors.
  • the memory is configured to store program code
  • the processor is configured to invoke the program code, when the program code is executed, to perform the following operations: acquiring a plurality of 2D original images including a target object Obtaining a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images; performing a folding process on the first type of point cloud by using a deformation function to obtain a second type of point cloud; The second type of point cloud is projected onto the image plane to obtain a 2D virtual image with a folding effect.
  • the processor is configured to: when planning a plurality of 2D original images including the target object, plan a flight trajectory of the mobile platform according to the location of the target object, control the mobile platform to fly according to the flight trajectory, and collect during the flight. Contains multiple 2D raw images of the target object.
  • the processor is configured to: when the first type of point cloud of the 3D scene of the target object is acquired according to the plurality of 2D original images, process the plurality of 2D original images by using an image processing algorithm, Obtaining a first type of point cloud of the 3D scene of the target object; the first type of point cloud includes a plurality of feature points having three-dimensional information.
  • the processor is configured to perform folding processing on the first type of point cloud by using a deformation function, and when the second type of point cloud is obtained, the processor is specifically configured to: select N deformation points on the curve corresponding to the deformation function, and N is greater than a positive integer equal to 1; for each feature point in the first type of point cloud, determining at least one deformation point corresponding to the feature point; and folding the feature point by using the determined slope of each deformation point to obtain a folded Feature points; the folded feature points corresponding to each feature point in the first type of point cloud are determined as the second type of point cloud.
  • the processor when the processor selects N deformation points on the curve corresponding to the deformation function, the processor specifically selects: in the abscissa direction of the curve corresponding to the deformation function, selects a deformation point every first distance; or, corresponds to the deformation function In the ordinate direction of the curve, a deformation point is selected every second distance.
  • the processor when determining the at least one deformation point corresponding to the feature point, is specifically configured to: select an abscissa value of the feature point based on an abscissa value of each of the N deformation points The deformation point of the value is taken as the deformation point corresponding to the feature point.
  • the processor performs folding processing on the feature point by using the determined slope of each deformation point to obtain a folded feature point, and is specifically used to: if the feature point corresponds to M deformation points, follow the first The order of the deformation point to the Mth deformation point is performed by using the slope corresponding to the M deformation points, and the feature points are subjected to M folding processing to obtain a folded feature point; M is a positive integer greater than or equal to 1, and M is smaller than Equal to N.
  • the processor performs folding processing on the feature point by using the determined slope of each deformation point, and obtains the post-folded feature point, and is specifically used to: if the feature point corresponds to M deformation points, use the ith The slope corresponding to the deformation point is subjected to the ith folding process to obtain the i-th post-folding feature point; wherein the value of i is 1, 2, ..., M, and the M is greater than or equal to A positive integer of 1, M is less than or equal to N.
  • the processor performs the i-th folding process on the feature point by using the slope corresponding to the i-th deformation point, and obtains the i-th post-folding feature point, and is specifically used to: use the i-th deformation point correspondingly Obtaining the rotation parameter of the coordinate system, obtaining the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point, and performing the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th Subfolded feature points after the fold.
  • the processor is configured to acquire the first clip of the i-th deformation point and the abscissa by using the slope corresponding to the i-th deformation point when acquiring the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point.
  • An angle is obtained by using a target angle corresponding to the i-th deformation point.
  • the processor is configured to: when using the abscissa value of the i-th deformation point to obtain the displacement parameter of the coordinate system, construct the displacement matrix by using the abscissa value of the i-th deformation point; and determine the displacement matrix as The displacement parameter of the coordinate system.
  • the processor performs the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point, and is specifically used to: use the rotation parameter and the The displacement parameter is subjected to the i-th folding process of the i-th post-folding feature point corresponding to the feature point, and the i-th post-folding feature point corresponding to the feature point is obtained.
  • the processor is configured to: acquire the location information and the posture information corresponding to the mobile platform when the second type of point cloud is projected to the image plane to obtain the 2D virtual image with the folding effect; according to the mobile platform Corresponding position information and posture information, each feature point in the second type of point cloud is projected onto the image plane of the mobile platform to obtain a 2D virtual image having a folding effect.
  • the processor is configured to: acquire the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images when acquiring the position information and the posture information corresponding to the mobile platform; or, according to the multiple 2D
  • the original image acquires a shooting position and a shooting attitude corresponding to the mobile platform, and acquires a virtual position and a virtual posture according to the shooting position and the shooting posture.
  • the processor projects each feature point in the second type of point cloud to the image plane of the mobile platform according to the location information and the posture information corresponding to the mobile platform, to obtain a 2D virtual image with a folding effect.
  • the image is specifically used for: projecting each feature point in the second type of point cloud to the image plane by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, and obtaining 2D corresponding to each feature point.
  • a pixel point; a 2D pixel corresponding to each feature point in the second type of point cloud is composed of the 2D virtual image.
  • the processor is further configured to: determine each feature in the second type of point cloud from the 2D original image. Pointing a corresponding 2D feature point; dividing the 2D original image into a plurality of triangular regions by using the 2D feature point; wherein, for each triangular region, including 3 2D feature points, a plurality of 2D original points; The three 2D feature points acquire projection parameters corresponding to the triangular regions; and use the projection parameters to perform projection processing on all 2D original points in the triangular region.
  • the processor when the processor divides the 2D original image into a plurality of triangular regions by using the 2D feature points, the processor is specifically configured to: connect the 2D feature points in the 2D original image into multiple triangles by using a triangulation algorithm. region.
  • the processor When the processor acquires the projection parameters corresponding to the triangular region by using the three 2D feature points, the processor specifically uses: two-dimensional information in the 2D original image using the three 2D feature points, and the three 2D feature points.
  • the two-dimensional information in the 2D virtual image acquires projection parameters corresponding to the triangular region.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer instructions, and when the computer instructions are executed, the image processing method is implemented. .
  • the system, apparatus, module or unit set forth in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control.
  • embodiments of the invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the instruction means implements the functions specified in one or more blocks of the flowchart or in a flow or block diagram of the flowchart.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

An image processing method and apparatus and a computer readable storage medium. The method comprises: acquiring multiple 2D original images containing a target object; acquiring, according to the multiple 2D original images, a first-type point cloud of a 3D scenario of the target object; folding the first-type point cloud by using a deformation function to acquire a second-type point cloud; and projecting the second-type point cloud onto an image plane to acquire a 2D virtual image having a folding effect. Embodiments of the present invention reduce acquisition complexity of images having a folding effect (such as a folding city special effect) and enable a user to capture folding effect images, thereby improving the user experience.

Description

图像处理方法、设备及计算机可读存储介质Image processing method, device and computer readable storage medium 技术领域Technical field
本发明涉及图像处理技术领域,尤其是涉及一种图像处理方法、设备及计算机可读存储介质。The present invention relates to the field of image processing technologies, and in particular, to an image processing method, device, and computer readable storage medium.
背景技术Background technique
计算机动画是借助计算机来制作动画的技术,包括二维动画(2D)和三维动画(3D),可以通过CG(Computer Graphics,计算机绘图)完成计算机动画。其中,将利用计算机技术进行视觉设计和生产的领域称为CG,CG是通过计算机绘制的一切图形的总称,如网页设计、影视特效、多媒体技术等。Computer animation is a technique for making animations by means of a computer, including two-dimensional animation (2D) and three-dimensional animation (3D). Computer animation can be done by CG (Computer Graphics). Among them, the field of visual design and production using computer technology is called CG, and CG is a general term for all graphics drawn by computer, such as web design, film and television special effects, multimedia technology, and the like.
在计算机动画的影视特效中,折叠城市特效是一种典型应用,但是,当前通常采用CG技术制作具有折叠城市特效的图像,复杂度较高,体验较差。In the movie special effects of computer animation, folding urban special effects is a typical application. However, currently, CG technology is usually used to produce images with folding city special effects, which has high complexity and poor experience.
发明内容Summary of the invention
本发明提供一种图像处理方法、设备及计算机可读存储介质,可以降低具有折叠效果(如折叠城市特效)的图像的获取复杂度,提高用户使用体验。The invention provides an image processing method, a device and a computer readable storage medium, which can reduce the acquisition complexity of an image having a folding effect (such as a folding city special effect) and improve the user experience.
本发明实施例第一方面,提供一种图像处理方法,所述方法包括:A first aspect of the embodiments of the present invention provides an image processing method, where the method includes:
获取包含目标物体的多个2D原始图像;Obtaining a plurality of 2D original images containing the target object;
根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云;Acquiring a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images;
利用形变函数对所述第一类点云进行折叠处理,得到第二类点云;Folding the first type of point cloud by using a deformation function to obtain a second type of point cloud;
将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。Projecting the second type of point cloud onto the image plane yields a 2D virtual image with a folding effect.
本发明实施例第二方面,提供一种图像处理设备,包括存储器和处理器;A second aspect of embodiments of the present invention provides an image processing apparatus including a memory and a processor;
所述存储器,用于存储程序代码;The memory is configured to store program code;
所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于执行以下操作:获取包含目标物体的多个2D原始图像;The processor is configured to invoke the program code, when the program code is executed, to perform the following operations: acquiring a plurality of 2D original images including a target object;
根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云;Acquiring a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images;
利用形变函数对所述第一类点云进行折叠处理,得到第二类点云;Folding the first type of point cloud by using a deformation function to obtain a second type of point cloud;
将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。Projecting the second type of point cloud onto the image plane yields a 2D virtual image with a folding effect.
本发明实施例第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,在所述计算机指令被执行时,实现上述图像处理方法,即本发明实施例第一方面提出的图像处理方法。A third aspect of the embodiments of the present invention provides a computer readable storage medium, where the computer readable storage medium stores computer instructions, and when the computer instructions are executed, the image processing method is implemented, that is, the embodiment of the present invention The image processing method proposed in the first aspect.
基于上述技术方案,本发明实施例中,由于移动平台具有良好的轨迹规划,具有自动飞行和智能跟随等功能,移动平台获取包含目标物体的多个2D原始图像后,可以根据2D原始图像获取具有折叠效果的2D虚拟图像,降低具有折叠效果(如折叠城市特效)的图像的获取复杂度,上述过程是自动完成,用户无需干预,用户可以拍摄具有折叠效果的图像,提高用户使用体验。Based on the foregoing technical solution, in the embodiment of the present invention, since the mobile platform has good trajectory planning and has functions such as automatic flight and intelligent following, after the mobile platform acquires multiple 2D original images including the target object, the mobile platform can acquire according to the 2D original image. Folding the effect of 2D virtual images, reducing the acquisition complexity of images with folding effects (such as folding city effects), the above process is automatically completed, the user can shoot images with folding effect without intervention, and improve the user experience.
附图说明DRAWINGS
为了更加清楚地说明本发明实施例或者现有技术中的技术方案,下面将对本发明实施例或者现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本发明实施例的这些附图获得其它的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments of the present invention or in the description of the prior art will be briefly described below. Obviously, the drawings in the following description It is merely some of the embodiments described in the present invention, and those skilled in the art can also obtain other drawings according to the drawings of the embodiments of the present invention.
图1是无人机的一个结构示意图;Figure 1 is a schematic structural view of a drone;
图2是一个图像处理方法的实施例示意图;2 is a schematic diagram of an embodiment of an image processing method;
图3是一个形变函数的示意图;Figure 3 is a schematic diagram of a deformation function;
图4是另一个图像处理方法的实施例示意图;4 is a schematic diagram of another embodiment of an image processing method;
图5A-图5F是对特征点进行转换的示意图;5A-5F are schematic views of conversion of feature points;
图6是另一个图像处理方法的实施例示意图;6 is a schematic diagram of another embodiment of an image processing method;
图7是另一个图像处理方法的实施例示意图;7 is a schematic diagram of an embodiment of another image processing method;
图8是图像处理设备的一个实施例框图。Figure 8 is a block diagram of one embodiment of an image processing apparatus.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. Further, the features of the following embodiments and examples may be combined with each other without conflict.
本发明使用的术语仅仅是出于描述特定实施例的目的,而非限制本发明。本发明和权利要求书所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其它含义。应当理解,本文中使用的术语“和/或”是指包含一个或者多个相关联的列出项目的任何或所有可能的组合。The terminology used herein is for the purpose of describing particular embodiments, The singular forms "a", "the" and "the" It will be understood that the term "and/or" as used herein refers to any and all possible combinations of one or more of the associated listed items.
尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或者“当……时”,或者“响应于确定”。Although the terms first, second, third, etc. may be used to describe various information in the present invention, such information should not be limited to these terms. These terms are used to distinguish the same type of information from each other. For example, the first information may also be referred to as the second information without departing from the scope of the invention. Similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" may be interpreted as "when", or "when", or "in response to determination."
本发明实施例中提出一种图像处理方法,用于获取具有折叠效果(如折叠城市特效)的图像,该方法可以应用于图像处理设备。图像处理设备可以为移动平台,如移动平台获取包含目标物体的多个原始图像后,利用这些原始图像获取具有折叠效果的图像。图像处理设备也可以为控制设备,如移动平台获取包含目标物体的多个原始图像后,将这些原始图像发送给控制设备,控制设备获取到包含目标物体的多个原始图像后,利用这些原始图像获取具有折叠效果的图像。其中,移动平台可以包括但不限于:机器人、无人机、无人车、VR眼镜、AR眼镜,对此不做限制,只要是带有多摄像头的载具即可。此外,控制设备可以包括但不限于:遥控器、智能电话/手机、平板电脑、个人数字助理(PDA)、膝上计算机、台式计算机、媒体内容播放器、视频游 戏站/系统、虚拟现实系统、增强现实系统、可穿戴式装置(例如,手表、眼镜、手套、头饰(例如,帽子、头盔、虚拟现实头戴耳机、增强现实头戴耳机、头装式装置(HMD)、头带)、挂件、臂章、腿环、鞋子、马甲)、手势识别装置、麦克风、能够提供或渲染图像数据的任意电子装置,对此不做限制。An embodiment of the present invention provides an image processing method for acquiring an image having a folding effect (such as a folding city effect), and the method can be applied to an image processing device. The image processing device may acquire a plurality of original images including the target object for the mobile platform, and use the original images to obtain an image having a folding effect. The image processing device may also be a control device. After the mobile platform acquires a plurality of original images including the target object, the original image is sent to the control device, and after the control device acquires the plurality of original images including the target object, the original image is utilized. Get an image with a folding effect. The mobile platform may include, but is not limited to, a robot, a drone, an unmanned vehicle, a VR glasses, and an AR glasses. This is not limited, as long as it is a vehicle with multiple cameras. In addition, the control device may include, but is not limited to: a remote control, a smart phone/mobile phone, a tablet, a personal digital assistant (PDA), a laptop computer, a desktop computer, a media content player, a video game station/system, a virtual reality system, Augmented reality systems, wearable devices (eg, watches, glasses, gloves, headwear (eg, hats, helmets, virtual reality headsets, augmented reality headsets, head mounted devices (HMD), headbands), pendants , armbands, leg loops, shoes, vests, gesture recognition devices, microphones, any electronic device capable of providing or rendering image data, without limitation.
为了方便描述,以图像处理设备是移动平台,且移动平台是无人机为例,无人机安装有云台,云台上固定有拍摄设备(如相机、摄像机等),而无人机具有良好的轨迹规划,具有自动飞行和智能跟随等功能,可以通过拍摄设备获取包含目标物体的多个原始图像,根据原始图像获取具有折叠效果的图像。For convenience of description, the image processing device is a mobile platform, and the mobile platform is an unmanned aerial vehicle. The unmanned aerial vehicle is installed with a cloud platform, and the shooting device (such as a camera, a camera, etc.) is fixed on the cloud platform, and the drone has Good trajectory planning, with automatic flight and intelligent following functions, can obtain multiple original images containing the target object through the shooting device, and obtain the image with folding effect according to the original image.
参见图1所示,为无人机的一个结构示意图。10表示无人机的机头,11表示无人机的螺旋桨,12表示无人机的机身,13表示无人机的脚架,14表示无人机上的云台,15表示云台14搭载的拍摄设备,拍摄设备15通过云台14与无人机的机身12连接,16表示拍摄设备的拍摄镜头,17表示目标物体。See Figure 1 for a schematic diagram of the structure of the drone. 10 indicates the nose of the drone, 11 indicates the propeller of the drone, 12 indicates the fuselage of the drone, 13 indicates the tripod of the drone, 14 indicates the gimbal on the drone, and 15 indicates the mount of the gimbal 14 The photographing apparatus 15 is connected to the body 12 of the drone through the pan/ tilt head 14, 16 is a photographing lens of the photographing apparatus, and 17 is a target object.
云台14可以是三轴云台,即云台14以云台的横滚轴(Roll轴)、俯仰轴(Pitch轴)、偏航轴(Yaw轴)为轴线转动。如图1所示,1表示云台的Roll轴,2表示云台的Pitch轴,3表示云台的Yaw轴。当云台以Roll轴为轴线转动时,云台的横滚角发生变化;当云台以Pitch轴为轴线转动时,云台的俯仰角发生变化;当云台以Yaw轴为轴线转动时,云台的偏航角发生变化。而且,当云台以Yaw轴、Pitch轴、Yaw轴中的一个或者多个为轴线转动时,拍摄设备15跟随云台14的转动而转动,使得拍摄设备15可以从不同的拍摄方向和拍摄角度对目标物体17进行拍摄。The pan/tilt head 14 may be a three-axis pan/tilt head, that is, the pan/tilt head 14 rotates on the axis of the pan/tilt (Roll axis), the pitch axis (Pitch axis), and the yaw axis (Yaw axis). As shown in Fig. 1, 1 indicates the Roll axis of the pan/tilt head, 2 indicates the Pitch axis of the pan/tilt head, and 3 indicates the Yaw axis of the pan/tilt head. When the pan/tilt is rotated with the Roll axis as the axis, the roll angle of the pan/tilt changes; when the pan/tilt is rotated with the Pitch axis as the axis, the pitch angle of the pan/tilt changes; when the pan/tilt is rotated with the Yaw axis as the axis, The yaw angle of the gimbal has changed. Moreover, when the pan/tilt is rotated by one or more of the Yaw axis, the Pitch axis, and the Yaw axis, the photographing device 15 rotates following the rotation of the pan-tilt 14 so that the photographing device 15 can be taken from different photographing directions and photographing angles. The target object 17 is photographed.
与云台14类似的是,无人机的机身12也可以以机身的Roll轴、Pitch轴、Yaw轴为轴线转动。当无人机的机身以Roll轴为轴线转动时,则机身的横滚角发生变化;当无人机的机身以Pitch轴为轴线转动时,则机身的俯仰角发生变化;当无人机的机身以Yaw轴为轴线转动时,则机身的偏航角发生变化。Similar to the pan/tilt head 14, the fuselage 12 of the drone can also be rotated by the Roll axis, the Pitch axis, and the Yaw axis of the fuselage. When the fuselage of the drone rotates with the Roll axis as the axis, the roll angle of the fuselage changes; when the body of the drone rotates with the Pitch axis as the axis, the pitch angle of the fuselage changes; When the body of the drone rotates with the Yaw axis as the axis, the yaw angle of the fuselage changes.
基于上述应用场景,参见图2所示,为本发明实施例中提出的图像处理 方法的流程图,该方法可以应用于图像处理设备,该方法可以包括:Based on the foregoing application scenario, as shown in FIG. 2, which is a flowchart of an image processing method according to an embodiment of the present invention, the method may be applied to an image processing device, and the method may include:
步骤201,获取包含目标物体的多个2D原始图像。Step 201: Acquire a plurality of 2D original images including the target object.
其中,获取包含目标物体的多个2D原始图像,包括:根据目标物体的位置规划移动平台(如无人机)的飞行轨迹,并控制移动平台按照所述飞行轨迹飞行,在移动平台的飞行过程中采集包含目标物体的多个2D原始图像。The acquiring a plurality of 2D original images including the target object includes: planning a flight trajectory of the mobile platform (such as a drone) according to the location of the target object, and controlling the mobile platform to fly according to the flight trajectory, and the flight process on the mobile platform A plurality of 2D original images containing the target object are acquired.
其中,对于无人机来说,具有良好的轨迹规划,具有自动飞行和智能跟随等功能,因此,可以根据目标物体的位置规划无人机的飞行轨迹,无人机按照该飞行轨迹自动飞行。在自动飞行过程中,无人机实时保持拍摄设备的朝向,保证目标物体始终在画面中心,从而可以通过拍摄设备获取包含目标物体的多个图像,为了区分方便,将包含目标物体的图像称为2D原始图像。Among them, for the drone, it has a good trajectory planning, with automatic flight and intelligent following functions. Therefore, the flight path of the drone can be planned according to the position of the target object, and the drone automatically flies according to the flight trajectory. During the automatic flight, the drone maintains the orientation of the shooting device in real time, ensuring that the target object is always at the center of the screen, so that multiple images containing the target object can be acquired by the shooting device, and the image containing the target object is called for convenience of distinction. 2D original image.
步骤202,根据多个2D原始图像获取目标物体的3D场景的第一类点云。Step 202: Acquire a first type of point cloud of a 3D scene of the target object according to the plurality of 2D original images.
其中,根据多个2D原始图像获取目标物体的3D场景的第一类点云,包括:通过图像处理算法对多个2D原始图像进行处理,得到目标物体的3D场景的第一类点云,所述第一类点云可以包括具有三维信息的多个特征点。The first type of point cloud for acquiring a 3D scene of the target object according to the plurality of 2D original images includes: processing a plurality of 2D original images by an image processing algorithm to obtain a first type of point cloud of the 3D scene of the target object, where The first type of point cloud may include a plurality of feature points having three-dimensional information.
其中,图像处理算法可以包括但不限于:SfM(Structure from Motion,结构重建)算法;SfM算法可以包括:稀疏SfM算法;或者,密集SfM算法。The image processing algorithm may include, but is not limited to, a SfM (Structure from Motion) algorithm; the SfM algorithm may include: a sparse SfM algorithm; or a dense SfM algorithm.
在一个例子中,图像处理算法用于对多个2D原始图像进行处理,得到第一类点云,对此过程不做限制。例如,输入数据是多个2D原始图像,经过初始化图片序列和相机标定、提取特征点和计算特征描述、图像匹配计算、解运动推断结构问题、可选的优化处理等过程,可以得到输出数据,而输出数据就是目标物体的3D场景的第一类点云(Cloud Point),第一类点云是多个特征点的集合,每个特征点均具有三维信息,即三维坐标(X,Y,Z)。当然,每个特征点还可以具有激光反射强度和颜色信息等内容,对此不做限制。In one example, the image processing algorithm is used to process a plurality of 2D original images to obtain a first type of point cloud, and the process is not limited. For example, the input data is a plurality of 2D original images, and the output data can be obtained after initializing the image sequence and camera calibration, extracting feature points and calculating feature descriptions, image matching calculations, solving motion estimation structure problems, and optional optimization processing. The output data is the first type of cloud point of the 3D scene of the target object. The first type of point cloud is a collection of multiple feature points, each of which has three-dimensional information, that is, three-dimensional coordinates (X, Y, Z). Of course, each feature point can also have contents such as laser reflection intensity and color information, and there is no limitation thereto.
为了得到第一类点云,可以采用稀疏SfM算法,采用稀疏SfM算法得到的第一类点云是稀疏点云,即特征点的数量比较少,特征点与特征点的间距 比较大。此外,还可以采用密集SfM算法,采用密集SfM算法得到的第一类点云是密集点云,即特征点的数量比较多,特征点与特征点的间距比较小。In order to obtain the first type of point cloud, the sparse SfM algorithm can be used, and the first type of point cloud obtained by the sparse SfM algorithm is a sparse point cloud, that is, the number of feature points is relatively small, and the distance between the feature points and the feature points is relatively large. In addition, a dense SfM algorithm can be used. The first type of point cloud obtained by the dense SfM algorithm is a dense point cloud, that is, the number of feature points is relatively large, and the distance between the feature points and the feature points is relatively small.
步骤203,利用形变函数对第一类点云进行折叠处理,得到第二类点云。Step 203: Perform a folding process on the first type of point cloud by using a deformation function to obtain a second type of point cloud.
其中,形变函数可以包括但不限于:指数函数;或者,抛物线函数;或者,阿基米德螺线函数,对此形变函数不做限制,可以根据经验选择,只要能够对第一类点云进行折叠处理即可。为了方便描述,后续以形变函数是指数函数为例,参见图3所示,下方的平面为原本的地面,为了方便观看,这里具有一定倾斜,通过构建形变函数,即指数函数y=e x,可以折叠成曲面。 Wherein, the deformation function may include, but is not limited to: an exponential function; or a parabolic function; or an Archimedes spiral function, the deformation function is not limited, and may be selected according to experience, as long as the first type of point cloud can be performed Folding can be done. For convenience of description, the following is an example of the deformation function being an exponential function. Referring to FIG. 3, the lower plane is the original ground. For the convenience of viewing, there is a certain inclination, and by constructing a deformation function, that is, an exponential function y=e x , Can be folded into a curved surface.
其中,参见图4所示,利用形变函数对第一类点云进行折叠处理,得到第二类点云(也可以包括具有三维信息的多个特征点),可以包括:As shown in FIG. 4, the first type of point cloud is folded by using a deformation function to obtain a second type of point cloud (which may also include multiple feature points having three-dimensional information), which may include:
步骤2031,在形变函数对应的曲线上选取N个形变点,N为大于等于1的正整数。其中,N的取值可以根据经验选择,如5、10等,对此不做限制。In step 2031, N deformation points are selected on the curve corresponding to the deformation function, and N is a positive integer greater than or equal to 1. Among them, the value of N can be selected according to experience, such as 5, 10, etc., which is not limited.
其中,在形变函数对应的曲线上选取N个形变点,可以包括:在形变函数对应曲线的横坐标方向,每隔第一距离选取一个形变点;或者,在形变函数对应曲线的纵坐标方向,每隔第二距离选取一个形变点。第一距离可以根据经验配置,对此不做限制。第二距离可以根据经验配置,对此不做限制。Wherein, selecting N deformation points on the curve corresponding to the deformation function may include: selecting a deformation point every first distance in the direction of the abscissa of the curve corresponding to the deformation function; or, in the ordinate direction of the curve corresponding to the deformation function, Select a deformation point every second distance. The first distance can be configured according to experience, and there is no limitation on this. The second distance can be configured according to experience, and there is no limitation on this.
参见图5A所示,为形变函数对应的曲线示意图,图5A是以平面的侧视剖面图为例,假设飞行方向为x方向,朝向天为z方向,y方向通过右手定则确认,如可以为指向纸面。通过多段折叠,就可以逐渐逼近目标的曲线,分的线段越多,越能够无限逼近于真实的曲线。因此,可以先从形变函数对应的曲线上选取N个形变点,相邻两个形变点组成一个线段,而形变点数量越多,则形变点组成的线段越逼近于曲线,从而采用多线段去近似逼近曲线。Referring to FIG. 5A, which is a schematic diagram of a curve corresponding to a deformation function, FIG. 5A is a side view of a plane as an example. It is assumed that the flight direction is the x direction, the direction is the z direction, and the y direction is confirmed by the right hand rule. To point to the paper. Through multi-segment folding, you can gradually approach the curve of the target. The more segments you have, the more you can approach the real curve infinitely. Therefore, N deformation points can be selected from the curve corresponding to the deformation function, and the adjacent two deformation points form a line segment, and the more the number of deformation points, the closer the line segment composed of the deformation points is to the curve, so that the multi-line segment is used. Approximate approximation curve.
参见图5B所示,可以从形变函数对应的曲线上选取形变点O、形变点A、形变点B、形变点C和形变点D。在图5B中,以5个形变点为例,实际应用中,形变点的数量可以更多。在图5B中,以横坐标方向每隔第一距离选取一 个形变点为例,实际应用中,还可以采用其它方式选取形变点,如形变点O和形变点A的距离,与形变点A和形变点B的距离不同,对此不做限制。Referring to FIG. 5B, the deformation point O, the deformation point A, the deformation point B, the deformation point C, and the deformation point D may be selected from the curve corresponding to the deformation function. In FIG. 5B, taking five deformation points as an example, in practical applications, the number of deformation points can be more. In FIG. 5B, taking a deformation point every first distance in the direction of the abscissa as an example, in practical applications, other methods may be used to select the deformation point, such as the distance between the deformation point O and the deformation point A, and the deformation point A and The distance of the deformation point B is different, and there is no limitation on this.
参见图5C所示,在选取形变点O、形变点A、形变点B、形变点C和形变点D后,可以使用形变点O与形变点A之间的线段、形变点A与形变点B之间的线段、形变点B与形变点C之间的线段、形变点C与形变点D之间的线段,去近似逼近形变函数对应的曲线,即近似逼近图5A所示的曲线。Referring to FIG. 5C, after selecting the deformation point O, the deformation point A, the deformation point B, the deformation point C, and the deformation point D, the line segment between the deformation point O and the deformation point A, the deformation point A and the deformation point B can be used. The line segment between the line segment, the deformation point B and the deformation point C, the line segment between the deformation point C and the deformation point D, approximates the curve corresponding to the deformation function, that is, approximates the curve shown in FIG. 5A.
在实际应用中,为了将线段拟合成曲线,还可以采用RDP(Ramer Douglas Peucker,道格拉斯-普克)算法,当然,RDP算法只是一个示例,对此不做限制。其中,RDP算法是将曲线近似表示为一系列点,并减少点的数量的一种算法。随着点数量的增加,拟合的线段数量越多,与原本曲线越接近,但复杂度越高;随着点数量的减少,拟合的线段数量越少,与原本曲线相差越大,但复杂度越低。因此,可以根据经验选取合适的点数量,对此不做限制。In practical applications, in order to fit the line segment into a curve, an RDP (Ramer Douglas Peucker, Douglas-Pucker) algorithm can also be used. Of course, the RDP algorithm is only an example, and no limitation is imposed thereon. Among them, the RDP algorithm is an algorithm that approximates a curve as a series of points and reduces the number of points. As the number of points increases, the more the number of line segments is fitted, the closer it is to the original curve, but the higher the complexity; as the number of points decreases, the smaller the number of line segments fit, the greater the difference from the original curve, but The lower the complexity. Therefore, it is possible to select an appropriate number of points based on experience, and there is no limitation thereto.
步骤2032,针对第一类点云中的每个特征点,确定该特征点对应的至少一个形变点。例如,可以根据特征点的横坐标值确定该特征点对应的形变点。Step 2032: Determine, for each feature point in the first type of point cloud, at least one deformation point corresponding to the feature point. For example, the deformation point corresponding to the feature point may be determined according to the abscissa value of the feature point.
其中,确定该特征点对应的至少一个形变点,可以包括:基于N个形变点中的每个形变点的横坐标值,选取横坐标值(即形变点的横坐标值)小于该特征点的横坐标值的形变点,选取的形变点作为该特征点对应的形变点。The determining the at least one deformation point corresponding to the feature point may include: selecting an abscissa value (ie, an abscissa value of the deformation point) that is smaller than the feature point based on an abscissa value of each of the N deformation points. The deformation point of the abscissa value, the selected deformation point is used as the deformation point corresponding to the feature point.
例如,参见图5D所示,形变点O的横坐标值为X O,形变点A的横坐标值为X A,形变点B的横坐标值为X B,形变点C的横坐标值为X C,形变点D的横坐标值为X D,针对第一类点云中的特征点1(后续以特征点1为例进行说明,第一类点云中的每个特征点的处理方式与特征点1类似,后续不再赘述),假设特征点1的横坐标值位于X C与X D之间,由于形变点O、形变点A、形变点B、形变点C的横坐标值,均小于特征点1的横坐标值,因此,确定特征点1对应的形变点为形变点O、形变点A、形变点B、形变点C。 For example, referring to FIG. 5D, the abscissa value of the deformation point O is X O , the abscissa value of the deformation point A is X A , the abscissa value of the deformation point B is X B , and the abscissa value of the deformation point C is X. C , the horizontal coordinate value of the deformation point D is X D , and the feature point 1 in the first type of point cloud is described (hereinafter, the feature point 1 is taken as an example, and the processing manner of each feature point in the first type of point cloud is The feature point 1 is similar, and will not be described later. It is assumed that the abscissa value of the feature point 1 is located between X C and X D , and the abscissa value of the deformation point O, the deformation point A, the deformation point B, and the deformation point C are both It is smaller than the abscissa value of the feature point 1, and therefore, the deformation point corresponding to the feature point 1 is determined to be the deformation point O, the deformation point A, the deformation point B, and the deformation point C.
步骤2033,利用确定的每个形变点的斜率对该特征点进行折叠处理,得 到折叠后特征点,即第一类点云中的每个特征点对应一个折叠后特征点。 Step 2033, the feature points are folded by using the determined slope of each deformation point, and the folded feature points are obtained, that is, each feature point in the first type of point cloud corresponds to a folded feature point.
其中,利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点,包括:若该特征点对应M个形变点,则按照第一个形变点至第M个形变点的顺序,利用M个形变点分别对应的斜率,对该特征点进行M次折叠处理,得到折叠后特征点;M为大于等于1的正整数,M小于等于N。The feature point is folded by using the determined slope of each deformation point to obtain the folded feature point, including: if the feature point corresponds to the M deformation points, then the first deformation point to the Mth deformation point The order is obtained by using M slopes corresponding to the slopes of the M deformation points, and the feature points are subjected to M folding processing to obtain the folded feature points; M is a positive integer greater than or equal to 1, and M is less than or equal to N.
例如,利用形变点O对应的斜率(即形变点O与形变点A之间的线段的斜率)对特征点1进行折叠处理,得到特征点1a。然后,利用形变点A对应的斜率(即形变点A与形变点B之间的线段的斜率)对特征点1a进行折叠处理,得到特征点1b。然后,利用形变点B对应的斜率(即形变点B与形变点C之间的线段的斜率)对特征点1b进行折叠处理,得到特征点1c。然后,利用形变点C对应的斜率(即形变点C与形变点D之间的线段的斜率)对特征点1c进行折叠处理,得到特征点1d,特征点1的折叠后特征点为特征点1d。For example, the feature point 1 is subjected to folding processing using the slope corresponding to the deformation point O (that is, the slope of the line segment between the deformation point O and the deformation point A) to obtain the feature point 1a. Then, the feature point 1a is subjected to folding processing using the slope corresponding to the deformation point A (that is, the slope of the line segment between the deformation point A and the deformation point B) to obtain the feature point 1b. Then, the feature point 1b is subjected to folding processing using the slope corresponding to the deformation point B (that is, the slope of the line segment between the deformation point B and the deformation point C) to obtain the feature point 1c. Then, using the slope corresponding to the deformation point C (ie, the slope of the line segment between the deformation point C and the deformation point D), the feature point 1c is folded to obtain the feature point 1d, and the folded feature point of the feature point 1 is the feature point 1d. .
其中,利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点,包括:若该特征点对应M个形变点,则利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点;其中,i的取值依次为1,2,…M,M为大于等于1的正整数,M小于等于N。The feature point is folded by using the determined slope of each deformation point to obtain the folded feature point, including: if the feature point corresponds to the M deformation points, the slope corresponding to the i-th deformation point is used. The feature point is subjected to the ith folding process to obtain the i-th post-folding feature point; wherein, the value of i is 1, 2, ..., M, M is a positive integer greater than or equal to 1, and M is less than or equal to N.
例如,利用第1个形变点O对应的斜率对特征点1进行第1次折叠处理,得到第1次的折叠后特征点1a。利用第2个形变点A对应的斜率对特征点1a进行第2次折叠处理,得到第2次的折叠后特征点1b。利用第3个形变点B对应的斜率对特征点1b进行第3次折叠处理,得到第3次的折叠后特征点1c。利用第4个形变点C对应的斜率对特征点1c进行第4次折叠处理,得到第4次的折叠后特征点1d,因此,特征点1的折叠后特征点为特征点1d。For example, the feature point 1 is subjected to the first folding process by the slope corresponding to the first deformation point O, and the first post-folding feature point 1a is obtained. The feature point 1a is subjected to the second folding process by the slope corresponding to the second deformation point A, and the second post-folding feature point 1b is obtained. The feature point 1b is subjected to the third folding process by the slope corresponding to the third deformation point B, and the third post-folding feature point 1c is obtained. The feature point 1c is subjected to the fourth folding process using the slope corresponding to the fourth deformation point C to obtain the fourth post-folding feature point 1d. Therefore, the post-folding feature point of the feature point 1 is the feature point 1d.
在一个例子中,利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点的过程,可以包括以下步骤:In an example, the process of performing the i-th folding process on the feature point by using the slope corresponding to the i-th deformation point to obtain the i-th post-folding feature point may include the following steps:
步骤20331,利用第i个形变点对应的斜率获取坐标系的旋转参数。Step 20331: Acquire a rotation parameter of the coordinate system by using a slope corresponding to the i-th deformation point.
其中,利用第i个形变点对应的斜率获取坐标系的旋转参数,可以包括: 利用第i个形变点对应的斜率获取第i个形变点与横坐标的第一夹角。利用该第一夹角与第二夹角获取第i个形变点对应的目标角度;其中,该第二夹角可以是第i-1个形变点与横坐标之间的夹角。利用第i个形变点对应的目标角度获取坐标系的旋转参数(旋转参数也可以称为旋转矩阵,即Rotation Matrix)。The obtaining the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point may include: obtaining a first angle of the i-th deformation point and the abscissa by using a slope corresponding to the i-th deformation point. Obtaining a target angle corresponding to the i-th deformation point by using the first angle and the second angle; wherein the second angle may be an angle between the i-1th deformation point and the abscissa. The rotation parameter of the coordinate system is acquired by using the target angle corresponding to the i-th deformation point (the rotation parameter may also be referred to as a rotation matrix, that is, a Rotation Matrix).
其中,利用第i个形变点对应的斜率获取第i个形变点与横坐标的第一夹角,可以包括:利用第i个形变点的坐标值与第i+1个形变点的坐标值,获取第i个形变点对应的斜率,并利用第i个形变点对应的斜率获取第一夹角。The obtaining the first angle between the i-th deformation point and the abscissa by using the slope corresponding to the i-th deformation point may include: using the coordinate value of the i-th deformation point and the coordinate value of the i+1th deformation point, Obtain a slope corresponding to the i-th deformation point, and obtain a first angle by using a slope corresponding to the i-th deformation point.
参见图5E所示,假设第i个形变点为形变点C,可以利用形变点C的坐标值与形变点D的坐标值,获取形变点C对应的斜率,并利用形变点C对应的斜率获取第一夹角(角度4)。同理,可以获取到形变点B的第一夹角(角度3)、形变点A的第一夹角(角度2)、形变点O的第一夹角(角度1)。Referring to FIG. 5E, assuming that the i-th deformation point is the deformation point C, the coordinate value of the deformation point C and the coordinate value of the deformation point D can be used to obtain the slope corresponding to the deformation point C, and the slope corresponding to the deformation point C is obtained. First angle (angle 4). Similarly, the first angle (angle 3) of the deformation point B, the first angle (angle 2) of the deformation point A, and the first angle (angle 1) of the deformation point O can be obtained.
其中,利用第一夹角与第二夹角获取第i个形变点对应的目标角度,可以包括:将第一夹角与第二夹角的差,确定为第i个形变点对应的目标角度。The obtaining the target angle corresponding to the i-th deformation point by using the first angle and the second angle may include: determining a difference between the first angle and the second angle as the target angle corresponding to the i-th deformation point .
例如,假设第i个形变点为形变点C,则第i-1个形变点为形变点B,因此,目标角度为形变点C对应的角度4与形变点B对应的角度3的差。For example, if the i-th deformation point is the deformation point C, the i-1st deformation point is the deformation point B. Therefore, the target angle is the difference between the angle 4 corresponding to the deformation point C and the angle 3 corresponding to the deformation point B.
其中,利用第i个形变点对应的目标角度获取坐标系的旋转参数,可以包括:将所述目标角度转换为旋转矩阵;将所述旋转矩阵确定为坐标系的旋转参数。进一步的,将所述目标角度转换为旋转矩阵,可以包括:利用如下公式将所述目标角度转换为旋转矩阵:
Figure PCTCN2018073632-appb-000001
θ为所述目标角度。
The acquiring the rotation parameter of the coordinate system by using the target angle corresponding to the i-th deformation point may include: converting the target angle into a rotation matrix; and determining the rotation matrix as a rotation parameter of the coordinate system. Further, converting the target angle into a rotation matrix may include: converting the target angle into a rotation matrix by using a formula:
Figure PCTCN2018073632-appb-000001
θ is the target angle.
步骤20332,利用第i个形变点的横坐标值获取坐标系的位移参数。Step 20332: Acquire a displacement parameter of the coordinate system by using an abscissa value of the i-th deformation point.
利用第i个形变点的横坐标值获取坐标系的位移参数,可以包括:利用第i个形变点的横坐标值构造位移矩阵;将位移矩阵确定为坐标系的位移参数。Obtaining the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point may include: constructing the displacement matrix by using the abscissa value of the i-th deformation point; determining the displacement matrix as the displacement parameter of the coordinate system.
进一步的,利用第i个形变点的横坐标值构造位移矩阵,可以包括:利用如下公式构造位移矩阵:[x,0,0] T;其中,x为第i个形变点的横坐标值。 Further, constructing the displacement matrix by using the abscissa value of the i-th deformation point may include: constructing the displacement matrix by using the following formula: [x, 0, 0] T ; wherein x is the abscissa value of the i-th deformation point.
步骤20333,利用旋转参数和位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点。例如,利用旋转参数和位移参数,对特征点对应 的第i-1次的折叠后特征点进行第i次折叠处理,得到第i次的折叠后特征点。Step 20333: Perform the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point. For example, using the rotation parameter and the displacement parameter, the i-th folding feature point corresponding to the i-1th feature point corresponding to the feature point is subjected to the ith folding process to obtain the i-th post-folding feature point.
其中,利用旋转参数和位移参数,对该特征点对应的第i-1次的折叠后特征点进行第i次折叠处理,得到该特征点对应的第i次的折叠后特征点,包括:Wherein, using the rotation parameter and the displacement parameter, the i-th folding feature point corresponding to the i-1th feature point of the feature point is subjected to the ith folding process, and the ith post-folding feature point corresponding to the feature point is obtained, including:
可以利用如下公式获取第i次的折叠后特征点的三维信息:P i=R*(P i-1-T)+T;其中,P i表示第i次的折叠后特征点的三维信息,P i-1表示第i-1次的折叠后特征点的三维信息,R表示所述旋转参数,T表示所述位移参数。 The three-dimensional information of the i-th post-folding feature point can be obtained by using the following formula: P i =R*(P i-1 -T)+T; wherein P i represents the three-dimensional information of the i-th post-folding feature point, P i-1 represents three-dimensional information of the i-1th post-folding feature point, R represents the rotation parameter, and T represents the displacement parameter.
以下结合具体应用场景,对上述步骤2033的过程进行详细说明。在步骤2033中,可以利用形变点O对应的斜率对特征点1进行第1次折叠处理,得到特征点1a,利用形变点A对应的斜率对特征点1a进行第2次折叠处理,得到特征点1b,并利用形变点B对应的斜率对特征点1b进行第3次折叠处理,得到特征点1c,利用形变点C对应的斜率对特征点1c进行第4次折叠处理,得到特征点1d。参见图5F所示,上述折叠过程可以是不同坐标系(如F 0、F 1、F 2、F 3等)之间的变换问题,因此,只要获知坐标系之间的旋转参数R(如Rotation Matrix)和位移参数T(如Translation Matrix),就可以实现折叠过程。 The process of the above step 2033 is described in detail below in conjunction with a specific application scenario. In step 2033, the feature point 1 can be subjected to the first folding process using the slope corresponding to the deformation point O to obtain the feature point 1a, and the feature point 1a is subjected to the second folding process using the slope corresponding to the deformation point A to obtain the feature point. 1b, the feature point 1b is subjected to the third folding process using the slope corresponding to the deformation point B to obtain the feature point 1c, and the feature point 1c is subjected to the fourth folding process by the slope corresponding to the deformation point C to obtain the feature point 1d. Referring to FIG. 5F, the above folding process may be a transformation problem between different coordinate systems (such as F 0 , F 1 , F 2 , F 3 , etc.), so as long as the rotation parameter R between the coordinate systems is known (such as Rotation) The folding process can be achieved by the Matrix and the displacement parameter T (eg Translation Matrix).
在旋转参数R(即相邻坐标系之间的旋转关系)的求解过程中,相邻坐标系之间只是相差目标角度,如形变点O的目标角度θ1是角度1与0之差,形变点A的目标角度θ2是角度2与角度1之差,形变点B的目标角度θ3是角度3与角度2之差,形变点C的目标角度θ4是角度4与角度3之差。进一步的,可以将目标角度转为旋转矩阵,参见上述转换公式。在将θ1代入上述公式时,可以得到形变点O的旋转参数R1,在将θ2代入上述公式时,可以得到形变点A的旋转参数R2,在将θ3代入上述公式时,可以得到形变点B的旋转参数R3,在将θ4代入上述公式时,可以得到形变点C的旋转参数R4。In the process of solving the rotation parameter R (ie, the rotation relationship between adjacent coordinate systems), the adjacent coordinate systems are only the target angles, for example, the target angle θ1 of the deformation point O is the difference between the angles 1 and 0, and the deformation point The target angle θ2 of A is the difference between the angle 2 and the angle 1, the target angle θ3 of the deformation point B is the difference between the angle 3 and the angle 2, and the target angle θ4 of the deformation point C is the difference between the angle 4 and the angle 3. Further, the target angle can be converted into a rotation matrix, see the above conversion formula. When θ1 is substituted into the above formula, the rotation parameter R1 of the deformation point O can be obtained. When θ2 is substituted into the above formula, the rotation parameter R2 of the deformation point A can be obtained, and when θ3 is substituted into the above formula, the deformation point B can be obtained. When the parameter R3 is rotated, when the θ4 is substituted into the above formula, the rotation parameter R4 of the deformation point C can be obtained.
在位移参数T(即相邻坐标系之间的位移关系)的求解过程中,位移是各形变点在横轴上的距离,如形变点O的横坐标值X O,形变点A的横坐标值X A,形变点B的横坐标值X B,形变点C的横坐标值X C等,因此,可以利用X O构造形变点O的位移参数T1,利用X A构造形变点A的位移参数T2,利用X B构造形变点B的位移参数T3,利用X C构造形变点C的位移参数T4。 In the solution process of the displacement parameter T (ie, the displacement relationship between adjacent coordinate systems), the displacement is the distance of each deformation point on the horizontal axis, such as the abscissa value X O of the deformation point O , and the abscissa of the deformation point A. the value of X a, point B strain X-abscissa value B, the strain point of the abscissa value C X-C and the like, and therefore, can be configured using a strain point X O O displacement parameters Tl, X a displacement parameters configured using strain point a T2, using X B to construct the displacement parameter T3 of the deformation point B, the displacement parameter T4 of the deformation point C is constructed by X C .
然后,利用如下公式对特征点1进行第1次折叠处理:P 1=R1*(P 0-T1)+T1;其中,P 0为特征点1的三维信息(即坐标系F 0的坐标点),P 1为特征点1a的三维信息(即坐标系F 1的坐标点)。然后,利用如下公式对特征点1进行第2次折叠处理:P 2=R2*(P 1-T2)+T2;其中,P 2为特征点1b的三维信息(即坐标系F 2的坐标点)。以此类推。最终,可以得到特征点1d的三维信息。 Then, the first folding process is performed on the feature point 1 by using the following formula: P 1 = R1 * (P 0 - T1) + T1; wherein P 0 is the three-dimensional information of the feature point 1 (ie, the coordinate point of the coordinate system F 0 ) P 1 is the three-dimensional information of the feature point 1a (ie, the coordinate point of the coordinate system F 1 ). Then, the second folding process is performed on the feature point 1 by using the following formula: P 2 = R2 * (P 1 - T2) + T2; wherein P 2 is the three-dimensional information of the feature point 1b (ie, the coordinate point of the coordinate system F 2 ). And so on. Finally, three-dimensional information of the feature point 1d can be obtained.
在实际应用中,当存在多个特征点时,可以对多个特征点一起折叠,例如,对形变点O对应的所有特征点进行折叠处理,具体折叠公式参见特征点1,在此不再赘述,这样,可以将形变点O对应的所有特征点从原始的坐标系F 0转换到折叠后的坐标系F 1。然后,对形变点A对应的所有特征点进行折叠处理,具体折叠公式参见特征点1,在此不再赘述,这样,可以将形变点A对应的所有特征点从原始的坐标系F 1转换到折叠后的坐标系F 2,以此类推。 In practical applications, when there are multiple feature points, multiple feature points may be folded together. For example, all the feature points corresponding to the deformation point O are folded. For the specific folding formula, refer to feature point 1, and details are not described herein. In this way, all the feature points corresponding to the deformation point O can be converted from the original coordinate system F 0 to the folded coordinate system F 1 . Then, all the feature points corresponding to the deformation point A are folded. For the specific folding formula, refer to the feature point 1. No further details are provided here. Thus, all the feature points corresponding to the deformation point A can be converted from the original coordinate system F 1 to The folded coordinate system F 2 , and so on.
步骤2034,将第一类点云中的每个特征点对应的折叠后特征点,确定为第二类点云。也就是说,在对第一类点云中的每个特征点进行折叠处理,得到折叠后特征点后,可以将所有的折叠后特征点确定为第二类点云。Step 2034: Determine the folded feature points corresponding to each feature point in the first type of point cloud as the second type of point cloud. That is to say, after folding each feature point in the first type of point cloud to obtain the folded feature point, all the folded feature points can be determined as the second type point cloud.
例如,第二类点云可以包括特征点1对应的折叠后特征点1d,特征点2对应的折叠后特征点2d,特征点3对应的折叠后特征点3c,以此类推。For example, the second type of point cloud may include the folded feature point 1d corresponding to the feature point 1, the folded feature point 2d corresponding to the feature point 2, the folded feature point 3c corresponding to the feature point 3, and so on.
步骤204,将第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。例如,将第二类点云中的每个特征点(即折叠后特征点)投影到像平面。 Step 204, projecting the second type of point cloud onto the image plane to obtain a 2D virtual image having a folding effect. For example, each feature point in the second type of point cloud (ie, the folded feature point) is projected onto the image plane.
其中,参见图6所示,将第二类点云投影到像平面,得到具有折叠效果(如折叠城市特效)的2D虚拟图像(即最终的目标图像),可以包括:For example, as shown in FIG. 6, the second type of point cloud is projected onto the image plane to obtain a 2D virtual image (ie, a final target image) having a folding effect (such as a folded city effect), which may include:
步骤2041,获取移动平台对应的位置信息和姿态信息。Step 2041: Obtain location information and posture information corresponding to the mobile platform.
其中,获取移动平台对应的位置信息和姿态信息,可以包括:根据多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态;或者,根据多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态,并根据所述拍摄位置和所述拍摄姿态获取虚拟位置和虚拟姿态。当然,在实际应用中,还可以采用其它方式获取移动平台对应的拍摄位置和拍摄姿态,例如,可以由移动平台的传感器直接测量出移动平台对应的拍摄位置和拍摄姿态,对此不做限制。The obtaining the location information and the posture information corresponding to the mobile platform may include: acquiring the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images; or acquiring the shooting position and shooting corresponding to the mobile platform according to the plurality of 2D original images. a gesture, and acquiring a virtual position and a virtual posture according to the shooting position and the shooting attitude. Of course, in the actual application, the shooting position and the shooting attitude corresponding to the mobile platform can be obtained by other methods. For example, the shooting position and the shooting posture corresponding to the mobile platform can be directly measured by the sensor of the mobile platform, and no limitation is imposed thereon.
其中,根据多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态,可以包括:在得到多个2D原始图像后,可以利用这些2D原始图像获取移动平台的拍摄机位(即实际的位置和姿态),从而得到拍摄位置(Translation)和拍摄姿态(Rotation),对此拍摄位置和拍摄姿态的获取方式不做限制。The acquiring the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images may include: after obtaining the plurality of 2D original images, the shooting positions of the mobile platform may be obtained by using the 2D original images (ie, the actual position and Attitude), thereby obtaining a photographing position (Rotation) and a photographing posture (Rotation), and the manner in which the photographing position and the photographing posture are acquired is not limited.
进一步的,移动平台具有多传感器融合定位系统(如VO、IMU、GPS等),所述多传感器融合定位系统能够给出每个2D原始图像的位置和姿态关系,从而减少位置上的不确定性,通过将位置和姿态关系作为初始值,在获取移动平台的拍摄位置和拍摄姿态时,可以加快运算速度,并减少运算资源的消耗。Further, the mobile platform has a multi-sensor fusion positioning system (such as VO, IMU, GPS, etc.), and the multi-sensor fusion positioning system can give the position and attitude relationship of each 2D original image, thereby reducing positional uncertainty. By taking the position and attitude relationship as initial values, when acquiring the shooting position and shooting posture of the mobile platform, the calculation speed can be accelerated, and the consumption of computing resources can be reduced.
其中,根据所述拍摄位置和所述拍摄姿态获取虚拟位置和虚拟姿态,可以包括:根据实际的拍摄位置和拍摄姿态,虚拟出一个虚拟机位,即虚拟位置和虚拟姿态。例如,根据多个实际的拍摄位置和拍摄姿态虚拟出一个曲线,从该曲线上选择一个视角作为虚拟位置和虚拟姿态。或者,还可以根据用户拖拽旋转3D场景,人为虚拟一个出一个虚拟机位,得到虚拟位置和虚拟姿态。The acquiring the virtual position and the virtual posture according to the shooting position and the shooting attitude may include: virtualizing a virtual machine position, that is, a virtual position and a virtual posture, according to the actual shooting position and the shooting posture. For example, a curve is virtualized according to a plurality of actual shooting positions and shooting positions, and a viewing angle is selected from the curve as a virtual position and a virtual posture. Alternatively, it is also possible to rotate the 3D scene according to the user drag and drop, and manually create a virtual machine position to obtain a virtual position and a virtual posture.
步骤2042,根据移动平台对应的位置信息和姿态信息,将第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像。Step 2042: Projecting each feature point in the second type of point cloud to the image plane of the mobile platform according to the location information and the posture information corresponding to the mobile platform, to obtain a 2D virtual image having a folding effect.
其中,根据移动平台对应的位置信息和姿态信息,将第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像,可以包括:利用移动平台对应的内参、所述位置信息、所述姿态信息,将第二类点云中的每个特征点投影到移动平台的像平面,得到每个特征点对应的2D像素点;将第二类点云中的每个特征点对应的2D像素点组成2D虚拟图像。The feature image and the posture information corresponding to the mobile platform are used to project each feature point in the second type of point cloud to the image plane of the mobile platform to obtain a 2D virtual image having a folding effect, which may include: using a mobile platform corresponding to the mobile platform The internal parameter, the position information, and the posture information, projecting each feature point in the second type of point cloud to the image plane of the mobile platform, and obtaining a 2D pixel point corresponding to each feature point; The 2D pixel points corresponding to each feature point constitute a 2D virtual image.
进一步的,利用移动平台对应的内参、所述位置信息、所述姿态信息,将第二类点云中的每个特征点投影到移动平台的像平面,得到每个特征点对应的2D像素点,可以包括:利用如下公式获取第二类点云中的特征点对应的2D像素点:
Figure PCTCN2018073632-appb-000002
在上述公式中,K为移动平台对应的内参,R为所述位置信息、T为所述姿态信息,(x w,y w,z w)为第二类点云中的特征点对应的三维信息,(u,v)为特征点对应的2D像素点对应的二维信息。
Further, each feature point in the second type of point cloud is projected onto the image plane of the mobile platform by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, to obtain a 2D pixel point corresponding to each feature point. The method may include: acquiring a 2D pixel corresponding to the feature point in the second type of point cloud by using the following formula:
Figure PCTCN2018073632-appb-000002
In the above formula, K is an internal parameter corresponding to the mobile platform, R is the position information, T is the posture information, and (x w , y w , z w ) is a three-dimensional corresponding to the feature points in the second type of point cloud. The information, (u, v) is two-dimensional information corresponding to 2D pixel points corresponding to the feature points.
例如,步骤203得到的第二类点云可以包括多个特征点(即多个折叠后特征点),每个特征点都具有三维信息,如(x w,y w,z w)。例如,第二类点云包括上述特征点1d,以特征点1d为例进行说明,第二类点云中的其它特征点的处理与特征点1d的处理过程类似,后续不再赘述。针对特征点1d,可以得到特征点1d对应的三维信息(x w,y w,z w),然后,将特征点1d对应的三维信息(x w,y w,z w)代入上述公式,就可以得到特征点1d对应的2D像素点。 For example, the second type of point cloud obtained in step 203 may include a plurality of feature points (ie, a plurality of post-folded feature points), each feature point having three-dimensional information, such as (x w , y w , z w ). For example, the second type of point cloud includes the above-mentioned feature point 1d, and the feature point 1d is taken as an example for description. The processing of the other feature points in the second type of point cloud is similar to the processing of the feature point 1d, and will not be described again. For the feature point 1d, the three-dimensional information (x w , y w , z w ) corresponding to the feature point 1d can be obtained, and then the three-dimensional information (x w , y w , z w ) corresponding to the feature point 1d is substituted into the above formula. A 2D pixel point corresponding to the feature point 1d can be obtained.
进一步,在对第二类点云中的每个特征点进行上述处理后,可以得到每个特征点对应的2D像素点,然后,可以将这些2D像素点组成2D虚拟图像,这个2D虚拟图像也就是具有折叠效果的2D虚拟图像,其是一个2D图像。Further, after performing the above processing on each feature point in the second type of point cloud, the 2D pixel points corresponding to each feature point can be obtained, and then the 2D pixel points can be composed into a 2D virtual image, and the 2D virtual image is also It is a 2D virtual image with a folding effect, which is a 2D image.
在上述公式中,移动平台对应的内参K是一个矩阵,内参K是一个已知参数,为相机内参,对此不做限制。此外,位置信息R可以是旋转矩阵,姿态信息T可以是位移矩阵,旋转矩阵R和位移矩阵T为相机外参,表达的是三维空间中,世界坐标系到相机坐标系的旋转与位移变换,对此不做限制。In the above formula, the internal reference K corresponding to the mobile platform is a matrix, and the internal parameter K is a known parameter, which is a camera internal parameter, and no limitation is imposed thereon. In addition, the position information R may be a rotation matrix, the attitude information T may be a displacement matrix, the rotation matrix R and the displacement matrix T are camera external parameters, and the rotation and displacement transformation of the world coordinate system to the camera coordinate system are expressed in a three-dimensional space. There is no limit to this.
在一个例子中,由于折叠过程是在三维模型上操作的,即第二类点云中的每个特征点均是3D特征点,因此,经过上述处理,可以将3D特征点转换为2D像素点,并将所有2D像素点组成2D虚拟图像,从而可以将折叠后的三维模型重新转换成2D虚拟图像,即,得到具有折叠效果的2D虚拟图像。In one example, since the folding process is operated on the three-dimensional model, that is, each feature point in the second type of point cloud is a 3D feature point, therefore, after the above processing, the 3D feature point can be converted into a 2D pixel point. And all 2D pixel points are composed into a 2D virtual image, so that the folded three-dimensional model can be reconverted into a 2D virtual image, that is, a 2D virtual image with a folding effect is obtained.
基于上述技术方案,本发明实施例中,由于移动平台具有良好的轨迹规划,具有自动飞行和智能跟随等功能,移动平台获取包含目标物体的多个2D原始图像后,可以根据2D原始图像获取具有折叠效果的2D虚拟图像,降低具有折叠效果(如折叠城市特效)的图像的获取复杂度,上述过程是自动完成,用户无需干预,用户可以拍摄具有折叠效果的图像,提高用户使用体验。Based on the foregoing technical solution, in the embodiment of the present invention, since the mobile platform has good trajectory planning and has functions such as automatic flight and intelligent following, after the mobile platform acquires multiple 2D original images including the target object, the mobile platform can acquire according to the 2D original image. Folding the effect of 2D virtual images, reducing the acquisition complexity of images with folding effects (such as folding city effects), the above process is automatically completed, the user can shoot images with folding effect without intervention, and improve the user experience.
在一个例子中,采用密集SfM算法得到第一类点云时,针对2D原始图像的绝大多数或者全部2D点,在第一类点云中对应有3D特征点,从而在第二类点云中对应有3D特征点。在另一个例子中,采用稀疏SfM算法得到第一类点云时,2D原始图像中只有部分2D点(为了区分方便,将这部分2D点称为2D特征点)在第一类点云中对应有3D特征点,从而在第二类点云中 对应有3D特征点,这样,2D虚拟图像只包括这些2D特征点对应的2D像素点,对于2D原始图像中剩下的2D点(为了区分方便,将这部分剩下的2D点称为2D原始点),也可以映射到2D虚拟图像,以下对该过程进行说明。In an example, when the first type of point cloud is obtained by using the dense SfM algorithm, most or all 2D points of the 2D original image correspond to 3D feature points in the first type of point cloud, so that in the second type of point cloud There are corresponding 3D feature points in the middle. In another example, when the first type of point cloud is obtained by using the sparse SfM algorithm, only part of the 2D point in the 2D original image (for convenience of distinction, this part of the 2D point is called a 2D feature point) corresponds to the first type of point cloud. There are 3D feature points, so that there are 3D feature points in the second type of point cloud, so that the 2D virtual image only includes the 2D pixel points corresponding to the 2D feature points, and the remaining 2D points in the 2D original image (for convenience of distinction) The remaining 2D points are referred to as 2D original points, and can also be mapped to 2D virtual images. The process will be described below.
参见图7所示,将第二类点云投影到像平面,得到2D虚拟图像之后,为了将2D原始图像中剩下的2D原始点映射到2D虚拟图像,还可以包括:As shown in FIG. 7 , after the second type of point cloud is projected onto the image plane, after the 2D virtual image is obtained, in order to map the remaining 2D original points in the 2D original image to the 2D virtual image, the method may further include:
步骤701,从2D原始图像中确定第二类点云中的每个特征点对应的2D特征点。其中,由于第二类点云中的特征点对应第一类点云中的特征点,且第一类点云中的特征点是基于2D原始图像中的2D特征点获取的,因此,第二类点云中的每个特征点在2D原始图像中具有对应的2D特征点。Step 701: Determine a 2D feature point corresponding to each feature point in the second type of point cloud from the 2D original image. Wherein, the feature points in the second type of point cloud correspond to the feature points in the first type of point cloud, and the feature points in the first type of point cloud are acquired based on the 2D feature points in the 2D original image, therefore, the second Each feature point in the class point cloud has a corresponding 2D feature point in the 2D original image.
步骤702,利用所述2D特征点将2D原始图像划分出多个三角区域;其中,针对每个三角区域,可以包括3个2D特征点、多个2D原始点。Step 702: The 2D original image is divided into a plurality of triangular regions by using the 2D feature points; wherein, for each triangular region, three 2D feature points and a plurality of 2D original points may be included.
其中,利用所述2D特征点将2D原始图像划分出多个三角区域,可以包括:采用三角剖分算法将2D原始图像中的2D特征点连接成多个三角区域。The dividing the 2D original image into the plurality of triangular regions by using the 2D feature points may include: connecting the 2D feature points in the 2D original image into a plurality of triangular regions by using a triangulation algorithm.
具体的,在从2D原始图像中获取到所有2D特征点后,可以采用三角剖分算法(如Delaunay Triangulation算法)对这些2D特征点进行三角剖分,从而分割出多个三角区域,对此三角剖分方式不做限制。每个三角区域的三个顶点就是3个2D特征点,且在三角区域内的其它点为2D原始点。Specifically, after all the 2D feature points are acquired from the 2D original image, the 2D feature points may be triangulated by a triangulation algorithm (such as the Delaunay Triangulation algorithm), thereby dividing a plurality of triangular regions, and the triangle is divided. There is no restriction on the way to split. The three vertices of each triangle area are three 2D feature points, and the other points in the triangle area are 2D original points.
步骤703,针对每个三角区域,利用该三角区域包括的3个2D特征点获取该三角区域对应的投影参数(用于将2D原始点投影到2D虚拟图像)。Step 703: For each triangular region, use the three 2D feature points included in the triangular region to acquire projection parameters corresponding to the triangular region (for projecting the 2D original point to the 2D virtual image).
其中,利用该三角区域包括的3个2D特征点获取该三角区域对应的投影参数,包括:利用所述3个2D特征点在2D原始图像中的二维信息、所述3个2D特征点在2D虚拟图像中的二维信息,获取该三角区域对应的投影参数。The obtaining the projection parameters corresponding to the triangular region by using the three 2D feature points included in the triangular region includes: using the two 2D feature points in the 2D original image, the two 2D feature points in the The two-dimensional information in the 2D virtual image acquires projection parameters corresponding to the triangular region.
进一步的,利用所述3个2D特征点在2D原始图像中的二维信息、所述3个2D特征点在2D虚拟图像中的二维信息,获取该三角区域对应的投影参数,可以包括:利用如下公式获取该三角区域对应的投影参数:
Figure PCTCN2018073632-appb-000003
Further, obtaining the projection parameters corresponding to the triangular region by using the two-dimensional information of the two 2D feature points in the 2D original image and the two-dimensional information of the three 2D feature points in the 2D virtual image may include: Obtain the projection parameters corresponding to the triangle region by using the following formula:
Figure PCTCN2018073632-appb-000003
其中,p’为2D特征点在2D虚拟图像中的二维信息,p为所述2D特征点 在2D原始图像中的二维信息,A和t为该三角区域对应的投影参数。Wherein p' is two-dimensional information of the 2D feature point in the 2D virtual image, p is the two-dimensional information of the 2D feature point in the 2D original image, and A and t are projection parameters corresponding to the triangular region.
在上述公式中,
Figure PCTCN2018073632-appb-000004
也就是说,一共存在6个未知参数,而三角区域包括3个2D特征点,假设为2D特征点1、2D特征点2和2D特征点3,由于2D特征点1在2D原始图像中的二维信息p 1已知,2D特征点1在2D虚拟图像中的二维信息p 1’已知,2D特征点2在2D原始图像中的二维信息p 2已知,2D特征点2在2D虚拟图像中的二维信息p 2’已知,2D特征点3在2D原始图像中的二维信息p 3已知,2D特征点3在2D虚拟图像中的二维信息p 3’已知,因此,通过上述p 1、p 1’、p 2、p 2’、p 3、p 3’,就可以计算出6个未知参数,从而可以计算出三角区域对应的投影参数A和t。
In the above formula,
Figure PCTCN2018073632-appb-000004
That is to say, there are 6 unknown parameters in total, and the triangular region includes 3 2D feature points, which are assumed to be 2D feature points 1, 2D feature points 2 and 2D feature points 3, because 2D feature points 1 are in the 2D original image. The dimension information p 1 is known, the 2D information p 1 ' of the 2D feature point 1 in the 2D virtual image is known, the 2D information p 2 of the 2D feature point 2 in the 2D original image is known, and the 2D feature point 2 is in 2D The two-dimensional information p 2 ' in the virtual image is known, the two-dimensional information p 3 of the 2D feature point 3 in the 2D original image is known, and the two-dimensional information p 3 ' of the 2D feature point 3 in the 2D virtual image is known, Therefore, by the above p 1 , p 1 ', p 2 , p 2 ', p 3 , p 3 ', six unknown parameters can be calculated, so that the projection parameters A and t corresponding to the triangular regions can be calculated.
步骤704,利用三角区域对应的投影参数对该三角区域内的所有2D原始点进行投影处理,即将三角区域内的所有2D原始点投影到2D虚拟图像。Step 704: Perform projection processing on all 2D original points in the triangular area by using projection parameters corresponding to the triangular area, that is, project all 2D original points in the triangular area to the 2D virtual image.
其中,利用三角区域对应的投影参数对该三角区域内的所有2D原始点进行投影处理,可以包括:利用如下公式将该三角区域内的2D原始点投影到2D虚拟图像:
Figure PCTCN2018073632-appb-000005
其中,p为2D原始点在2D原始图像中的二维信息,A和t为三角区域对应的投影参数,p’为2D原始点在2D虚拟图像中的二维信息。由于p、A和t已知,因此,通过上述公式可以计算出p’,而p’是2D原始点在2D虚拟图像中的二维信息,即将2D原始点投影到2D虚拟图像。
The projecting the all 2D original points in the triangular region by using the projection parameters corresponding to the triangular regions may include: projecting the 2D original points in the triangular region to the 2D virtual image by using the following formula:
Figure PCTCN2018073632-appb-000005
Where p is the two-dimensional information of the 2D original point in the 2D original image, A and t are the projection parameters corresponding to the triangular region, and p' is the two-dimensional information of the 2D original point in the 2D virtual image. Since p, A, and t are known, p' can be calculated by the above formula, and p' is two-dimensional information of the 2D original point in the 2D virtual image, that is, the 2D original point is projected to the 2D virtual image.
在针对三角区域内的所有2D原始点进行上述处理后,就可以将三角区域内的所有2D原始点投影到2D虚拟图像。此外,在对每个三角区域进行上述处理后,就可以将所有三角区域的所有2D原始点投影到2D虚拟图像。经过上述处理,就可以将2D原始图像中的所有2D原始点投影到2D虚拟图像。After performing the above processing for all 2D original points in the triangular region, all 2D original points in the triangular region can be projected to the 2D virtual image. Furthermore, after performing the above processing for each of the triangular regions, all 2D original points of all the triangular regions can be projected to the 2D virtual image. Through the above processing, all 2D original points in the 2D original image can be projected to the 2D virtual image.
基于与上述方法同样的构思,参见图8所示,本发明实施例中还提供一种图像处理设备80,包括存储器801和处理器802(如一个或多个处理器)。Based on the same concept as the above method, as shown in FIG. 8, an embodiment of the present invention further provides an image processing apparatus 80, which includes a memory 801 and a processor 802 (such as one or more processors).
其中,所述存储器,用于存储程序代码;所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于执行以下操作:获取包含目标物体的多个2D原始图像;根据所述多个2D原始图像获取所述目标物体的3D场 景的第一类点云;利用形变函数对所述第一类点云进行折叠处理,得到第二类点云;将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。The memory is configured to store program code, and the processor is configured to invoke the program code, when the program code is executed, to perform the following operations: acquiring a plurality of 2D original images including a target object Obtaining a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images; performing a folding process on the first type of point cloud by using a deformation function to obtain a second type of point cloud; The second type of point cloud is projected onto the image plane to obtain a 2D virtual image with a folding effect.
优选的,所述处理器在获取包含目标物体的多个2D原始图像时具体用于:根据目标物体的位置规划移动平台的飞行轨迹,控制移动平台按照所述飞行轨迹飞行,在飞行过程中采集包含目标物体的多个2D原始图像。Preferably, the processor is configured to: when planning a plurality of 2D original images including the target object, plan a flight trajectory of the mobile platform according to the location of the target object, control the mobile platform to fly according to the flight trajectory, and collect during the flight. Contains multiple 2D raw images of the target object.
优选的,所述处理器在根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云时具体用于:通过图像处理算法对所述多个2D原始图像进行处理,得到所述目标物体的3D场景的第一类点云;所述第一类点云包括具有三维信息的多个特征点。Preferably, the processor is configured to: when the first type of point cloud of the 3D scene of the target object is acquired according to the plurality of 2D original images, process the plurality of 2D original images by using an image processing algorithm, Obtaining a first type of point cloud of the 3D scene of the target object; the first type of point cloud includes a plurality of feature points having three-dimensional information.
优选的,所述处理器在利用形变函数对所述第一类点云进行折叠处理,得到第二类点云时具体用于:在形变函数对应的曲线上选取N个形变点,N为大于等于1的正整数;针对第一类点云中的每个特征点,确定该特征点对应的至少一个形变点;利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点;将第一类点云中的每个特征点对应的折叠后特征点,确定为第二类点云。Preferably, the processor is configured to perform folding processing on the first type of point cloud by using a deformation function, and when the second type of point cloud is obtained, the processor is specifically configured to: select N deformation points on the curve corresponding to the deformation function, and N is greater than a positive integer equal to 1; for each feature point in the first type of point cloud, determining at least one deformation point corresponding to the feature point; and folding the feature point by using the determined slope of each deformation point to obtain a folded Feature points; the folded feature points corresponding to each feature point in the first type of point cloud are determined as the second type of point cloud.
优选的,所述处理器在形变函数对应的曲线上选取N个形变点时具体用于:在形变函数对应曲线的横坐标方向,每隔第一距离选取一个形变点;或者,在形变函数对应曲线的纵坐标方向,每隔第二距离选取一个形变点。Preferably, when the processor selects N deformation points on the curve corresponding to the deformation function, the processor specifically selects: in the abscissa direction of the curve corresponding to the deformation function, selects a deformation point every first distance; or, corresponds to the deformation function In the ordinate direction of the curve, a deformation point is selected every second distance.
优选的,所述处理器在确定该特征点对应的至少一个形变点时具体用于:基于N个形变点中的每个形变点的横坐标值,选取横坐标值小于该特征点的横坐标值的形变点,作为该特征点对应的形变点。Preferably, when determining the at least one deformation point corresponding to the feature point, the processor is specifically configured to: select an abscissa value of the feature point based on an abscissa value of each of the N deformation points The deformation point of the value is taken as the deformation point corresponding to the feature point.
优选的,所述处理器在利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点时具体用于:若该特征点对应M个形变点,则按照第一个形变点至第M个形变点的顺序,利用所述M个形变点分别对应的斜率,对该特征点进行M次折叠处理,得到折叠后特征点;M为大于等于1的正整数,M小于等于N。Preferably, the processor performs folding processing on the feature point by using the determined slope of each deformation point to obtain a folded feature point, and is specifically used to: if the feature point corresponds to M deformation points, follow the first The order of the deformation point to the Mth deformation point is performed by using the slope corresponding to the M deformation points, and the feature points are subjected to M folding processing to obtain a folded feature point; M is a positive integer greater than or equal to 1, and M is smaller than Equal to N.
优选的,所述处理器在利用确定的每个形变点的斜率对该特征点进行折 叠处理,得到折叠后特征点时具体用于:若该特征点对应M个形变点,则利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点;其中,所述i的取值依次为1,2,…M,所述M为大于等于1的正整数,M小于等于N。Preferably, the processor performs folding processing on the feature point by using the determined slope of each deformation point, and obtains the post-folded feature point, and is specifically used to: if the feature point corresponds to M deformation points, use the ith The slope corresponding to the deformation point is subjected to the ith folding process to obtain the i-th post-folding feature point; wherein the value of i is 1, 2, ..., M, and the M is greater than or equal to A positive integer of 1, M is less than or equal to N.
优选的,所述处理器在利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点时具体用于:利用第i个形变点对应的斜率获取坐标系的旋转参数,利用第i个形变点的横坐标值获取坐标系的位移参数,利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点。Preferably, the processor performs the i-th folding process on the feature point by using the slope corresponding to the i-th deformation point, and obtains the i-th post-folding feature point, and is specifically used to: use the i-th deformation point correspondingly Obtaining the rotation parameter of the coordinate system, obtaining the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point, and performing the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th Subfolded feature points after the fold.
优选的,所述处理器在利用第i个形变点对应的斜率获取坐标系的旋转参数时具体用于:利用第i个形变点对应的斜率获取第i个形变点与横坐标的第一夹角;利用所述第一夹角与第二夹角获取所述第i个形变点对应的目标角度;其中,所述第二夹角是第i-1个形变点与横坐标之间的夹角;利用所述第i个形变点对应的目标角度获取坐标系的旋转参数。Preferably, the processor is configured to acquire the first clip of the i-th deformation point and the abscissa by using the slope corresponding to the i-th deformation point when acquiring the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point. Obtaining a target angle corresponding to the i-th deformation point by using the first angle and the second angle; wherein the second angle is a clip between the i-1th deformation point and the abscissa An angle is obtained by using a target angle corresponding to the i-th deformation point.
优选的,所述处理器在利用第i个形变点的横坐标值获取坐标系的位移参数时具体用于:利用第i个形变点的横坐标值构造位移矩阵;将所述位移矩阵确定为坐标系的位移参数。Preferably, the processor is configured to: when using the abscissa value of the i-th deformation point to obtain the displacement parameter of the coordinate system, construct the displacement matrix by using the abscissa value of the i-th deformation point; and determine the displacement matrix as The displacement parameter of the coordinate system.
优选的,所述处理器在利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点时具体用于:利用所述旋转参数和所述位移参数,对该特征点对应的第i-1次的折叠后特征点进行第i次折叠处理,得到该特征点对应的第i次的折叠后特征点。Preferably, the processor performs the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point, and is specifically used to: use the rotation parameter and the The displacement parameter is subjected to the i-th folding process of the i-th post-folding feature point corresponding to the feature point, and the i-th post-folding feature point corresponding to the feature point is obtained.
优选的,所述处理器在将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像时具体用于:获取移动平台对应的位置信息和姿态信息;根据所述移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像。Preferably, the processor is configured to: acquire the location information and the posture information corresponding to the mobile platform when the second type of point cloud is projected to the image plane to obtain the 2D virtual image with the folding effect; according to the mobile platform Corresponding position information and posture information, each feature point in the second type of point cloud is projected onto the image plane of the mobile platform to obtain a 2D virtual image having a folding effect.
优选的,所述处理器在获取移动平台对应的位置信息和姿态信息时具体用于:根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态; 或者,根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态,并根据所述拍摄位置和所述拍摄姿态获取虚拟位置和虚拟姿态。Preferably, the processor is configured to: acquire the shooting position and the shooting posture corresponding to the mobile platform according to the plurality of 2D original images when acquiring the position information and the posture information corresponding to the mobile platform; or, according to the multiple 2D The original image acquires a shooting position and a shooting attitude corresponding to the mobile platform, and acquires a virtual position and a virtual posture according to the shooting position and the shooting posture.
优选的,所述处理器在根据所述移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像时具体用于:利用移动平台对应的内参、所述位置信息、所述姿态信息,将第二类点云中的每个特征点投影到所述像平面,得到每个特征点对应的2D像素点;将第二类点云中的每个特征点对应的2D像素点组成所述2D虚拟图像。Preferably, the processor projects each feature point in the second type of point cloud to the image plane of the mobile platform according to the location information and the posture information corresponding to the mobile platform, to obtain a 2D virtual image with a folding effect. The image is specifically used for: projecting each feature point in the second type of point cloud to the image plane by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, and obtaining 2D corresponding to each feature point. a pixel point; a 2D pixel corresponding to each feature point in the second type of point cloud is composed of the 2D virtual image.
优选的,所述处理器在将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像之后还用于:从2D原始图像中确定第二类点云中的每个特征点对应的2D特征点;利用所述2D特征点将所述2D原始图像划分出多个三角区域;其中,针对每个三角区域,包括3个2D特征点、多个2D原始点;利用所述3个2D特征点获取所述三角区域对应的投影参数;利用所述投影参数对所述三角区域内的所有2D原始点进行投影处理。Preferably, after the projector projects the second type of point cloud onto the image plane to obtain a 2D virtual image with a folding effect, the processor is further configured to: determine each feature in the second type of point cloud from the 2D original image. Pointing a corresponding 2D feature point; dividing the 2D original image into a plurality of triangular regions by using the 2D feature point; wherein, for each triangular region, including 3 2D feature points, a plurality of 2D original points; The three 2D feature points acquire projection parameters corresponding to the triangular regions; and use the projection parameters to perform projection processing on all 2D original points in the triangular region.
优选的,所述处理器在利用所述2D特征点将所述2D原始图像划分出多个三角区域时具体用于:采用三角剖分算法将2D原始图像中的2D特征点连接成多个三角区域。Preferably, when the processor divides the 2D original image into a plurality of triangular regions by using the 2D feature points, the processor is specifically configured to: connect the 2D feature points in the 2D original image into multiple triangles by using a triangulation algorithm. region.
所述处理器在利用所述3个2D特征点获取所述三角区域对应的投影参数时具体用于:利用3个2D特征点在2D原始图像中的二维信息、所述3个2D特征点在2D虚拟图像中的二维信息,获取所述三角区域对应的投影参数。When the processor acquires the projection parameters corresponding to the triangular region by using the three 2D feature points, the processor specifically uses: two-dimensional information in the 2D original image using the three 2D feature points, and the three 2D feature points. The two-dimensional information in the 2D virtual image acquires projection parameters corresponding to the triangular region.
基于与上述方法同样的构思,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,在所述计算机指令被执行时,实现上述的图像处理方法。Based on the same concept as the above method, the embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium stores computer instructions, and when the computer instructions are executed, the image processing method is implemented. .
上述实施例阐明的系统、装置、模块或单元,可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游 戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。The system, apparatus, module or unit set forth in the above embodiments may be implemented by a computer chip or an entity, or by a product having a certain function. A typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, and a game control. A combination of a tablet, a tablet, a wearable device, or any of these devices.
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。For the convenience of description, the above devices are described separately by function into various units. Of course, the functions of the various units may be implemented in one or more software and/or hardware in the practice of the invention.
本领域内的技术人员应明白,本发明实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。Moreover, these computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The instruction means implements the functions specified in one or more blocks of the flowchart or in a flow or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The steps are provided to implement the functions specified in one or more blocks of the flowchart or in a block or blocks of the flowchart.
以上所述仅为本发明实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进,均应包含在本发明的权利要求范围之内。The above is only the embodiments of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and changes can be made in the present invention. Any modifications, equivalents, and improvements made within the spirit and scope of the invention are intended to be included within the scope of the appended claims.

Claims (39)

  1. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, the method comprising:
    获取包含目标物体的多个2D原始图像;Obtaining a plurality of 2D original images containing the target object;
    根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云;Acquiring a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images;
    利用形变函数对所述第一类点云进行折叠处理,得到第二类点云;Folding the first type of point cloud by using a deformation function to obtain a second type of point cloud;
    将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。Projecting the second type of point cloud onto the image plane yields a 2D virtual image with a folding effect.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述获取包含目标物体的多个2D原始图像,包括:The acquiring a plurality of 2D original images including the target object includes:
    根据目标物体的位置规划移动平台的飞行轨迹,控制移动平台按照所述飞行轨迹飞行,在飞行过程中采集包含目标物体的多个2D原始图像。The flight path of the mobile platform is planned according to the position of the target object, and the mobile platform is controlled to fly according to the flight path, and a plurality of 2D original images including the target object are collected during the flight.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云,包括:The method according to claim 1, wherein the acquiring a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images comprises:
    通过图像处理算法对所述多个2D原始图像进行处理,得到所述目标物体的3D场景的第一类点云;所述第一类点云包括具有三维信息的多个特征点。The plurality of 2D original images are processed by an image processing algorithm to obtain a first type of point cloud of the 3D scene of the target object; and the first type of point cloud includes a plurality of feature points having three-dimensional information.
  4. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述图像处理算法包括:结构重建SfM算法;The image processing algorithm includes: a structural reconstruction SfM algorithm;
    其中,所述SfM算法包括:稀疏SfM算法;或者,密集SfM算法。The SfM algorithm includes: a sparse SfM algorithm; or a dense SfM algorithm.
  5. 根据权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    利用形变函数对所述第一类点云进行折叠处理,得到第二类点云,包括:The first type of point cloud is folded by using a deformation function to obtain a second type of point cloud, including:
    在形变函数对应的曲线上选取N个形变点,N为大于等于1的正整数;N deformation points are selected on the curve corresponding to the deformation function, and N is a positive integer greater than or equal to 1;
    针对第一类点云中的每个特征点,确定该特征点对应的至少一个形变点;利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点;Determining at least one deformation point corresponding to the feature point for each feature point in the first type of point cloud; folding the feature point by using the determined slope of each deformation point to obtain the folded feature point;
    将第一类点云中的每个特征点对应的折叠后特征点,确定为第二类点云。The folded feature points corresponding to each feature point in the first type of point cloud are determined as the second type point cloud.
  6. 根据权利要求1或5所述的方法,其特征在于,所述形变函数包括:The method according to claim 1 or 5, wherein the deformation function comprises:
    指数函数;或者,抛物线函数;或者,阿基米德螺线函数。Exponential function; or, a parabolic function; or, an Archimedes spiral function.
  7. 根据权利要求5所述的方法,其特征在于,The method of claim 5 wherein:
    所述在形变函数对应的曲线上选取N个形变点,包括:The N deformation points are selected on the curve corresponding to the deformation function, including:
    在形变函数对应曲线的横坐标方向,每隔第一距离选取一个形变点;或者,在形变函数对应曲线的纵坐标方向,每隔第二距离选取一个形变点。In the abscissa direction of the curve corresponding to the deformation function, one deformation point is selected every first distance; or, in the longitudinal direction of the curve corresponding to the deformation function, a deformation point is selected every second distance.
  8. 根据权利要求5所述的方法,其特征在于,The method of claim 5 wherein:
    所述确定该特征点对应的至少一个形变点,包括:Determining at least one deformation point corresponding to the feature point, including:
    基于N个形变点中的每个形变点的横坐标值,选取横坐标值小于该特征点的横坐标值的形变点,作为该特征点对应的形变点。Based on the abscissa value of each of the N deformation points, a deformation point whose abscissa value is smaller than the abscissa value of the feature point is selected as the deformation point corresponding to the feature point.
  9. 根据权利要求5所述的方法,其特征在于,所述利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点,包括:The method according to claim 5, wherein the folding of the feature points by using the determined slope of each deformation point to obtain the folded feature points comprises:
    若该特征点对应M个形变点,则按照第一个形变点至第M个形变点的顺序,利用所述M个形变点分别对应的斜率,对该特征点进行M次折叠处理,得到折叠后特征点;M为大于等于1的正整数,M小于等于N。If the feature points correspond to the M deformation points, the feature points are M-folded by the slope corresponding to the M deformation points according to the order of the first deformation point to the Mth deformation point, and the folding is obtained. Post-feature point; M is a positive integer greater than or equal to 1, and M is less than or equal to N.
  10. 根据权利要求5所述的方法,其特征在于,所述利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点,包括:The method according to claim 5, wherein the folding of the feature points by using the determined slope of each deformation point to obtain the folded feature points comprises:
    若该特征点对应M个形变点,则利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点;其中,所述i的取值依次为1,2,…M,所述M为大于等于1的正整数,M小于等于N。If the feature point corresponds to the M deformation points, the i-th folding process is performed on the feature point by using the slope corresponding to the i-th deformation point to obtain the i-th post-folding feature point; wherein the value of the i is In order of 1, 2, ..., M, the M is a positive integer greater than or equal to 1, and M is less than or equal to N.
  11. 根据权利要求10所述的方法,其特征在于,利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点,包括:The method according to claim 10, wherein the i-th folding process is performed on the feature point by using a slope corresponding to the i-th deformation point, and the i-th post-folding feature point is obtained, including:
    利用第i个形变点对应的斜率获取坐标系的旋转参数,利用第i个形变点的横坐标值获取坐标系的位移参数,并利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点。Obtaining a rotation parameter of the coordinate system by using a slope corresponding to the i-th deformation point, acquiring a displacement parameter of the coordinate system by using an abscissa value of the i-th deformation point, and performing the feature point on the feature point by using the rotation parameter and the displacement parameter The i-folding process is performed to obtain the i-th post-folding feature point.
  12. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述利用第i个形变点对应的斜率获取坐标系的旋转参数,包括:The acquiring the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point, including:
    利用第i个形变点对应的斜率获取第i个形变点与横坐标的第一夹角;Obtaining a first angle of the i-th deformation point and the abscissa by using a slope corresponding to the i-th deformation point;
    利用所述第一夹角与第二夹角获取所述第i个形变点对应的目标角度;其中,所述第二夹角是第i-1个形变点与横坐标之间的夹角;Obtaining, by the first angle and the second angle, a target angle corresponding to the i-th deformation point; wherein the second angle is an angle between the i-1th deformation point and the abscissa;
    利用所述第i个形变点对应的目标角度获取坐标系的旋转参数。The rotation parameter of the coordinate system is acquired by the target angle corresponding to the i-th deformation point.
  13. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述利用第i个形变点的横坐标值获取坐标系的位移参数,包括:And acquiring the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point, including:
    利用第i个形变点的横坐标值构造位移矩阵;Constructing a displacement matrix by using an abscissa value of the i-th deformation point;
    将所述位移矩阵确定为坐标系的位移参数。The displacement matrix is determined as a displacement parameter of the coordinate system.
  14. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点,包括:And performing the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point, including:
    利用所述旋转参数和所述位移参数,对该特征点对应的第i-1次的折叠后特征点进行第i次折叠处理,得到该特征点对应的第i次的折叠后特征点。Using the rotation parameter and the displacement parameter, the i-th folding feature point corresponding to the feature point is subjected to an ith folding process to obtain an i-th post-folding feature point corresponding to the feature point.
  15. 根据权利要求1所述的方法,其特征在于,所述将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像,包括:The method according to claim 1, wherein the projecting the second type of point cloud to the image plane to obtain a 2D virtual image having a folding effect comprises:
    获取移动平台对应的位置信息和姿态信息;Obtaining location information and posture information corresponding to the mobile platform;
    根据所述移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像。And projecting each feature point in the second type of point cloud to an image plane of the mobile platform according to position information and posture information corresponding to the mobile platform, to obtain a 2D virtual image having a folding effect.
  16. 根据权利要求15所述的方法,其特征在于,The method of claim 15 wherein:
    所述获取移动平台对应的位置信息和姿态信息,包括:And obtaining the location information and the posture information corresponding to the mobile platform, including:
    根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态;Obtaining a shooting position and a shooting attitude corresponding to the mobile platform according to the plurality of 2D original images;
    或者,根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态,并根据所述拍摄位置和所述拍摄姿态获取虚拟位置和虚拟姿态。Alternatively, the shooting position and the shooting attitude corresponding to the mobile platform are acquired according to the plurality of 2D original images, and the virtual position and the virtual posture are acquired according to the shooting position and the shooting attitude.
  17. 根据权利要求15所述的方法,其特征在于,所述根据所述移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像,包括:The method according to claim 15, wherein each feature point in the second type of point cloud is projected to an image plane of the mobile platform according to position information and posture information corresponding to the mobile platform. Get a 2D virtual image with a folding effect, including:
    利用移动平台对应的内参、所述位置信息、所述姿态信息,将第二类点云中的每个特征点投影到所述像平面,得到每个特征点对应的2D像素点;Projecting each feature point in the second type of point cloud to the image plane by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, to obtain a 2D pixel point corresponding to each feature point;
    将第二类点云中的每个特征点对应的2D像素点组成所述2D虚拟图像。The 2D pixel points corresponding to each feature point in the second type of point cloud are composed of the 2D virtual image.
  18. 根据权利要求1所述的方法,其特征在于,所述将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像之后,所述方法还包括:The method according to claim 1, wherein after the projecting the second type of point cloud to the image plane to obtain a 2D virtual image having a folding effect, the method further comprises:
    从2D原始图像中确定第二类点云中的每个特征点对应的2D特征点;Determining a 2D feature point corresponding to each feature point in the second type of point cloud from the 2D original image;
    利用所述2D特征点将所述2D原始图像划分出多个三角区域;其中,针对每个三角区域,包括3个2D特征点、多个2D原始点;The 2D original image is divided into a plurality of triangular regions by using the 2D feature points; wherein, for each triangular region, three 2D feature points and a plurality of 2D original points are included;
    利用所述3个2D特征点获取所述三角区域对应的投影参数;Obtaining, by using the three 2D feature points, a projection parameter corresponding to the triangular region;
    利用所述投影参数对所述三角区域内的所有2D原始点进行投影处理。Projecting processing of all 2D original points in the triangular region using the projection parameters.
  19. 根据权利要求18所述的方法,其特征在于,The method of claim 18, wherein
    利用所述2D特征点将所述2D原始图像划分出多个三角区域,包括:Dividing the 2D original image into a plurality of triangular regions by using the 2D feature points includes:
    采用三角剖分算法将2D原始图像中的2D特征点连接成多个三角区域。The triangulation algorithm is used to join 2D feature points in the 2D original image into a plurality of triangular regions.
  20. 根据权利要求18所述的方法,其特征在于,The method of claim 18, wherein
    利用所述3个2D特征点获取所述三角区域对应的投影参数,包括:Obtaining the projection parameters corresponding to the triangle region by using the three 2D feature points, including:
    利用所述3个2D特征点在2D原始图像中的二维信息、所述3个2D特征点在2D虚拟图像中的二维信息,获取所述三角区域对应的投影参数。The two-dimensional information of the three 2D feature points in the 2D original image and the two-dimensional information of the three 2D feature points in the 2D virtual image are used to acquire projection parameters corresponding to the triangular region.
  21. 一种图像处理设备,其特征在于,包括:存储器和处理器;An image processing device, comprising: a memory and a processor;
    所述存储器,用于存储程序代码;The memory is configured to store program code;
    所述处理器,用于调用所述程序代码,当所述程序代码被执行时,用于执行以下操作:获取包含目标物体的多个2D原始图像;The processor is configured to invoke the program code, when the program code is executed, to perform the following operations: acquiring a plurality of 2D original images including a target object;
    根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云;Acquiring a first type of point cloud of the 3D scene of the target object according to the plurality of 2D original images;
    利用形变函数对所述第一类点云进行折叠处理,得到第二类点云;Folding the first type of point cloud by using a deformation function to obtain a second type of point cloud;
    将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像。Projecting the second type of point cloud onto the image plane yields a 2D virtual image with a folding effect.
  22. 根据权利要求21所述的设备,其特征在于,The device according to claim 21, wherein
    所述处理器在获取包含目标物体的多个2D原始图像时具体用于:根据目标物体的位置规划移动平台的飞行轨迹,控制移动平台按照所述飞行轨迹飞行,在飞行过程中采集包含目标物体的多个2D原始图像。The processor is specifically configured to: when planning a plurality of 2D original images including the target object, plan a flight trajectory of the mobile platform according to the location of the target object, control the mobile platform to fly according to the flight trajectory, and collect the target object during the flight. Multiple 2D original images.
  23. 根据权利要求21所述的设备,其特征在于,所述处理器在根据所述多个2D原始图像获取所述目标物体的3D场景的第一类点云时具体用于:通过图像处理算法对所述多个2D原始图像进行处理,得到所述目标物体的3D场景的第一类点云;所述第一类点云包括具有三维信息的多个特征点。The device according to claim 21, wherein the processor is specifically configured to: through an image processing algorithm, when acquiring a first type of point cloud of a 3D scene of the target object according to the plurality of 2D original images The plurality of 2D original images are processed to obtain a first type of point cloud of the 3D scene of the target object; the first type of point cloud includes a plurality of feature points having three-dimensional information.
  24. 根据权利要求21所述的设备,其特征在于,所述处理器在利用形变函数对所述第一类点云进行折叠处理,得到第二类点云时具体用于:The device according to claim 21, wherein the processor performs a folding process on the first type of point cloud by using a deformation function to obtain a second type of point cloud, specifically for:
    在形变函数对应的曲线上选取N个形变点,N为大于等于1的正整数;N deformation points are selected on the curve corresponding to the deformation function, and N is a positive integer greater than or equal to 1;
    针对第一类点云中的每个特征点,确定该特征点对应的至少一个形变点;利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点;Determining at least one deformation point corresponding to the feature point for each feature point in the first type of point cloud; folding the feature point by using the determined slope of each deformation point to obtain the folded feature point;
    将第一类点云中的每个特征点对应的折叠后特征点,确定为第二类点云。The folded feature points corresponding to each feature point in the first type of point cloud are determined as the second type point cloud.
  25. 根据权利要求24所述的设备,其特征在于,The device according to claim 24, wherein
    所述处理器在形变函数对应的曲线上选取N个形变点时具体用于:在形变函数对应曲线的横坐标方向,每隔第一距离选取一个形变点;或者,在形变函数对应曲线的纵坐标方向,每隔第二距离选取一个形变点。When the processor selects N deformation points on the curve corresponding to the deformation function, it is specifically used to: select a deformation point every first distance in the abscissa direction of the curve corresponding to the deformation function; or, in the longitudinal direction of the curve corresponding to the deformation function In the coordinate direction, select a deformation point every second distance.
  26. 根据权利要求24所述的设备,其特征在于,The device according to claim 24, wherein
    所述处理器在确定该特征点对应的至少一个形变点时具体用于:基于N个形变点中的每个形变点的横坐标值,选取横坐标值小于该特征点的横坐标值的形变点,作为该特征点对应的形变点。The determining, when determining the at least one deformation point corresponding to the feature point, is specifically: selecting, based on an abscissa value of each of the N deformation points, a deformation whose abscissa value is smaller than an abscissa value of the feature point Point as the deformation point corresponding to the feature point.
  27. 根据权利要求24所述的设备,其特征在于,所述处理器在利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点时具体用于:若该特征点对应M个形变点,则按照第一个形变点至第M个形变点的顺序,利用所述M个形变点分别对应的斜率,对该特征点进行M次折叠处理,得到折叠后特征点;M为大于等于1的正整数,M小于等于N。The device according to claim 24, wherein the processor performs folding processing on the feature point by using the determined slope of each deformation point to obtain a folded feature point, which is specifically used if the feature point corresponds to M deformation points, according to the order of the first deformation point to the Mth deformation point, using the slope corresponding to the M deformation points, the feature points are subjected to M folding processing to obtain the folded feature points; For a positive integer greater than or equal to 1, M is less than or equal to N.
  28. 根据权利要求24所述的设备,其特征在于,所述处理器在利用确定的每个形变点的斜率对该特征点进行折叠处理,得到折叠后特征点时具体用于:若该特征点对应M个形变点,则利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点;其中,所述i的取值依次为1,2,…M,所述M为大于等于1的正整数,M小于等于N。The device according to claim 24, wherein the processor performs folding processing on the feature point by using the determined slope of each deformation point to obtain a folded feature point, which is specifically used if the feature point corresponds to For the M deformation points, the i-th folding process is performed on the feature points by using the slope corresponding to the i-th deformation point, and the i-th post-folding feature points are obtained; wherein the values of the i are sequentially 1, 2 , M, the M is a positive integer greater than or equal to 1, and M is less than or equal to N.
  29. 根据权利要求28所述的设备,其特征在于,所述处理器在利用第i个形变点对应的斜率,对该特征点进行第i次折叠处理,得到第i次的折叠后特征点时具体用于:利用第i个形变点对应的斜率获取坐标系的旋转参数,利 用第i个形变点的横坐标值获取坐标系的位移参数,利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点。The device according to claim 28, wherein the processor performs the ith folding process on the feature point by using the slope corresponding to the i-th deformation point to obtain the i-th folded feature point. And a method for acquiring a rotation parameter of a coordinate system by using a slope corresponding to the i-th deformation point, acquiring a displacement parameter of the coordinate system by using an abscissa value of the i-th deformation point, and using the rotation parameter and the displacement parameter to the feature point The i-th folding process is performed to obtain the i-th post-folding feature point.
  30. 根据权利要求29所述的设备,其特征在于,The device according to claim 29, characterized in that
    所述处理器在利用第i个形变点对应的斜率获取坐标系的旋转参数时具体用于:利用第i个形变点对应的斜率获取第i个形变点与横坐标的第一夹角;利用所述第一夹角与第二夹角获取所述第i个形变点对应的目标角度;其中,所述第二夹角是第i-1个形变点与横坐标之间的夹角;利用所述第i个形变点对应的目标角度获取坐标系的旋转参数。When the processor obtains the rotation parameter of the coordinate system by using the slope corresponding to the i-th deformation point, the processor is specifically configured to: obtain the first angle of the i-th deformation point and the abscissa by using the slope corresponding to the i-th deformation point; The first angle and the second angle acquire a target angle corresponding to the i-th deformation point; wherein the second angle is an angle between the i-1th deformation point and the abscissa; The target angle corresponding to the i-th deformation point acquires a rotation parameter of the coordinate system.
  31. 根据权利要求29所述的设备,其特征在于,所述处理器在利用第i个形变点的横坐标值获取坐标系的位移参数时具体用于:利用第i个形变点的横坐标值构造位移矩阵;将所述位移矩阵确定为坐标系的位移参数。The device according to claim 29, wherein the processor is configured to use the abscissa value of the i-th deformation point when acquiring the displacement parameter of the coordinate system by using the abscissa value of the i-th deformation point. a displacement matrix; the displacement matrix is determined as a displacement parameter of the coordinate system.
  32. 根据权利要求29所述的设备,其特征在于,The device according to claim 29, characterized in that
    所述处理器在利用所述旋转参数和所述位移参数对该特征点进行第i次折叠处理,得到第i次的折叠后特征点时具体用于:利用所述旋转参数和所述位移参数,对该特征点对应的第i-1次的折叠后特征点进行第i次折叠处理,得到该特征点对应的第i次的折叠后特征点。The processor performs the ith folding process on the feature point by using the rotation parameter and the displacement parameter to obtain the i-th post-folding feature point, and is specifically used to: use the rotation parameter and the displacement parameter And performing the i-th folding process on the i-th post-folding feature point corresponding to the feature point, and obtaining the i-th post-folding feature point corresponding to the feature point.
  33. 根据权利要求21所述的设备,其特征在于,The device according to claim 21, wherein
    所述处理器在将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像时具体用于:获取移动平台对应的位置信息和姿态信息;根据所述移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像。When the processor projects the second type of point cloud to the image plane to obtain a 2D virtual image with a folding effect, the processor is specifically configured to: acquire location information and posture information corresponding to the mobile platform; and according to the location corresponding to the mobile platform Information and attitude information, projecting each feature point in the second type of point cloud to the image plane of the mobile platform to obtain a 2D virtual image with a folding effect.
  34. 根据权利要求33所述的设备,其特征在于,The device according to claim 33, wherein
    所述处理器在获取移动平台对应的位置信息和姿态信息时具体用于:根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态;或者,根据所述多个2D原始图像获取移动平台对应的拍摄位置和拍摄姿态,并根据所述拍摄位置和所述拍摄姿态获取虚拟位置和虚拟姿态。When acquiring the location information and the posture information corresponding to the mobile platform, the processor is configured to: acquire a shooting position and a shooting posture corresponding to the mobile platform according to the plurality of 2D original images; or acquire according to the multiple 2D original images. The shooting position and the shooting attitude corresponding to the mobile platform are acquired, and the virtual position and the virtual posture are acquired according to the shooting position and the shooting attitude.
  35. 根据权利要求33所述的设备,其特征在于,所述处理器在根据所述 移动平台对应的位置信息和姿态信息,将所述第二类点云中的每个特征点投影到移动平台的像平面,得到具有折叠效果的2D虚拟图像时具体用于:The device according to claim 33, wherein the processor projects each feature point in the second type of point cloud to the mobile platform according to location information and posture information corresponding to the mobile platform. The image plane is used to obtain a 2D virtual image with a folding effect.
    利用移动平台对应的内参、所述位置信息、所述姿态信息,将第二类点云中的每个特征点投影到所述像平面,得到每个特征点对应的2D像素点;Projecting each feature point in the second type of point cloud to the image plane by using the internal parameter corresponding to the mobile platform, the position information, and the posture information, to obtain a 2D pixel point corresponding to each feature point;
    将第二类点云中的每个特征点对应的2D像素点组成所述2D虚拟图像。The 2D pixel points corresponding to each feature point in the second type of point cloud are composed of the 2D virtual image.
  36. 根据权利要求21所述的设备,其特征在于,所述处理器在将所述第二类点云投影到像平面,得到具有折叠效果的2D虚拟图像之后还用于:The device according to claim 21, wherein the processor is further configured to: after projecting the second type of point cloud to the image plane to obtain a 2D virtual image having a folding effect:
    从2D原始图像中确定第二类点云中的每个特征点对应的2D特征点;Determining a 2D feature point corresponding to each feature point in the second type of point cloud from the 2D original image;
    利用所述2D特征点将所述2D原始图像划分出多个三角区域;其中,针对每个三角区域,包括3个2D特征点、多个2D原始点;The 2D original image is divided into a plurality of triangular regions by using the 2D feature points; wherein, for each triangular region, three 2D feature points and a plurality of 2D original points are included;
    利用所述3个2D特征点获取所述三角区域对应的投影参数;Obtaining, by using the three 2D feature points, a projection parameter corresponding to the triangular region;
    利用所述投影参数对所述三角区域内的所有2D原始点进行投影处理。Projecting processing of all 2D original points in the triangular region using the projection parameters.
  37. 根据权利要求36所述的设备,其特征在于,所述处理器在利用所述2D特征点将所述2D原始图像划分出多个三角区域时具体用于:采用三角剖分算法将2D原始图像中的2D特征点连接成多个三角区域。The device according to claim 36, wherein the processor is configured to: when the 2D original image is divided into a plurality of triangular regions by using the 2D feature points, use a triangulation algorithm to convert the 2D original image The 2D feature points in the connection are connected into a plurality of triangular regions.
  38. 根据权利要求36所述的设备,其特征在于,所述处理器在利用所述3个2D特征点获取所述三角区域对应的投影参数时具体用于:利用所述3个2D特征点在2D原始图像中的二维信息、所述3个2D特征点在2D虚拟图像中的二维信息,获取所述三角区域对应的投影参数。The device according to claim 36, wherein the processor is configured to use the 3 2D feature points in 2D when acquiring the projection parameters corresponding to the triangular regions by using the 3 2D feature points. The two-dimensional information in the original image, the two-dimensional information of the three 2D feature points in the 2D virtual image, and the projection parameters corresponding to the triangular region are acquired.
  39. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机指令,在所述计算机指令被执行时,实现权利要求1-20任一项所述的图像处理方法。A computer readable storage medium, wherein the computer readable storage medium stores computer instructions that, when executed, implement the image processing method of any one of claims 1-20.
PCT/CN2018/073632 2018-01-22 2018-01-22 Image processing method and apparatus and computer readable storage medium WO2019140688A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880012242.9A CN110313020A (en) 2018-01-22 2018-01-22 Image processing method, equipment and computer readable storage medium
PCT/CN2018/073632 WO2019140688A1 (en) 2018-01-22 2018-01-22 Image processing method and apparatus and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/073632 WO2019140688A1 (en) 2018-01-22 2018-01-22 Image processing method and apparatus and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2019140688A1 true WO2019140688A1 (en) 2019-07-25

Family

ID=67301242

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/073632 WO2019140688A1 (en) 2018-01-22 2018-01-22 Image processing method and apparatus and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110313020A (en)
WO (1) WO2019140688A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220084415A1 (en) * 2019-05-27 2022-03-17 SZ DJI Technology Co., Ltd. Flight planning method and related apparatus

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101935820B1 (en) 2017-08-28 2019-01-07 세종화학 (주) Method for manufacturing high purity ammonium dihydrogenphosphate using ammonium phosphate waste solutions
CN113362236B (en) * 2020-03-05 2024-03-05 北京京东乾石科技有限公司 Point cloud enhancement method, point cloud enhancement device, storage medium and electronic equipment
CN113628322B (en) * 2021-07-26 2023-12-05 阿里巴巴(中国)有限公司 Image processing, AR display and live broadcast method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928492A (en) * 2006-09-15 2007-03-14 东南大学 Gray code based phase development method in three-dimensional scanning system
CN101425183A (en) * 2008-11-13 2009-05-06 上海交通大学 Deformable body three-dimensional tracking method based on second order cone programing
US9087381B2 (en) * 2013-11-13 2015-07-21 Thomas Tsao Method and apparatus for building surface representations of 3D objects from stereo images
CN104915986A (en) * 2015-06-26 2015-09-16 北京航空航天大学 Physical three-dimensional model automatic modeling method
CN106973569A (en) * 2014-05-13 2017-07-21 Pcp虚拟现实股份有限公司 Generation and the playback multimedia mthods, systems and devices of virtual reality
CN107576275A (en) * 2017-08-11 2018-01-12 哈尔滨工业大学 A kind of method for carrying out straining field measurement to inflatable structure using photogrammetric technology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5790345B2 (en) * 2011-09-07 2015-10-07 株式会社リコー Image processing apparatus, image processing method, program, and image processing system
US9466143B1 (en) * 2013-05-03 2016-10-11 Exelis, Inc. Geoaccurate three-dimensional reconstruction via image-based geometry
GB2559157A (en) * 2017-01-27 2018-08-01 Ucl Business Plc Apparatus, method and system for alignment of 3D datasets

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928492A (en) * 2006-09-15 2007-03-14 东南大学 Gray code based phase development method in three-dimensional scanning system
CN101425183A (en) * 2008-11-13 2009-05-06 上海交通大学 Deformable body three-dimensional tracking method based on second order cone programing
US9087381B2 (en) * 2013-11-13 2015-07-21 Thomas Tsao Method and apparatus for building surface representations of 3D objects from stereo images
CN106973569A (en) * 2014-05-13 2017-07-21 Pcp虚拟现实股份有限公司 Generation and the playback multimedia mthods, systems and devices of virtual reality
CN104915986A (en) * 2015-06-26 2015-09-16 北京航空航天大学 Physical three-dimensional model automatic modeling method
CN107576275A (en) * 2017-08-11 2018-01-12 哈尔滨工业大学 A kind of method for carrying out straining field measurement to inflatable structure using photogrammetric technology

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220084415A1 (en) * 2019-05-27 2022-03-17 SZ DJI Technology Co., Ltd. Flight planning method and related apparatus

Also Published As

Publication number Publication date
CN110313020A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
US10958891B2 (en) Visual annotation using tagging sessions
US11967162B2 (en) Method and apparatus for 3-D auto tagging
US20240290359A1 (en) Cinematic space-time view synthesis for enhanced viewing experiences in computing environments
US11288857B2 (en) Neural rerendering from 3D models
JP6775776B2 (en) Free viewpoint movement display device
WO2018214078A1 (en) Photographing control method and device
JP6643357B2 (en) Full spherical capture method
US10127722B2 (en) Mobile capture visualization incorporating three-dimensional and two-dimensional imagery
WO2019140688A1 (en) Image processing method and apparatus and computer readable storage medium
WO2019118877A1 (en) Spherical video editing
US11776142B2 (en) Structuring visual data
US11788845B2 (en) Systems and methods for robust self-relocalization in a visual map
CN106716497B (en) Using free form deformation in surface reconstruction
WO2023280038A1 (en) Method for constructing three-dimensional real-scene model, and related apparatus
CN105765631A (en) Large-scale surface reconstruction that is robust against tracking and mapping errors
WO2019084719A1 (en) Image processing method and unmanned aerial vehicle
WO2022022449A1 (en) Method and apparatus for spatial positioning
WO2019144286A1 (en) Obstacle detection method, mobile platform, and computer readable storage medium
WO2022040868A1 (en) Panoramic photography method, electronic device, and storage medium
WO2023239955A1 (en) Localization processing service and observed scene reconstruction service
CN111222586A (en) Inclined image matching method and device based on three-dimensional inclined model visual angle
JP2010049346A (en) Image display apparatus
WO2022246608A1 (en) Method for generating panoramic video, apparatus, and mobile platform
US20210092306A1 (en) Movable body, image generation method, program, and recording medium
WO2020119572A1 (en) Shape inferring device, shape inferring method, program, and recording medium

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

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

Country of ref document: EP

Kind code of ref document: A1