WO2022246608A1 - Method for generating panoramic video, apparatus, and mobile platform - Google Patents

Method for generating panoramic video, apparatus, and mobile platform Download PDF

Info

Publication number
WO2022246608A1
WO2022246608A1 PCT/CN2021/095551 CN2021095551W WO2022246608A1 WO 2022246608 A1 WO2022246608 A1 WO 2022246608A1 CN 2021095551 W CN2021095551 W CN 2021095551W WO 2022246608 A1 WO2022246608 A1 WO 2022246608A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
displacement
frame
images
panoramic video
Prior art date
Application number
PCT/CN2021/095551
Other languages
French (fr)
Chinese (zh)
Inventor
李广
王程昊
徐斌
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2021/095551 priority Critical patent/WO2022246608A1/en
Publication of WO2022246608A1 publication Critical patent/WO2022246608A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules

Definitions

  • the present application relates to the technical field of data processing, and more specifically relates to a method, device and mobile platform for generating panoramic video.
  • Surrounding panoramic video is a kind of panoramic video, which can freely display 360° around the subject itself, and the user can arbitrarily determine the viewing angle.
  • the traditional shooting method is to use a shooting device to take several pictures around the subject after the subject is fixed, and to fuse the multiple pictures into a full-field-of-view image or a panoramic video with similar functions through post-processing.
  • the first aspect of the embodiment of the present invention provides a method for generating panoramic video, including:
  • Preprocessing the first image to obtain a second image wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
  • a panoramic video is generated based on multiple frames of the second image.
  • the second aspect of the embodiment of the present invention provides a method for generating panoramic video, including:
  • the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
  • a panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  • the third aspect of the embodiment of the present invention provides a device for generating a panoramic video, the device comprising:
  • a processor configured to execute the instructions stored in the memory, so that the processor performs the following steps:
  • Preprocessing the first image to obtain a second image wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
  • a panoramic video is generated based on multiple frames of the second image.
  • the fourth aspect of the embodiment of the present invention provides a device for generating a panoramic video, the device comprising:
  • a processor configured to execute the instructions stored in the memory, so that the processor performs the following steps:
  • the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
  • a panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  • the fifth aspect of the embodiment of the present invention provides a mobile platform, including:
  • a photographing device mounted on the movable platform body, for photographing the target object
  • the device for generating panoramic video is communicatively connected to the shooting device for generating a panoramic video based on the images captured by the shooting device.
  • a sixth aspect of the embodiment of the present invention provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for generating a panoramic video is implemented.
  • the photographing device of the movable platform captures images, the shooting trajectory is more flexible, and high-quality panoramic video with smooth transition from the beginning to the end can be generated.
  • Fig. 1 shows a schematic flowchart of a method for generating a panoramic video according to an embodiment of the present invention
  • FIG. 2 shows a schematic flow chart of preprocessing a first image according to an embodiment of the present invention
  • FIG. 3 shows a schematic flowchart of a method for generating a panoramic video according to another embodiment of the present invention
  • Fig. 4 shows a schematic block diagram of an apparatus for generating a panoramic video according to an embodiment of the present invention.
  • the traditional shooting method In order to make the smooth transition between the last frame of the video and the first frame of the video, there are often strict requirements on the motion track, so the traditional shooting method often needs to arrange a fixed frame around the subject. It is extremely inconvenient to shoot, especially for objects such as large outdoor buildings that are not suitable for fixed orbits. In addition, there is another problem in shooting along a fixed track, that is, the shooting range cannot be customized by the user, which seriously affects the user experience of subsequent products, and the interaction is poor.
  • the method for generating a panoramic video in the embodiment of the present invention is based on the shooting device of the movable platform for shooting, which is convenient for users to customize the shooting trajectory, and the movable platform can give a more ideal shooting trajectory to a greater extent, which is convenient for carrying out Subsequent image processing.
  • the method for generating a panoramic video in the embodiment of the present invention first preprocesses the image sequence before generating the panoramic video based on the image, so that the transition between the first and last frame images is smooth, so that the generated panoramic video can complete the end-to-end connection, so that it can be obtained High quality panoramic video.
  • FIG. 1 shows a flowchart of a method 100 for generating a panoramic video according to an embodiment of the present invention.
  • a method 100 for generating a panoramic video in an embodiment of the present invention includes the following steps:
  • step S110 multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform are obtained, and the first images are obtained when the movable platform moves around the target object along a preset track taken during the
  • step S120 preprocessing is performed on the first image to obtain a second image, wherein the preprocessing is used to make the difference between the first image in the last frame and the first image in the first frame among the multiple frames of the first image smooth transition between
  • step S130 a panoramic video is generated based on multiple frames of the second image.
  • the execution body of the method 100 for generating panoramic video in the embodiment of the present invention may be the processor of the mobile platform, or other electronic devices communicatively connected to the mobile platform.
  • the processor may perform the above processing on the image captured by the photographing device of the mobile platform in real time to obtain the panoramic video.
  • the execution subject of the method 100 for generating panoramic video is other devices, the first image captured by the shooting device may be transmitted to other devices through the communication system of the mobile platform to perform the above processing to obtain the panoramic video.
  • the movable platform may include an aircraft (such as a drone), a robot, an unmanned vehicle, an unmanned ship, and the like.
  • a UAV as an example, it may include one or more power units for providing power for the UAV to fly in the air.
  • One or more power units can make the drone move in one or more degrees of freedom, so that the drone can fly around the target object, and during the flight, ensure that its shooting device is always facing the shooting target.
  • the shooting track is more flexible when shooting with mobile platform shooting devices such as drones. Since there is a certain range of motion in the process of shooting with a movable platform, the embodiment of the present invention preprocesses the images to make a smooth transition between each frame of images, thereby obtaining a high-quality panoramic video.
  • step S110 first determine a preset track around the target object, and control the movable platform to run around the target object along the preset track, so that the movable platform starts from a certain point to run around the target object for a circle, and returns to the starting point.
  • the running process of the movable platform should be as smooth and stable as possible. There are no restrictions on the height, shape and radius of the preset trajectory. It is only necessary to ensure that the starting and ending positions of the running trajectory are basically the same, so that the beginning and ending of the moving trajectory are smooth and connectable.
  • the preset trajectory may be a circle or an ellipse.
  • a preset trajectory can be generated according to user instructions, and the movable platform can be controlled to run around the target object along the preset trajectory. Since the method 100 for generating a panoramic video in the embodiment of the present invention uses the camera of the movable platform to shoot, it is convenient for the user to customize the shooting trajectory, so that the user can adjust the trajectory height, shape, radius, and control the operation of the movable platform according to actual needs. speed etc.
  • the shooting device is controlled to shoot the target object at a preset frame rate, so as to obtain first images taken at various angles around the target object.
  • the preset trajectory may also be automatically determined based on one or more of the target object's type, size, shape or movement characteristics.
  • the type, size, shape and movement characteristics of the target object can be obtained through image analysis or can be input by the user. For example, during the operation of the movable platform, it is possible to detect in real time the target object that meets the preset shooting requirements according to the shooting picture of the shooting device, determine the type, size, shape and movement characteristics of the target object, and generate a preset trajectory according to the above characteristics .
  • the shooting device when the movable platform reaches the starting point of the preset track, the shooting device can be controlled to start shooting, and when the movable platform reaches the end point of the preset track, the shooting device can be controlled to stop shooting; of course, the shooting device can also be controlled to continue shooting, and extracting images taken during a period of one week when the movable platform runs along a preset trajectory, as the first image to be processed.
  • step S120 the first image is preprocessed to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image of the last frame and the first image of the first frame among the multiple frames of first images , so as to obtain a shooting effect similar to the seamless connection between the beginning and the end of the preset trajectory.
  • the preprocessing at least reduces the difference between the first image of the last frame and the first image of the first frame, so that when the user adjusts the viewing angle, no obvious seam will be generated in the transition area between the first and last frames.
  • step S120 enables a smooth transition between the first images of each frame, so that the differences between the first images of each frame are evenly distributed, thereby obtaining an approximation that the shooting device always maintains a constant speed and a smooth transition during the shooting process. , The shooting effect of stable shooting.
  • preprocessing the first image includes:
  • step S210 the actual displacement between the poses of the photographing device corresponding to the first image of the adjacent frame is obtained
  • step S220 the actual displacement is adjusted to obtain the target displacement, wherein the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the distance between the first image in the last frame and the first image in the first frame The first actual displacement of ;
  • step S230 the first image is mapped according to the target displacement to obtain the second image.
  • step S210 image matching and motion estimation methods can be used to obtain the photographing corresponding to the first image of the adjacent frame.
  • the actual displacement between poses of the device Specifically, the feature points in the first image are first extracted, and then the feature points in the first image of the adjacent frames are matched, so as to obtain the matching feature point pairs of the first images of the adjacent frames. Afterwards, the actual displacement between the first images of adjacent frames is obtained according to the pair of matching feature points.
  • a SIFT (Scale Invariant Feature Transform) algorithm may be used to detect SIFT feature points in the first image. Local features in the image can be located.
  • the SIFT feature points detected by the algorithm are scale and rotation invariant, not affected by the size and direction of the image, and less affected by light, noise, etc.
  • each SIFT feature point in the feature space can be matched with several neighborhood points in its neighborhood in the adjacent frame, and the neighborhood point with the highest matching degree can be found through the matching algorithm.
  • the SIFT The feature point and its neighbor point with the highest matching degree are called matching feature point pair.
  • the k-d algorithm may be used to find the neighborhood point with the highest matching degree.
  • obtaining the actual displacement between the first images of adjacent frames according to the pair of matching feature points includes: performing nonlinear optimization according to the pair of matching feature points to obtain a second homography matrix between the first images of adjacent frames ; According to the second homography matrix and the internal reference matrix of the shooting device, the actual displacement between the first images of adjacent frames is obtained.
  • the homography matrix describes the mapping relationship between planes, that is, the mapping relationship between the first images of adjacent frames.
  • the homography matrix describing the mapping relationship between the first images of adjacent frames here is called the second homography matrix
  • the first image and The homography matrix of the mapping relationship between the second images is called the second homography matrix.
  • the mapping relationship between the poses of the photographing devices corresponding to the adjacent frame images can be obtained, that is, the relationship between the poses of the photographing devices corresponding to the first images of adjacent frames actual displacement.
  • the second homography matrix may be obtained by using a non-linear optimization method, or other optimization algorithms may be used to obtain the second homography matrix according to the coordinates of multiple sets of matching feature point pairs.
  • the actual displacement between the first images of adjacent frames can be calculated according to the following formulas (1) and (2):
  • H represents the second homography matrix between the first image of the adjacent frame, and the second homography matrix H constrains the 2D homogeneous coordinates of the same 3D space point in the first image plane of the adjacent frame;
  • R represents the rotation matrix between the first images of adjacent frames
  • T represents the translation amount between the first images of adjacent frames
  • K 1 represents the internal reference matrix of the shooting device, which is fixed and related to the focal length and the center of the aperture;
  • n T represents the unit normal vector of the object plane relative to the first frame
  • P t-1 represents the coordinates of a certain feature point in the first image of the previous frame
  • P t represents the coordinates of the matching point in the first image of the next frame.
  • the second homography matrix H is obtained based on the coordinates P t-1 and P t of the matching feature point pair, using a nonlinear optimization method; then, according to the formula (1), based on the obtained
  • the second homography matrix H, the known internal reference matrix K 1 , and the unit normal vector n T are used to obtain the rotation matrix R and translation T between the first images of adjacent frames.
  • the translation model and the rotation model can be considered to calculate the actual rotation angle and the actual translation amount, or only the translation model or only the rotation model can be considered, that is, one of the actual rotation angle and the actual translation amount can be calculated.
  • the focal length of the photographing device is short, only the actual rotation angle R can be calculated, and the actual translation amount T can be ignored; if the focal length is infinite, only the actual translation amount T can be calculated, and the actual rotation angle R can be ignored.
  • the actual rotation angle can be adjusted to obtain the target rotation angle; if the translation model is considered, the actual translation amount can be adjusted Adjust to obtain the target translation amount.
  • any suitable feature point detection method and image registration method can be applied to the method 100 for generating panoramic video according to the embodiment of the present invention middle.
  • the actual displacement can be obtained according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of capturing the first image.
  • the pose of the photographing device can be obtained from the inertial measurement data measured by the inertial measurement device mounted on the movable platform, and then the position of the photographing device between the first images of adjacent frames can be determined according to the poses corresponding to the first images of each frame.
  • the actual displacement of the pose includes but is not limited to an accelerometer and a gyroscope.
  • the gyroscope can measure the rotational angular velocity of each axis of the shooting device, and the accelerometer can measure the linear acceleration of the shooting device moving along each axis.
  • the angle measured by the gyroscope The speed signal is integrated with time to calculate the attitude information such as the instantaneous motion direction and inclination angle.
  • the time integral operation can be used to calculate the speed information of the shooting device, and then the shooting device can be obtained during the image acquisition process. pose information at each moment.
  • the actual displacements in different dimensions may be calculated respectively.
  • the actual translation amount the actual translation amounts in the x, y, and z directions are calculated respectively; when the actual rotation angle is calculated, the rotation angles of the three rotation axes p, y, and r are respectively calculated.
  • the actual displacements in different dimensions are also adjusted respectively, so as to obtain the target displacements in different dimensions.
  • step S220 the actual displacement between the first images in adjacent frames is adjusted, so as to obtain the target displacement between the first images in adjacent frames.
  • the actual displacement represents the actual displacement of the photographing device during the process of capturing the first image
  • the target displacement represents the expected displacement of the photographing device, that is, assuming that the photographing device moves according to the target displacement, a smooth transition image can be collected;
  • the purpose of the target displacement is to map the first image according to the target displacement, so as to obtain a smooth transition of the second image.
  • the preset trajectory is unidirectional, the sudden change of the image is mainly between the first image of the last frame and the first image of the first frame, so the above adjustment reduces the displacement between the first image of the last frame and the first image of the first frame , so that the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the first actual displacement between the first image in the last frame and the first image in the first frame.
  • adjusting the actual displacement to obtain the target displacement includes: obtaining the first image of the last frame to the first frame of the first frame The deviation between the target displacement between the images and the actual displacement between the first image in the last frame and the first image in the first frame, and distribute the deviation among the first images in the remaining frames.
  • the above adjustment reduces the displacement between the first image of the last frame and the first image of the first frame
  • at least one of the first image of the last frame and the first image of the first frame needs to share the deviation, that is to say , the above deviation must be distributed at least between the first image in the last frame and the first image in the previous frame, or between the first image in the first frame and the first image in the next frame.
  • both the first image in the last frame and the first image in the first frame need to share part of the deviation, so as to improve the smoothness of image transition.
  • the method for distributing the deviation between the first and last frames to the first images of the remaining frames includes: linearly distributing the above deviation, so that on the basis of the actual displacement between the first images of each frame, increase Or reduce partial bias. Specifically, after calculating the deviation between the actual displacement and the target displacement between the first image of the last frame and the first image of the first frame, starting from the first image of a certain frame in the middle, moving towards the first image of the first frame and the first image of the last frame respectively. Motion compensation is performed on the first image of the frame, and a linear distribution method is adopted during the period, so that the actual displacement between the first images of every two adjacent frames increases or decreases part of the deviation, so as to complete the smooth transition between the first and last frames.
  • the displacement distribution curve is smoothed, and the smoothed displacement distribution curve is differentiated to obtain the target displacement between the first images of each frame. That is to say, the target displacement D2 between the first images of each frame is accumulated to obtain the displacement between the first image of each frame relative to the first image of the first frame, thereby obtaining the displacement distribution curve, and then the displacement distribution curve is calculated Smoothing and difference are performed to obtain the final target displacement D target .
  • the target motion trajectory of the shooting device will be smoother and more stable.
  • the expected panorama video effect in the embodiment of the present invention requires a sufficiently close and stable transition between the last frame image and the first frame image
  • after acquiring multiple frames of the first image further includes: according to preset conditions
  • the above-mentioned first image of the last frame is selected from at least two first images of the last frame. That is, the first image of the last frame used to generate the panoramic video above is not necessarily the first image of the last frame obtained during the image acquisition process, but the one that is the closest to the first image of the first frame among the last several frames of images collected. A close frame of image.
  • the first image of the N-1th frame satisfies the preset condition and is close enough to the first image of the first frame, then the first image of the N-1th frame is used as the first image of the last frame , and discard the first image of the Nth frame, thereby reducing the difference between the first image of the last frame and the first image of the first frame, and further ensuring a smooth transition between the images of the first and last frames.
  • the at least two first images at the end can be matched with the first image of the first frame respectively, and the The first frame of the first image with the largest number of matching feature point pairs between the first image of the first frame is used as the first image of the last frame.
  • it can be matched according to the SIFT feature points extracted in step S210, and the matching feature point pairs between at least two frames of the first image at the end and the first frame of the first image are respectively obtained, the more the number of matching feature point pairs is, the description The higher the similarity between images.
  • the actual displacement between at least two frames of the first image at the end and the first frame of the first image can be obtained respectively, and the frame of the first image with the smallest actual displacement is used as the first image of the last frame.
  • the actual displacement can be obtained according to the method of image matching or according to the inertial measurement data, or can be accumulated according to the actual displacement between the first images of adjacent frames obtained in step S210, so as to obtain at least two frames of the first image at the end The actual displacement from the first image of the first frame. The smaller the actual displacement, the higher the similarity between images.
  • the method for selecting the first image of the first frame is similar to the method for selecting the first image of the last frame above, and will not be repeated here.
  • the first image is mapped according to the target displacement to obtain a second image.
  • the first homography matrix between the first image and the second image can be obtained according to the target displacement and the internal reference matrix of the shooting device, and the first homography matrix describes the distance between the first image and the second image. Mapping relations. Afterwards, the first image is mapped according to the first homography matrix to obtain the second image.
  • the first homography matrix can be obtained according to the target displacement and the internal reference matrix by referring to formula (1), namely After obtaining the first homography matrix, the first image may be mapped with reference to formula (2) to obtain the second image.
  • the preprocessing of the first image also includes: The brightness of the first image of the frame is smoothed to reduce the brightness difference between the first image of the last frame and the first image of the first frame.
  • the illumination inhomogeneity of the image can be corrected by the illumination model of the shooting device, and then the histogram mapping table between two adjacent images can be established through the relationship between the overlapping areas of the two adjacent images, and the The two images are mapped and transformed as a whole, and finally the overall brightness and color consistency are achieved.
  • a panoramic video is generated based on multiple frames of second images.
  • multiple frames of second images may be arranged according to the original order, and used as video frames of the panoramic video, so as to obtain a panoramic video with a full field of view around the target object.
  • a step of displaying the panoramic video is also included.
  • the generation and display of the panoramic video can be implemented in different devices.
  • the processor of the mobile platform can send the generated panoramic video to the client, and display it on the display interface of the client.
  • the panoramic video and a progress bar associated with the panoramic video can be displayed synchronously, and the progress bar is used to describe the preset track and describe the corresponding position of the panoramic video displayed at the current moment in the preset track.
  • the progress bar can be implemented as a long strip, ring, spherical, etc., including the operation control.
  • the position of the operation control represents the corresponding position of the panoramic video displayed at the current moment in the preset track, that is, the shooting corresponding to the picture displayed at the current moment.
  • Position by adjusting the operation control, you can adjust the viewing angle of the panoramic video.
  • the panoramic video can be played automatically, that is, the angle of view can be automatically switched; it can also be switched as the user adjusts the operation controls.
  • the preset track described by the progress bar is connected end to end, that is, by adjusting the operation control, the viewing angle corresponding to the end of the preset track can be directly transitioned to the viewing angle corresponding to the head end of the preset track, and because the embodiment of the present invention is applicable to The images that generate the panorama video are preprocessed as described above, and there will be no obvious abrupt changes in the transition process.
  • the above has exemplarily described the exemplary steps involved in the method for generating a panoramic video according to the embodiment of the present invention.
  • the method 100 for generating a panoramic video in the embodiment of the present invention uses a mobile platform camera to capture images, and the shooting trajectory is more flexible, and by smoothing the first and last frame images, a high-quality panoramic video with a smooth transition from the beginning to the end can be generated. .
  • a method 300 for generating a panoramic video includes the following steps:
  • step S310 multiple frames of images obtained by shooting the target object at different angles by the shooting device of the movable platform are obtained, and the images are taken while the movable platform is running around the target object along a preset track , wherein, the displacement at both ends of the preset trajectory is greater than or equal to a first preset threshold;
  • step S320 a panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  • the displacements at both ends of the preset trajectory are displacements of the photographing device in a spatial coordinate system
  • the spatial coordinate system may be GPS or a similar absolute physical coordinate system, or the coordinate system of the photographing device.
  • the displacement at both ends of the preset trajectory is the actual displacement of the photographing device between the pose corresponding to the first frame of image and the pose corresponding to the last frame of image.
  • the image displacement between the first frame and the last frame is the displacement between images.
  • the displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold, there is a sudden change between the images taken at the first and last ends; and when generating a panoramic video based on multiple frames of images, by processing the images, the first frame
  • the image displacement between the last frame and the last frame is less than or equal to the second preset threshold, so that the panoramic video can smoothly transition between the first and last frame images.
  • the target object may be determined based on a user's selection instruction, or may be identified based on an image.
  • the target object can be recognized in real time during the flight of the movable platform, or a control command to start automatic shooting input by the user through the control device can also be obtained, and in response to the control The instruction starts to identify the target objects meeting the preset shooting conditions within the shooting range.
  • Target objects meeting preset shooting conditions within the shooting range of the shooting device of the movable platform may be identified by any suitable method.
  • Target objects include but are not limited to people, animals, plants, buildings, etc.
  • the target object can be identified according to the shape information or position information of each object in the image.
  • the shape information includes the top view shape, side view shape, etc. of the object, and the top view shape may be, for example, the roof shape of a building.
  • the location information may include the longitude and latitude coordinates of the object, or any other coordinate information that can determine the location of the object.
  • the shape information and position information of each object in the image are recognized, it is matched with the shape information and position information of the pre-marked target object, and the successfully matched object is determined as the target object.
  • the successful matching may mean that both the shape information and the position information are successfully matched, or one item of the shape information and the position information is successfully matched.
  • the mobile platform is controlled to carry the shooting device to surround the target object along a preset trajectory to shoot. It is understandable that even if the preset trajectory is set to overlap the trajectory from the beginning to the end, in the process of controlling the movable platform to run along the preset trajectory, the two ends of the head and the tail cannot be seamlessly connected, so the displacement of the two ends is greater than or equal to The first preset threshold.
  • a preset track running around the target object is generated, so as to control the movable platform to run around the target object along the preset track.
  • the preset trajectory can be determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, and the system can be the control system of the movable platform, or other computing systems capable of communicating with the movable platform equipment.
  • the type of the target object may include the corresponding type of the target object in preset categories such as people, animals, plants, buildings, etc.; the size of the target object may include the height, size, etc.
  • the shape of the target object may be The shape of the outline includes but is not limited to the projected shape on the horizontal plane; the moving characteristics of the target object may include whether the target object is moving or stationary, the moving direction and moving speed of the target object, and the like.
  • the preset trajectory can be planned according to the type, size, shape, and movement characteristics of the target object, so that the proportion of the target object in the shooting frame, the position of the shooting target in the shooting frame, etc. meet the preset requirements.
  • the preset trajectory may be determined in response to a user's setting instruction.
  • the way for the user to input the setting instruction can be implemented as drawing a preset trajectory on the real-time shooting screen through the control device connected to the mobile platform in communication, or it can be realized as inputting the relevant parameters of the preset trajectory through the control device, so that A control device or a movable platform generates a preset trajectory according to relevant parameters.
  • a panoramic video is generated based on the multi-frame images acquired in step S310.
  • multi-frame images are firstly preprocessed, and then a panoramic video is generated based on the preprocessed images.
  • the preprocessing performed on the multi-frame images reduces the difference between the first frame image and the last frame image, so that in the generated panoramic video, the image displacement between the first frame and the last frame is less than or equal to the second preset threshold.
  • a method of preprocessing an image reference may be made to related descriptions in the method 100 for generating a panoramic video.
  • a step of displaying the panoramic video is also included.
  • the panoramic video and the progress bar associated with the panoramic video can be displayed synchronously, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track, Moreover, the preset tracks described by the progress bar are connected end to end.
  • the panoramic video can automatically switch the angle of view; it can also switch the angle of view following the user's adjustment of the progress bar.
  • the method 300 for generating a panoramic video captures an image by a camera on a movable platform, the shooting track is more flexible, and a high-quality panoramic video with a smooth transition from the beginning to the end can be generated.
  • the embodiment of the present invention also provides a device 400 for generating a panoramic video
  • the device 400 for generating a panoramic video includes one or more memories 410 and one or more processors 420, of course, according to needs, generate
  • the panoramic video device 400 may also have other components and structures, such as a communication interface, a display, and the like.
  • the processor 420 is configured to execute the program instructions stored in the memory 410, so that the processor 420 executes the steps of the method for generating a panoramic video above, wherein, in order to avoid repetition, the detailed description of some steps can refer to the above, and will not be repeated here. repeat.
  • the memory 410 is used for storing various data and executable program instructions generated during the process of generating the panoramic video, for example, for storing various application programs or algorithms for realizing various specific functions.
  • One or more computer program products may be included, and computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include random access memory (RAM) and/or cache memory (cache), etc., for example.
  • Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
  • the processor 420 may be a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other forms of processing with data processing capabilities and/or instruction execution capabilities. unit, and can control other components in apparatus 400 to perform desired functions.
  • processor 420 may include one or more embedded processors, processor cores, microprocessors, logic circuits, hardware finite state machines (FSMs), digital signal processors (DSPs), graphics processing units (GPUs) or their combination.
  • FSMs hardware finite state machines
  • DSPs digital signal processors
  • GPUs graphics processing units
  • the processor executes the following steps: acquiring multiple frames of first images obtained by photographing the target object at different angles by the photographing device of the movable platform, the first An image is taken while the movable platform is running around a target object along a preset trajectory; preprocessing is performed on the first image to obtain a second image, wherein the preprocessing is used to make the last image in multiple frames of the first image A smooth transition between the first frame of the first image and the first frame of the first image; generating a panoramic video based on multiple frames of the second image.
  • the preprocessing of the first image includes: obtaining the actual displacement between the poses of the shooting device corresponding to the first image of the adjacent frame; adjusting the actual displacement to obtain the target displacement, wherein the last frame of the first image
  • the first target displacement between an image and the first image of the first frame is smaller than the first actual displacement between the first image of the last frame and the first image of the first frame; the first image is mapped according to the target displacement to obtain the second image.
  • the mapping of the first image according to the target displacement to obtain the second image includes: obtaining the first homography matrix between the first image and the second image according to the target displacement and the internal reference matrix of the shooting device;
  • the first homography matrix maps the first image to obtain the second image.
  • adjusting the actual displacement to obtain the target displacement includes: obtaining the target displacement between the first image in the last frame and the first image in the first frame and the actual displacement between the first image in the last frame and the first image in the first frame. Bias of displacement; distributes the bias between the first images of the remaining frames.
  • distributing the deviation among the remaining first images of each frame includes: linearly distributing the deviation, so that part of the deviation is increased or decreased on the basis of the actual displacement between the first images of each frame.
  • adjusting the actual displacement further includes: obtaining a displacement distribution curve according to the actual displacement after the distribution deviation; smoothing the displacement distribution curve; and performing a difference on the smoothed displacement distribution curve to obtain the first Object displacement between images.
  • obtaining the actual displacement between the poses of the shooting device corresponding to the first images of adjacent frames includes: extracting feature points in the first images, and matching the feature points in the first images of adjacent frames to Obtain the matching feature point pairs of the first images of adjacent frames; and obtain the actual displacement between the first images of adjacent frames according to the matching feature point pairs.
  • obtaining the actual displacement between the first images of adjacent frames according to the pair of matching feature points includes: performing nonlinear optimization according to the pair of matching feature points to obtain the second homography between the first images of adjacent frames matrix; according to the second homography matrix and the internal reference matrix of the shooting device, the actual displacement between the first images of adjacent frames is obtained.
  • obtaining the actual displacement between the poses of the photographing device corresponding to the first image of adjacent frames includes: obtaining the actual displacement according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of photographing the first image displacement.
  • adjusting the actual displacement to obtain the target displacement includes: respectively adjusting the actual displacement in different dimensions so as to obtain the target displacement in different dimensions.
  • the actual displacement includes at least one of an actual rotation angle and an actual translation amount
  • adjusting the actual displacement to obtain a target displacement includes at least one of the following: adjusting the actual rotation angle to obtain a target rotation angle;
  • the actual translation amount is adjusted to obtain the target translation amount.
  • the processor 420 is further configured to: select the first image of the last frame from at least two last first images of the frame according to a preset condition. For example, at least two frames of the first image at the end can be matched with the first frame of the first image, and the first frame of the first image with the largest number of matching feature point pairs between the first frame of the first image can be used as the first frame of the last frame. image. Alternatively, the actual displacement between at least two frames of the first image at the end and the first image of the first frame may be obtained respectively; and the frame of the first image with the smallest actual displacement is used as the first image of the last frame.
  • the preprocessing of the first image further includes: smoothing brightness of multiple frames of the first image, so as to reduce brightness difference between the last frame of the first image and the first frame of the first image.
  • the processor 420 is also used to: synchronously display the panoramic video and the progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end.
  • the processor 420 is also configured to: generate a preset trajectory according to user instructions; control the movable platform to run around the target object along the preset trajectory; The device captures a first image.
  • the processor 420 when the instructions stored in the memory 410 are executed by the processor 420, the processor is made to perform the following steps:
  • a panoramic video is generated based on multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  • the shooting device of the movable platform shooting the target object at different angles it also includes: responding to a user's shooting instruction, controlling the movable platform to shoot around the target object along a preset trajectory.
  • the target object may be determined based on a user's selection instruction, or the target object may be identified based on an image.
  • the preset trajectory may be determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, or the preset trajectory may be determined in response to a user's setting instruction.
  • the device 400 for video, the device 400 for generating a panoramic video is communicatively connected with the shooting device, and is used for generating a panoramic video based on an image captured by the shooting device.
  • the movable platform may include an aircraft (such as a drone), a robot, an unmanned vehicle, an unmanned boat, and the like.
  • the mobile platform is described below by taking an aircraft as an example, but it can be understood that this is not intended to limit the application scenario of the present application.
  • Those skilled in the art should understand that any embodiments described herein regarding aircraft are applicable to any aircraft (such as unmanned aerial vehicles, also called unmanned aerial vehicles).
  • Aircraft may include processors, memory, powertrains, sensing systems, and communication systems. These components are interconnected by bus systems and/or other forms of connection mechanisms.
  • the photographing device can be set on the aircraft through a carrier such as a pan/tilt.
  • the power mechanism may include one or more rotating bodies, propellers, paddles, engines, motors, wheels, bearings, magnets, nozzles.
  • the rotating body of the power mechanism may be a self-fastening rotating body, a rotating body assembly, or other rotating body power units.
  • An aircraft can have one or more power units. All power mechanisms can be of the same type. Optionally, one or more power mechanisms may be of different types.
  • the power unit can be mounted on the aircraft by suitable means, such as via support elements (eg drive shafts).
  • the power mechanism can be installed in any suitable position of the aircraft, such as top, bottom, front, rear, side or any combination thereof.
  • the power mechanism is capable of causing the aircraft to take off vertically from a surface, or land vertically on a surface, without requiring any horizontal motion of the aircraft (eg, without taxiing on a runway).
  • the power mechanism may allow the aircraft to hover at a preset position and/or direction in the air.
  • One or more powered mechanisms may be controlled independently of other powered mechanisms.
  • one or more power mechanisms can be controlled simultaneously.
  • an aircraft may have multiple horizontally oriented rotators to track the lifting and/or pushing of objects. The rotating body in the horizontal direction can be actuated to provide the capability of the aircraft to take off vertically, land vertically, and hover.
  • one or more of the horizontally oriented rotators may rotate clockwise, while the other one or more of the horizontally oriented rotators may rotate counterclockwise.
  • the rate of rotation of each horizontal rotator can be varied independently to achieve the lift and/or push action caused by each rotator, thereby adjusting the spatial orientation, velocity, and/or acceleration of the aircraft (e.g., relative to up to three free-wheeling degrees of rotation and translation).
  • the sensing system may include one or more sensors to sense the spatial orientation, velocity and/or acceleration (eg, rotation and translation with respect to up to three degrees of freedom) of the aircraft.
  • the one or more sensors include any of the aforementioned sensors, including GPS sensors, motion sensors, inertial sensors, proximity sensors, or image sensors.
  • the sensing data provided by the sensing system can be used to track the spatial orientation, velocity and/or acceleration of the target.
  • the sensing system may be used to collect data about the aircraft's environment, such as weather conditions, potential obstacles to approach, locations of geographic features, locations of man-made structures, image information, and the like.
  • the communication system can communicate with the control device with the communication system through wireless signals.
  • a communication system may include any number of transmitters, receivers, and/or transceivers for wireless communication.
  • the communication may be one-way communication, such that data is sent in one direction.
  • one-way communication may include that only the aircraft transmits data to the control device, or vice versa.
  • One or more transmitters of the communication system can send data to one or more receivers of the communication system, and vice versa.
  • the communication may be bi-directional, so that data can be transmitted in both directions between the aircraft and the control means. Two-way communication involves that one or more transmitters of the communication system can send data to one or more receivers of the communication system, and vice versa.
  • control device can provide control data to one or more of the aircraft, the carrier, and the photographing device, and receive information from one or more of the aircraft, the carrier, and the photographing device (such as the aircraft, the carrier, and the photographing device).
  • the control data of the control device may include instructions about position, movement, actuation, or control of the aircraft, carrier and/or camera.
  • the control data may result in a change in the position and/or orientation of the aircraft (eg, by controlling a power mechanism), or cause a movement of the carrier relative to the aircraft (eg, by controlling the carrier).
  • the control data of the control device can lead to the control of the shooting device, such as controlling the operation of the camera or other shooting devices (capturing still or moving images, zooming, turning on or off, switching shooting modes, changing image resolution, changing focal length, changing depth of field, changing exposure time, changing viewing angle or field of view).
  • the communication of the aircraft, the carrier and/or the camera may include information from one or more sensors (such as a sensor system or a camera).
  • the communication may include sensory information transmitted from one or more sensors of different types, such as GPS sensors, motion sensors, inertial sensors, proximity sensors, or image sensors.
  • the sensing information is about the position (such as direction, position), motion, or acceleration of the aircraft, carrier, and/or photographing device.
  • the sensing information transmitted from the camera includes data captured by the camera or the state of the camera.
  • the control data transmitted and provided by the control device can be used to track the status of one or more of the aircraft, the carrier or the camera device.
  • each of the carrier and the photographing device may include a communication module for communicating with the control device, so that the control device can communicate or track the aircraft, the carrier and the photographing device individually.
  • the aircraft may communicate with remote devices other than the control device, and the control device may also communicate with remote devices other than the aircraft.
  • the aircraft and/or the control device may communicate with another aircraft or with a carrier or camera of another aircraft.
  • the additional remote device may be a second control device or other computing device (such as a computer, desktop, tablet, smart phone, or other mobile device), when desired.
  • the remote device may transmit data to the aircraft, receive data from the aircraft, transmit data to the control device, and/or receive data from the control device.
  • the remote device may be connected to the Internet or other telecommunication network to allow data received from the aircraft and/or controls to be uploaded to a website or server.
  • the movement of the aircraft, the movement of the carrying body and the movement of the photographing device relative to a fixed reference object (such as the external environment), and/or the movement between them can all be controlled by the control device.
  • the control device may be a remote control terminal located far away from the aircraft, carrier and/or photographing device.
  • the control device may be located or attached to the support platform.
  • the control device may be handheld or wearable.
  • the control device may include a smart phone, a tablet computer, a desktop computer, a computer, glasses, gloves, a helmet, a microphone, or any combination thereof.
  • the control means may comprise a user interface such as a keyboard, mouse, joystick, touch screen or display. Any suitable user input may interact with the control device, such as manual input commands, voice control, gesture control, or positional control (eg by movement, position or tilt of the control device).
  • the aircraft may include one or more memories, on which are stored computer programs executed by the processor, for example, for storing corresponding steps and program instructions for implementing the method for generating panoramic video according to the embodiment of the present application.
  • One or more computer program products may be included, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory.
  • the volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache).
  • the non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
  • the aircraft may include one or more processors, and the processor may be a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or have data processing capabilities and/or or other form of processing unit capable of executing instructions and may control other components in the aircraft to perform desired functions.
  • the processor can execute the program instructions stored in the memory, so as to execute the relevant steps in the method for generating a panoramic video in the embodiment of the present application described above.
  • a processor can include one or more embedded processors, processor cores, microprocessors, logic circuits, hardware finite state machines (FSMs), digital signal processors (DSPs), or combinations thereof.
  • the processor includes a Field Programmable Gate Array (FPGA), or one or more ARM processors.
  • the mobile platform in the embodiment of the present invention has the apparatus 400 for generating panoramic video in the embodiment of the present invention, it also has similar advantages.
  • an embodiment of the present invention also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method 100 or 300 for generating a panoramic video are implemented.
  • Computer storage media may include, for example, a memory card of a smartphone, a memory component of a tablet computer, a hard disk of a personal computer, read only memory (ROM), erasable programmable read only memory (EPROM), portable compact disk ROM ( CD-ROM), USB memory, or any combination of the above storage media.
  • the computer readable storage medium can be any combination of one or more computer readable storage medium.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another device, or some features may be omitted, or not implemented.
  • the various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
  • a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some modules according to the embodiments of the present invention.
  • DSP digital signal processor
  • the present invention can also be implemented as an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein.
  • Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals.
  • Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

A method for generating a panoramic video, an apparatus, and a mobile platform. The method comprises: obtaining multiple first images acquired via a photography apparatus of a mobile platform photographing a target object from different angles, the first images being photographed while the mobile platform moved around the target object along a preset trajectory; performing preprocessing on the first images, so as to obtain second images, wherein the preprocessing is used for producing smooth transitioning from an ending first image to a beginning first image among a plurality of the first images; and generating a panoramic video on the basis of a plurality of second images. By means photographing images using the photography apparatus of the mobile platform, there is more flexibility in a photographing trajectory, and a high quality panoramic video with beginning-to-end smooth transitioning can be generated.

Description

生成全景视频的方法、装置和可移动平台Method, device and mobile platform for generating panoramic video
说明书manual
技术领域technical field
本申请涉及数据处理技术领域,更具体地涉及一种生成全景视频的方法、装置和可移动平台。The present application relates to the technical field of data processing, and more specifically relates to a method, device and mobile platform for generating panoramic video.
背景技术Background technique
环绕式全景视频是全景视频的一种,可以针对被摄物体本身进行环绕式360°的自由展示,并由用户任意确定观察角度。传统的拍摄方式是在固定被摄物体后使用拍摄装置围绕被摄物体一周拍摄若干张图片,通过后处理方式将多张图片融合为一张全视场角的图像或者类似功能的全景视频。Surrounding panoramic video is a kind of panoramic video, which can freely display 360° around the subject itself, and the user can arbitrarily determine the viewing angle. The traditional shooting method is to use a shooting device to take several pictures around the subject after the subject is fixed, and to fuse the multiple pictures into a full-field-of-view image or a panoramic video with similar functions through post-processing.
传统环绕式全景视频普遍采用固定轨道或者多张固定机位拍摄装置的方式进行拍摄,大大制约了此类全景视频拍摄的通用性。并且全景视频的首尾帧无法衔接,表现为一串固定单一的视频,缺乏交互观感。Traditional wrap-around panoramic videos generally use fixed tracks or multiple fixed-position shooting devices to shoot, which greatly restricts the versatility of this type of panoramic video shooting. Moreover, the first and last frames of the panoramic video cannot be connected, which is manifested as a series of fixed and single videos, lacking an interactive look and feel.
发明内容Contents of the invention
在发明内容部分中引入了一系列简化形式的概念,这将在具体实施方式部分中进一步详细说明。本发明的发明内容部分并不意味着要试图限定出所要求保护的技术方案的关键特征和必要技术特征,更不意味着试图确定所要求保护的技术方案的保护范围。A series of concepts in simplified form are introduced in the Summary of the Invention, which will be further detailed in the Detailed Description. The summary of the invention in the present invention does not mean to limit the key features and essential technical features of the claimed technical solution, nor does it mean to try to determine the protection scope of the claimed technical solution.
本发明实施例第一方面提供了一种生成全景视频的方法,包括:The first aspect of the embodiment of the present invention provides a method for generating panoramic video, including:
获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,所述第一图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的;Obtain multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform, and the first images are taken while the movable platform is running around the target object along a preset track ;
对所述第一图像进行预处理,以得到第二图像,其中,所述预处理用于使多帧所述第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;Preprocessing the first image to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
基于多帧所述第二图像生成全景视频。A panoramic video is generated based on multiple frames of the second image.
本发明实施例第二方面提供了一种生成全景视频的方法,包括:The second aspect of the embodiment of the present invention provides a method for generating panoramic video, including:
获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,所述图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的,其中,所述预设轨迹的首尾两端的位移大于或等于第一预设阈值;Obtaining multiple frames of images obtained by the shooting device of the movable platform shooting the target object at different angles, the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
基于所述多帧图像生成全景视频,其中,在所述全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。A panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
本发明实施例第三方面提供了一种生成全景视频的装置,所述装置包括:The third aspect of the embodiment of the present invention provides a device for generating a panoramic video, the device comprising:
存储器,用于存储可执行指令;memory for storing executable instructions;
处理器,用于执行所述存储器中存储的所述指令,使得所述处理器执行以下步骤:a processor, configured to execute the instructions stored in the memory, so that the processor performs the following steps:
获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,所述第一图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的;Obtain multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform, and the first images are taken while the movable platform is running around the target object along a preset track ;
对所述第一图像进行预处理,以得到第二图像,其中,所述预处理用于使多帧所述第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;Preprocessing the first image to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
基于多帧所述第二图像生成全景视频。A panoramic video is generated based on multiple frames of the second image.
本发明实施例第四方面提供了一种生成全景视频的装置,所述装置包括:The fourth aspect of the embodiment of the present invention provides a device for generating a panoramic video, the device comprising:
存储器,用于存储可执行指令;memory for storing executable instructions;
处理器,用于执行所述存储器中存储的所述指令,使得所述处理器执行以下步骤:a processor, configured to execute the instructions stored in the memory, so that the processor performs the following steps:
获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,所述图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的,其中,所述预设轨迹的首尾两端的位移大于或等于第一预设阈值;Obtaining multiple frames of images obtained by the shooting device of the movable platform shooting the target object at different angles, the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
基于所述多帧图像生成全景视频,其中,在所述全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。A panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
本发明实施例第五方面提供了一种可移动平台,包括:The fifth aspect of the embodiment of the present invention provides a mobile platform, including:
可移动平台本体;Movable platform body;
拍摄装置,搭载在所述可移动平台本体上,用于对目标对象进行拍摄;A photographing device, mounted on the movable platform body, for photographing the target object;
以及,如上所述的生成全景视频的装置,所述生成全景视频的装置与所述拍摄装置通信连接,用于基于所述拍摄装置拍摄的图像生成全景视频。And, in the device for generating panoramic video as described above, the device for generating panoramic video is communicatively connected to the shooting device for generating a panoramic video based on the images captured by the shooting device.
本发明实施例第六方面提供了一种计算机存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述的生成全景视频的方法。A sixth aspect of the embodiment of the present invention provides a computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for generating a panoramic video is implemented.
根据本发明实施例的生成全景视频的方法、装置和可移动平台通过可移动平台的拍摄装置拍摄图像,拍摄轨迹更加灵活,并且能够生成首尾平滑过渡的高质量的全景视频。According to the method, device and movable platform for generating panoramic video according to the embodiments of the present invention, the photographing device of the movable platform captures images, the shooting trajectory is more flexible, and high-quality panoramic video with smooth transition from the beginning to the end can be generated.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
在附图中:In the attached picture:
图1示出根据本发明一实施例的生成全景视频的方法的示意性流程图;Fig. 1 shows a schematic flowchart of a method for generating a panoramic video according to an embodiment of the present invention;
图2示出根据本发明一实施例的对第一图像进行预处理的示意性流程图;FIG. 2 shows a schematic flow chart of preprocessing a first image according to an embodiment of the present invention;
图3示出根据本发明另一实施例的生成全景视频的方法的示意性流程图;Fig. 3 shows a schematic flowchart of a method for generating a panoramic video according to another embodiment of the present invention;
图4示出根据本发明一实施例的生成全景视频的装置的示意性框图。Fig. 4 shows a schematic block diagram of an apparatus for generating a panoramic video according to an embodiment of the present invention.
具体实施方式Detailed ways
为了使得本发明的目的、技术方案和优点更为明显,下面将参照附图详细描述根据本发明的示例实施例。显然,所描述的实施例仅仅是本发明的一部分实施例,而不是本发明的全部实施例,应理解,本发明不受这里描述的示例实施例的限制。基于本发明中描述的本发明实施例,本领域技术人员在没有付出创造性劳动的情况下所得到的所有其它实施例都应落入本发明的保护范围之内。In order to make the objects, technical solutions and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Apparently, the described embodiments are only some embodiments of the present invention, rather than all embodiments of the present invention, and it should be understood that the present invention is not limited by the exemplary embodiments described here. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative effort shall fall within the protection scope of the present invention.
在下文的描述中,给出了大量具体的细节以便提供对本发明更为彻底的理解。然而,对于本领域技术人员而言显而易见的是,本发明可以无需一个或多个这些细节而得以实施。在其他的例子中,为了避免与本发明发生混淆,对于本领域公知的一些技术特征未进行描述。In the following description, numerous specific details are given in order to provide a more thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without one or more of these details. In other examples, some technical features known in the art are not described in order to avoid confusion with the present invention.
应当理解的是,本发明能够以不同形式实施,而不应当解释为局限于这 里提出的实施例。相反地,提供这些实施例将使公开彻底和完全,并且将本发明的范围完全地传递给本领域技术人员。It should be understood that the invention can be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
在此使用的术语的目的仅在于描述具体实施例并且不作为本发明的限制。在此使用时,单数形式的“一”、“一个”和“所述/该”也意图包括复数形式,除非上下文清楚指出另外的方式。还应明白术语“组成”和/或“包括”,当在该说明书中使用时,确定所述特征、整数、步骤、操作、元件和/或部件的存在,但不排除一个或更多其它的特征、整数、步骤、操作、元件、部件和/或组的存在或添加。在此使用时,术语“和/或”包括相关所列项目的任何及所有组合。The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a", "an" and "the/the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It should also be understood that the terms "consists of" and/or "comprising", when used in this specification, identify the presence of stated features, integers, steps, operations, elements and/or parts, but do not exclude one or more other Presence or addition of features, integers, steps, operations, elements, parts and/or groups. As used herein, the term "and/or" includes any and all combinations of the associated listed items.
为了彻底理解本发明,将在下列的描述中提出详细的步骤以及详细的结构,以便阐释本发明提出的技术方案。本发明的较佳实施例详细描述如下,然而除了这些详细描述外,本发明还可以具有其他实施方式。In order to thoroughly understand the present invention, detailed steps and detailed structures will be provided in the following description, so as to explain the technical solution proposed by the present invention. Preferred embodiments of the present invention are described in detail below, however, the present invention may have other embodiments besides these detailed descriptions.
下面结合附图,对本申请的生成全景视频的方法、装置和可移动平台进行详细说明。在不冲突的情况下,下述的实施例及实施方式中的特征可以相互组合。The method, device and mobile platform for generating a panoramic video of the present application will be described in detail below with reference to the accompanying drawings. If there is no conflict, the features in the following embodiments and implementations can be combined with each other.
对于传统的环绕式全景视频来说,为了能够让视频最后的末帧图像到首帧图像之间平滑过渡,往往对运动轨迹有着严格的要求,因此传统的拍摄方法往往需要围绕被摄物体布置固定轨道,拍摄极为不便,尤其对于室外大型建筑物等不适宜布置固定轨道的物体来说。此外,沿固定轨道进行拍摄还存在着另一问题,即不能由用户进行拍摄范围的自定义,这一点严重影响了后续产品的使用体验,交互感较差。For the traditional surround panoramic video, in order to make the smooth transition between the last frame of the video and the first frame of the video, there are often strict requirements on the motion track, so the traditional shooting method often needs to arrange a fixed frame around the subject. It is extremely inconvenient to shoot, especially for objects such as large outdoor buildings that are not suitable for fixed orbits. In addition, there is another problem in shooting along a fixed track, that is, the shooting range cannot be customized by the user, which seriously affects the user experience of subsequent products, and the interaction is poor.
然而,若不使用固定轨道进行拍摄,则拍摄装置的运动轨迹会产生较大波动,对应得到的全景视频画面抖动较大,严重影响视觉体验。轨迹的不确定性还会使得此类全景视频无法完成首尾衔接,只能呈现为单一视频,缺乏交互观感。However, if a fixed track is not used for shooting, the motion trajectory of the shooting device will fluctuate greatly, and the obtained panoramic video picture will shake greatly, seriously affecting the visual experience. The uncertainty of the trajectory will also make this kind of panoramic video unable to complete the end-to-end connection, and can only be presented as a single video, lacking interactive look and feel.
针对上述问题,本发明实施例的生成全景视频的方法基于可移动平台的拍摄装置进行拍摄,便于用户自定义拍摄轨迹,并且可移动平台能够更大程度地给出较为理想的拍摄轨迹,便于进行后续的图像处理。此外,本发明实施例的生成全景视频的方法在基于图像生成全景视频之前首先对图像序列进行预处理,使得首末帧图像之间平滑过渡,使得生成的全景视频能够完成首尾衔接,从而能够得到高质量的全景视频。In view of the above problems, the method for generating a panoramic video in the embodiment of the present invention is based on the shooting device of the movable platform for shooting, which is convenient for users to customize the shooting trajectory, and the movable platform can give a more ideal shooting trajectory to a greater extent, which is convenient for carrying out Subsequent image processing. In addition, the method for generating a panoramic video in the embodiment of the present invention first preprocesses the image sequence before generating the panoramic video based on the image, so that the transition between the first and last frame images is smooth, so that the generated panoramic video can complete the end-to-end connection, so that it can be obtained High quality panoramic video.
下面,首先参照图1,对本发明实施例提供的生成全景视频的方法进行描述。图1示出了根据本发明的一个实施例的生成全景视频的方法100的流程图。如图1所示,本发明实施例的生成全景视频的方法100包括如下步骤:In the following, firstly, referring to FIG. 1 , the method for generating a panoramic video provided by an embodiment of the present invention will be described. Fig. 1 shows a flowchart of a method 100 for generating a panoramic video according to an embodiment of the present invention. As shown in FIG. 1, a method 100 for generating a panoramic video in an embodiment of the present invention includes the following steps:
在步骤S110,获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,所述第一图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的;In step S110, multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform are obtained, and the first images are obtained when the movable platform moves around the target object along a preset track taken during the
在步骤S120,对所述第一图像进行预处理,以得到第二图像,其中,所述预处理用于使多帧所述第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;In step S120, preprocessing is performed on the first image to obtain a second image, wherein the preprocessing is used to make the difference between the first image in the last frame and the first image in the first frame among the multiple frames of the first image smooth transition between
在步骤S130,基于多帧所述第二图像生成全景视频。In step S130, a panoramic video is generated based on multiple frames of the second image.
本发明实施例的生成全景视频的方法100的执行主体可以是可移动平台的处理器,也可以是与可移动平台通信连接的其他电子设备。当生成全景视频的方法100的执行主体是可移动平台的处理器时,该处理器可以实时对可移动平台的拍摄装置采集的图像进行上述处理,以得到全景视频。当生成全景视频的方法100的执行主体是其他设备时,可以通过可移动平台的通讯系统将拍摄装置拍摄的第一图像传输至其他设备进行上述处理,以得到全景视频。The execution body of the method 100 for generating panoramic video in the embodiment of the present invention may be the processor of the mobile platform, or other electronic devices communicatively connected to the mobile platform. When the execution subject of the method 100 for generating panoramic video is the processor of the mobile platform, the processor may perform the above processing on the image captured by the photographing device of the mobile platform in real time to obtain the panoramic video. When the execution subject of the method 100 for generating panoramic video is other devices, the first image captured by the shooting device may be transmitted to other devices through the communication system of the mobile platform to perform the above processing to obtain the panoramic video.
其中,可移动平台可以包括飞行器(例如无人机)、机器人、无人车、无人船等。以无人机为例,其可以包括一个或多个动力单元,用于为无人机在空中飞行提供动力。一个或多个动力单元能够使无人机在一个或多个自由度内运动,从而使无人机能够环绕目标对象飞行,并在飞行过程中,保证其拍摄装置始终面向拍摄目标。相比于旋转载物盘等固定轨迹设备来说,使用无人机等可移动平台的拍摄设备进行拍摄时拍摄轨迹更加灵活。由于在使用可移动平台拍摄的过程中存在一定的运动幅度,因此本发明实施例对图像进行了预处理,使得各帧图像之间平滑过渡,从而得到高质量的全景视频。Wherein, the movable platform may include an aircraft (such as a drone), a robot, an unmanned vehicle, an unmanned ship, and the like. Taking a UAV as an example, it may include one or more power units for providing power for the UAV to fly in the air. One or more power units can make the drone move in one or more degrees of freedom, so that the drone can fly around the target object, and during the flight, ensure that its shooting device is always facing the shooting target. Compared with fixed track devices such as rotating object trays, the shooting track is more flexible when shooting with mobile platform shooting devices such as drones. Since there is a certain range of motion in the process of shooting with a movable platform, the embodiment of the present invention preprocesses the images to make a smooth transition between each frame of images, thereby obtaining a high-quality panoramic video.
在步骤S110中,首先确定环绕目标对象运行的预设轨迹,并控制可移动平台沿预设轨迹环绕目标对象运行,使可移动平台从某一点出发环绕目标对象运行一周,并回到出发点。可移动平台的运行过程应尽量保持平滑、稳定,其中预设轨迹的高度、轨迹形状和运行半径不做限制,只需保证运行轨迹的首尾位置基本一致、使得运动轨迹首尾平滑可接即可。示例性地,预设轨迹可以为圆形或椭圆形。In step S110, first determine a preset track around the target object, and control the movable platform to run around the target object along the preset track, so that the movable platform starts from a certain point to run around the target object for a circle, and returns to the starting point. The running process of the movable platform should be as smooth and stable as possible. There are no restrictions on the height, shape and radius of the preset trajectory. It is only necessary to ensure that the starting and ending positions of the running trajectory are basically the same, so that the beginning and ending of the moving trajectory are smooth and connectable. Exemplarily, the preset trajectory may be a circle or an ellipse.
在一些实施例中,可以根据用户指令生成预设轨迹,并控制可移动平台 沿预设轨迹环绕目标对象运行。由于本发明实施例的生成全景视频的方法100使用可移动平台的拍摄装置进行拍摄,便于用户自定义拍摄轨迹,使用户可以根据实际需要调节轨迹高度、形状、半径、以及控制可移动平台的运行速度等。在可移动平台沿预设轨迹环绕目标对象运行的过程中,控制拍摄装置按照预设帧率对目标对象进行拍摄,以得到环绕目标对象一周的各个角度下拍摄的第一图像。In some embodiments, a preset trajectory can be generated according to user instructions, and the movable platform can be controlled to run around the target object along the preset trajectory. Since the method 100 for generating a panoramic video in the embodiment of the present invention uses the camera of the movable platform to shoot, it is convenient for the user to customize the shooting trajectory, so that the user can adjust the trajectory height, shape, radius, and control the operation of the movable platform according to actual needs. speed etc. When the movable platform is running around the target object along the preset trajectory, the shooting device is controlled to shoot the target object at a preset frame rate, so as to obtain first images taken at various angles around the target object.
在其他实施例中,预设轨迹也可以是基于目标对象的类型、尺寸、形状或移动特性中的一种或多种而自动确定的。目标对象的类型、尺寸、形状和移动特性可以是通过图像分析得到的,也可以是用户输入的。例如,可以在可移动平台运行的过程中根据拍摄装置的拍摄画面实时检测符合预设拍摄要求的目标对象,确定目标对象的类型、尺寸、形状和移动特性等特征,根据上述特征生成预设轨迹。In other embodiments, the preset trajectory may also be automatically determined based on one or more of the target object's type, size, shape or movement characteristics. The type, size, shape and movement characteristics of the target object can be obtained through image analysis or can be input by the user. For example, during the operation of the movable platform, it is possible to detect in real time the target object that meets the preset shooting requirements according to the shooting picture of the shooting device, determine the type, size, shape and movement characteristics of the target object, and generate a preset trajectory according to the above characteristics .
示例性地,可以在可移动平台到达预设轨迹的起点时,控制拍摄装置开始拍摄,并在可移动平台到达预设轨迹的终点时,控制拍摄装置停止拍摄;当然,也可以控制拍摄装置持续拍摄,并提取可移动平台沿预设轨迹运行一周的时间段内拍摄的图像,作为待处理的第一图像。Exemplarily, when the movable platform reaches the starting point of the preset track, the shooting device can be controlled to start shooting, and when the movable platform reaches the end point of the preset track, the shooting device can be controlled to stop shooting; of course, the shooting device can also be controlled to continue shooting, and extracting images taken during a period of one week when the movable platform runs along a preset trajectory, as the first image to be processed.
之后,在步骤S120中,对第一图像进行预处理,以得到第二图像,其中,预处理用于使多帧第一图像中的末帧第一图像到首帧第一图像之间平滑过渡,从而得到近似于预设轨迹的首尾两端无缝衔接的拍摄效果。预处理至少减小了末帧第一图像到首帧第一图像之间的差异,使得用户在调节观看角度时,不会在首尾帧之间的过渡区产生明显接缝。进一步地,步骤S120中的预处理使得各帧第一图像之间均能够平滑过渡,使得各帧第一图像之间的差异平均分配,从而得到近似于拍摄装置在拍摄过程中始终保持匀速、平缓、稳定拍摄的拍摄效果。Afterwards, in step S120, the first image is preprocessed to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image of the last frame and the first image of the first frame among the multiple frames of first images , so as to obtain a shooting effect similar to the seamless connection between the beginning and the end of the preset trajectory. The preprocessing at least reduces the difference between the first image of the last frame and the first image of the first frame, so that when the user adjusts the viewing angle, no obvious seam will be generated in the transition area between the first and last frames. Further, the preprocessing in step S120 enables a smooth transition between the first images of each frame, so that the differences between the first images of each frame are evenly distributed, thereby obtaining an approximation that the shooting device always maintains a constant speed and a smooth transition during the shooting process. , The shooting effect of stable shooting.
由于拍摄装置的位姿与拍摄装置拍摄得到的第一图像之间具有映射关系,减小首末帧图像对应的拍摄装置的位姿之间的差异,再将调节后的位姿映射到图像上,可以减小首末帧图像之间的差异。因此,参见图2,在一个实施例中,对第一图像进行预处理包括:Since there is a mapping relationship between the pose of the camera and the first image captured by the camera, reduce the difference between the poses of the camera corresponding to the first and last frames of images, and then map the adjusted pose to the image , which can reduce the difference between the first and last frame images. Therefore, referring to FIG. 2, in one embodiment, preprocessing the first image includes:
在步骤S210,获取相邻帧第一图像对应的拍摄装置的位姿之间的实际位移;In step S210, the actual displacement between the poses of the photographing device corresponding to the first image of the adjacent frame is obtained;
在步骤S220,对实际位移进行调节,以得到目标位移,其中,末帧第一图像到首帧第一图像之间的第一目标位移,小于末帧第一图像到首帧第一图 像之间的第一实际位移;In step S220, the actual displacement is adjusted to obtain the target displacement, wherein the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the distance between the first image in the last frame and the first image in the first frame The first actual displacement of ;
以及,在步骤S230,根据目标位移对第一图像进行映射,以得到第二图像。And, in step S230, the first image is mapped according to the target displacement to obtain the second image.
由于拍摄装置的位姿与拍摄装置采集的图像之间具有对应关系,因此,作为一种实现方式,在步骤S210中,可以采用图像匹配和运动估计的方式获取相邻帧第一图像对应的拍摄装置的位姿之间的实际位移。具体地,首先提取第一图像中的特征点,接着对相邻帧第一图像中的特征点进行匹配,从而得到相邻帧第一图像的匹配特征点对。之后,根据匹配特征点对得到相邻帧第一图像之间的实际位移。Since there is a corresponding relationship between the pose of the photographing device and the images collected by the photographing device, as an implementation, in step S210, image matching and motion estimation methods can be used to obtain the photographing corresponding to the first image of the adjacent frame. The actual displacement between poses of the device. Specifically, the feature points in the first image are first extracted, and then the feature points in the first image of the adjacent frames are matched, so as to obtain the matching feature point pairs of the first images of the adjacent frames. Afterwards, the actual displacement between the first images of adjacent frames is obtained according to the pair of matching feature points.
示例性地,可以采用SIFT(尺度不变特征变换)算法检测第一图像中的SIFT特征点。可以定位图像中的局部特征,该算法检测到的SIFT特征点是尺度和旋转不变量,不受图像大小和方向的影响,且受到光线、噪声等的影响较小。在提取到SIFT特征点后,可以对特征空间内的每个SIFT特征点与相邻帧中其邻域内的若干邻域点进行匹配,通过匹配算法寻找到匹配度最高的邻域点,该SIFT特征点及其匹配度最高的邻域点称为匹配特征点对。示例性地,可以采用k-d算法寻找匹配度最高的邻域点。Exemplarily, a SIFT (Scale Invariant Feature Transform) algorithm may be used to detect SIFT feature points in the first image. Local features in the image can be located. The SIFT feature points detected by the algorithm are scale and rotation invariant, not affected by the size and direction of the image, and less affected by light, noise, etc. After the SIFT feature points are extracted, each SIFT feature point in the feature space can be matched with several neighborhood points in its neighborhood in the adjacent frame, and the neighborhood point with the highest matching degree can be found through the matching algorithm. The SIFT The feature point and its neighbor point with the highest matching degree are called matching feature point pair. Exemplarily, the k-d algorithm may be used to find the neighborhood point with the highest matching degree.
进一步地,根据匹配特征点对得到相邻帧第一图像之间的实际位移,包括:根据匹配特征点对进行非线性优化,以得到相邻帧第一图像之间的第二单应性矩阵;根据第二单应性矩阵和拍摄装置的内参矩阵得到相邻帧第一图像之间的实际位移。其中,单应性矩阵描述了平面到平面的映射关系,即相邻帧第一图像之间的映射关系。为了与后文的第一单应性矩阵区分开,将此处描述相邻帧第一图像之间映射关系的单应性矩阵称为第二单应性矩阵,将后文中描述第一图像与第二图像之间映射关系的单应性矩阵称为第二单应性矩阵。Further, obtaining the actual displacement between the first images of adjacent frames according to the pair of matching feature points includes: performing nonlinear optimization according to the pair of matching feature points to obtain a second homography matrix between the first images of adjacent frames ; According to the second homography matrix and the internal reference matrix of the shooting device, the actual displacement between the first images of adjacent frames is obtained. Wherein, the homography matrix describes the mapping relationship between planes, that is, the mapping relationship between the first images of adjacent frames. In order to distinguish it from the first homography matrix described later, the homography matrix describing the mapping relationship between the first images of adjacent frames here is called the second homography matrix, and the first image and The homography matrix of the mapping relationship between the second images is called the second homography matrix.
之后,根据相邻帧第一图像之间的映射关系可以得到相邻帧图像对应的拍摄装置的位姿之间的映射关系,即相邻帧第一图像对应的拍摄装置的位姿之间的实际位移。其中,可以使用非线性优化的方法得到第二单应性矩阵,也可以使用其他优化算法、根据多组匹配特征点对的坐标得到第二单应性矩阵。在得到相邻帧第一图像对应的拍摄装置的位姿之间的实际位移之后,可以使用累计的方式得到各帧第一图像相对于首帧第一图像的实际位移,进而得到多帧第一图像的位移分布曲线。Afterwards, according to the mapping relationship between the first images of adjacent frames, the mapping relationship between the poses of the photographing devices corresponding to the adjacent frame images can be obtained, that is, the relationship between the poses of the photographing devices corresponding to the first images of adjacent frames actual displacement. Wherein, the second homography matrix may be obtained by using a non-linear optimization method, or other optimization algorithms may be used to obtain the second homography matrix according to the coordinates of multiple sets of matching feature point pairs. After obtaining the actual displacement between the poses of the shooting device corresponding to the first image of adjacent frames, the actual displacement of the first image of each frame relative to the first image of the first frame can be obtained by accumulating, and then the first image of multiple frames can be obtained. The displacement distribution curve of the image.
示例性地,可以根据下述公式(1)和公式(2)计算相邻帧第一图像之间的实际位移:Exemplarily, the actual displacement between the first images of adjacent frames can be calculated according to the following formulas (1) and (2):
Figure PCTCN2021095551-appb-000001
Figure PCTCN2021095551-appb-000001
P t=HP t-1   (2) P t =HP t-1 (2)
其中:in:
H表示相邻帧第一图像之间的第二单应性矩阵,第二单应性矩阵H约束了同一3D空间点在相邻帧第一图像平面的2D齐次坐标;H represents the second homography matrix between the first image of the adjacent frame, and the second homography matrix H constrains the 2D homogeneous coordinates of the same 3D space point in the first image plane of the adjacent frame;
R表示相邻帧第一图像之间的旋转矩阵;R represents the rotation matrix between the first images of adjacent frames;
T表示相邻帧第一图像之间的平移量;T represents the translation amount between the first images of adjacent frames;
K 1表示拍摄装置的内参矩阵,内参矩阵是固定的,与焦距和光圈中心有关; K 1 represents the internal reference matrix of the shooting device, which is fixed and related to the focal length and the center of the aperture;
n T表示物平面相对于第一帧的单位法向量; n T represents the unit normal vector of the object plane relative to the first frame;
P t-1表示前一帧第一图像内的某一特征点的坐标; P t-1 represents the coordinates of a certain feature point in the first image of the previous frame;
P t表示后一帧第一图像中的匹配点的坐标。 P t represents the coordinates of the matching point in the first image of the next frame.
具体地,首先根据公式(2),基于匹配特征点对的坐标P t-1和P t、采用非线性优化方法得到第二单应性矩阵H;之后,根据公式(1),基于求得的第二单应性矩阵H和已知的内参矩阵K 1、单位法向量n T,得到相邻帧第一图像之间的旋转矩阵R和平移量T。 Specifically, firstly, according to the formula (2), the second homography matrix H is obtained based on the coordinates P t-1 and P t of the matching feature point pair, using a nonlinear optimization method; then, according to the formula (1), based on the obtained The second homography matrix H, the known internal reference matrix K 1 , and the unit normal vector n T are used to obtain the rotation matrix R and translation T between the first images of adjacent frames.
在计算实际位移时,可以考虑平移模型和旋转模型,计算实际旋转角度和实际平移量,也可以仅考虑平移模型或仅考虑旋转模型,即计算实际旋转角度和实际平移量中的一个。示例性地,若拍摄装置焦距较短,则可以只计算实际旋转角度R,忽略实际平移量T,若焦距无限远,则可以只计算实际平移量T,忽略实际旋转角度R。相应地,后续在对实际位移进行调节以得到目标位移时,若考虑旋转模型,则可以对所述实际旋转角度进行调节,以得到目标旋转角度;若考虑平移模型,则可以对实际平移量进行调节,以得到目标平移量。When calculating the actual displacement, the translation model and the rotation model can be considered to calculate the actual rotation angle and the actual translation amount, or only the translation model or only the rotation model can be considered, that is, one of the actual rotation angle and the actual translation amount can be calculated. For example, if the focal length of the photographing device is short, only the actual rotation angle R can be calculated, and the actual translation amount T can be ignored; if the focal length is infinite, only the actual translation amount T can be calculated, and the actual rotation angle R can be ignored. Correspondingly, when adjusting the actual displacement to obtain the target displacement, if the rotation model is considered, the actual rotation angle can be adjusted to obtain the target rotation angle; if the translation model is considered, the actual translation amount can be adjusted Adjust to obtain the target translation amount.
需要说明的是,上述特征点检测方法和图像配准方法仅作为示例而非限制,任何合适的特征点检测方法和图像配准方法都可以应用于根据本发明实施例的生成全景视频的方法100中。It should be noted that the above-mentioned feature point detection method and image registration method are only examples and not limiting, and any suitable feature point detection method and image registration method can be applied to the method 100 for generating panoramic video according to the embodiment of the present invention middle.
在另一个实施例中,可以根据拍摄第一图像的过程中可移动平台的惯性测量装置测得的惯性测量数据得到实际位移。具体地,可以根据可移动平台 上搭载的惯性测量装置测得的惯性测量数据获得拍摄装置的位姿,进而根据各帧第一图像对应的位姿确定相邻帧第一图像之间拍摄装置位姿的实际位移。其中,惯性测量装置包括但不限于加速度计和陀螺仪,陀螺仪可以测量拍摄装置各个轴的转动的角速度,加速度计可以测量拍摄装置沿着各轴运动的线性加速度,对陀螺仪所测的角速率信号对时间积分运算,推算出瞬时运动方向、倾角等姿态信息,利用加速度计测得的加速度信号,对时间积分运算,可以推算出拍摄装置的速度信息,进而可以得到拍摄装置在采集图像过程中各时刻的位姿信息。In another embodiment, the actual displacement can be obtained according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of capturing the first image. Specifically, the pose of the photographing device can be obtained from the inertial measurement data measured by the inertial measurement device mounted on the movable platform, and then the position of the photographing device between the first images of adjacent frames can be determined according to the poses corresponding to the first images of each frame. The actual displacement of the pose. Among them, the inertial measurement device includes but is not limited to an accelerometer and a gyroscope. The gyroscope can measure the rotational angular velocity of each axis of the shooting device, and the accelerometer can measure the linear acceleration of the shooting device moving along each axis. The angle measured by the gyroscope The speed signal is integrated with time to calculate the attitude information such as the instantaneous motion direction and inclination angle. Using the acceleration signal measured by the accelerometer, the time integral operation can be used to calculate the speed information of the shooting device, and then the shooting device can be obtained during the image acquisition process. pose information at each moment.
示例性地,在采用图像匹配方法或根据惯性测量数据计算实际位移时,可以分别对不同维度的实际位移进行计算。例如,对于实际平移量来说,分别对x、y、z三个方向的实际平移量计算;在计算实际旋转角度时,分别对p、y、r三个旋转轴的旋转角度进行计算。后续在对实际位移进行调节以得到目标位移时,也分别对不同维度的实际位移进行调节,以得到不同维度的目标位移。Exemplarily, when using an image matching method or calculating the actual displacement based on inertial measurement data, the actual displacements in different dimensions may be calculated respectively. For example, for the actual translation amount, the actual translation amounts in the x, y, and z directions are calculated respectively; when the actual rotation angle is calculated, the rotation angles of the three rotation axes p, y, and r are respectively calculated. Subsequently, when the actual displacement is adjusted to obtain the target displacement, the actual displacements in different dimensions are also adjusted respectively, so as to obtain the target displacements in different dimensions.
在获取到实际位移之后,在步骤S220,对相邻帧第一图像之间的实际位移进行调节,从而得到相邻帧第一图像之间的目标位移。其中,实际位移代表拍摄装置在采集第一图像的过程中实际产生的位移,而目标位移代表期望拍摄装置产生的位移,即假设拍摄装置按照目标位移运动,则能够采集到平滑过渡的图像;获取目标位移的目的在于根据目标位移对第一图像进行映射,从而得到平滑过渡的第二图像。由于预设轨迹是单向的,图像的突变主要产生在末帧第一图像与首帧第一图像之间,因此上述调节减小了末帧第一图像与首帧第一图像之间的位移,使得末帧第一图像到首帧第一图像之间的第一目标位移,小于末帧第一图像到首帧第一图像之间的第一实际位移。After the actual displacement is obtained, in step S220, the actual displacement between the first images in adjacent frames is adjusted, so as to obtain the target displacement between the first images in adjacent frames. Wherein, the actual displacement represents the actual displacement of the photographing device during the process of capturing the first image, and the target displacement represents the expected displacement of the photographing device, that is, assuming that the photographing device moves according to the target displacement, a smooth transition image can be collected; The purpose of the target displacement is to map the first image according to the target displacement, so as to obtain a smooth transition of the second image. Since the preset trajectory is unidirectional, the sudden change of the image is mainly between the first image of the last frame and the first image of the first frame, so the above adjustment reduces the displacement between the first image of the last frame and the first image of the first frame , so that the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the first actual displacement between the first image in the last frame and the first image in the first frame.
由于相邻帧第一图像之间的实际位移较小,而末帧第一图像到首帧第一图像之间的实际位移较大,因此,在对实际位移进行调节时,可以将末帧第一图像到首帧第一图像之间的实际位移分配到其余各帧图像之间,即在步骤S220中,对实际位移进行调节以得到目标位移包括:获取末帧第一图像到首帧第一图像之间的目标位移与末帧第一图像到首帧第一图像之间的实际位移的偏差,并将该偏差分配到其余各帧所述第一图像之间。Since the actual displacement between the first image of the adjacent frame is small, and the actual displacement between the first image of the last frame and the first image of the first frame is relatively large, when adjusting the actual displacement, the first image of the last frame can be adjusted to The actual displacement between one image and the first image of the first frame is allocated among the remaining frames of images, that is, in step S220, adjusting the actual displacement to obtain the target displacement includes: obtaining the first image of the last frame to the first frame of the first frame The deviation between the target displacement between the images and the actual displacement between the first image in the last frame and the first image in the first frame, and distribute the deviation among the first images in the remaining frames.
可以理解的是,由于上述调节减小了末帧第一图像到首帧第一图像之间的位移,因此末帧第一图像和首帧第一图像中的至少一个需要分担偏差,也 就是说,上述偏差至少要分配到末帧第一图像与其前一帧第一图像之间、或者首帧第一图像与其后一帧第一图像之间。较佳地,末帧第一图像和首帧第一图像二者均需要分担部分偏差,以提高图像过渡的平滑性。It can be understood that since the above adjustment reduces the displacement between the first image of the last frame and the first image of the first frame, at least one of the first image of the last frame and the first image of the first frame needs to share the deviation, that is to say , the above deviation must be distributed at least between the first image in the last frame and the first image in the previous frame, or between the first image in the first frame and the first image in the next frame. Preferably, both the first image in the last frame and the first image in the first frame need to share part of the deviation, so as to improve the smoothness of image transition.
示例性地,将首末帧之间的偏差分配到其余各帧第一图像之间的方法包括:对上述偏差进行线性分配,使得在各帧第一图像之间的实际位移的基础上,增加或减少部分偏差。具体地,在计算出末帧第一图像到首帧第一图像之间的实际位移与目标位移的偏差之后,以中间的某一帧第一图像为起点,分别向首帧第一图像和末帧第一图像进行运动补偿,期间采用线性分配的方式,使得每相邻两帧第一图像之间的实际位移都增加或减少部分偏差,从而完成首尾帧之间的平滑过渡。例如,若将相邻两帧第一图像之间的实际位移表示为D 1,将分配在该相邻两帧第一图像之间的偏差表示为△D,则分配部分偏差之后相邻两帧第一图像之间的目标位移D 2=D 1+△D。 Exemplarily, the method for distributing the deviation between the first and last frames to the first images of the remaining frames includes: linearly distributing the above deviation, so that on the basis of the actual displacement between the first images of each frame, increase Or reduce partial bias. Specifically, after calculating the deviation between the actual displacement and the target displacement between the first image of the last frame and the first image of the first frame, starting from the first image of a certain frame in the middle, moving towards the first image of the first frame and the first image of the last frame respectively. Motion compensation is performed on the first image of the frame, and a linear distribution method is adopted during the period, so that the actual displacement between the first images of every two adjacent frames increases or decreases part of the deviation, so as to complete the smooth transition between the first and last frames. For example, if the actual displacement between the first images of two adjacent frames is expressed as D 1 , and the deviation allocated between the first images of the two adjacent frames is expressed as △D, then the two adjacent frames after the partial deviation are allocated The target displacement D 2 =D 1 +ΔD between the first images.
在一些实施例中,为了进一步提高图像间过渡的平滑性,在将首末帧图像之间的偏差分配到各帧第一图像之间之后,还需根据分配偏差后的实际位移得到位移分布曲线,对位移分布曲线进行平滑处理,并对平滑处理后的位移分布曲线进行差分,以得到各帧第一图像之间的目标位移。也就是说,对各帧第一图像之间的目标位移D 2进行累加,得到各帧第一图像相对于首帧第一图像之间的位移,从而得到位移分布曲线,之后对位移分布曲线进行平滑处理并进行差分,得到最终的目标位移D target。经过上述平滑处理后,拍摄装置的目标运动轨迹将更加平滑稳定。 In some embodiments, in order to further improve the smoothness of the transition between images, after distributing the deviation between the first and last frame images to the first image of each frame, it is also necessary to obtain the displacement distribution curve according to the actual displacement after the distribution of the deviation , the displacement distribution curve is smoothed, and the smoothed displacement distribution curve is differentiated to obtain the target displacement between the first images of each frame. That is to say, the target displacement D2 between the first images of each frame is accumulated to obtain the displacement between the first image of each frame relative to the first image of the first frame, thereby obtaining the displacement distribution curve, and then the displacement distribution curve is calculated Smoothing and difference are performed to obtain the final target displacement D target . After the above smoothing process, the target motion trajectory of the shooting device will be smoother and more stable.
由于本发明实施例中预期的全景视频效果需要末帧图像与首帧图像之间足够接近、稳定过渡,因此在一些实施例中,在获取多帧第一图像之后,还包括:根据预设条件在末尾的至少两帧第一图像中选择上述末帧第一图像。即上文中用于生成全景视频的末帧第一图像并不一定是图像采集过程中获得的最后一帧第一图像,而是在最后采集的若干帧图像中选择的与首帧第一图像最为接近的一帧图像。例如,假设共获取N帧第一图像,若第N-1帧第一图像满足预设条件,与首帧第一图像足够接近,则将第N-1帧第一图像作为末帧第一图像,并舍弃第N帧第一图像,从而减少末帧第一图像与首帧第一图像之间的差异,进一步保证首末帧图像之间的平滑过渡。Since the expected panorama video effect in the embodiment of the present invention requires a sufficiently close and stable transition between the last frame image and the first frame image, in some embodiments, after acquiring multiple frames of the first image, further includes: according to preset conditions The above-mentioned first image of the last frame is selected from at least two first images of the last frame. That is, the first image of the last frame used to generate the panoramic video above is not necessarily the first image of the last frame obtained during the image acquisition process, but the one that is the closest to the first image of the first frame among the last several frames of images collected. A close frame of image. For example, assuming that a total of N frames of the first image are acquired, if the first image of the N-1th frame satisfies the preset condition and is close enough to the first image of the first frame, then the first image of the N-1th frame is used as the first image of the last frame , and discard the first image of the Nth frame, thereby reducing the difference between the first image of the last frame and the first image of the first frame, and further ensuring a smooth transition between the images of the first and last frames.
在一个实施例中,在根据预设条件在末尾的至少两帧第一图像中选择末帧第一图像时,可以分别对末尾的至少两帧第一图像与首帧第一图像进行匹 配,将与首帧第一图像之间的匹配特征点对的数量最多的一帧第一图像作为末帧第一图像。其中,可以根据步骤S210中提取的SIFT特征点进行匹配,并分别得到末尾的至少两帧第一图像与首帧第一图像之间的匹配特征点对,匹配特征点对的数量越多,说明图像之间的相似度越高。In one embodiment, when the first image of the last frame is selected from the at least two first images at the end according to preset conditions, the at least two first images at the end can be matched with the first image of the first frame respectively, and the The first frame of the first image with the largest number of matching feature point pairs between the first image of the first frame is used as the first image of the last frame. Wherein, it can be matched according to the SIFT feature points extracted in step S210, and the matching feature point pairs between at least two frames of the first image at the end and the first frame of the first image are respectively obtained, the more the number of matching feature point pairs is, the description The higher the similarity between images.
在另一个实施例中,可以分别获取末尾的至少两帧第一图像与首帧第一图像之间的实际位移,将实际位移最小的一帧第一图像作为末帧第一图像。示例性地,可以根据图像匹配的方法或根据惯性测量数据获得实际位移,或者根据步骤S210中获取的相邻帧第一图像之间的实际位移进行累加,以得到末尾的至少两帧第一图像与首帧第一图像之间的实际位移。实际位移越小,说明图像之间的相似度越高。In another embodiment, the actual displacement between at least two frames of the first image at the end and the first frame of the first image can be obtained respectively, and the frame of the first image with the smallest actual displacement is used as the first image of the last frame. Exemplarily, the actual displacement can be obtained according to the method of image matching or according to the inertial measurement data, or can be accumulated according to the actual displacement between the first images of adjacent frames obtained in step S210, so as to obtain at least two frames of the first image at the end The actual displacement from the first image of the first frame. The smaller the actual displacement, the higher the similarity between images.
在一些实施例中,也可以保留最后采集的一帧第一图像作为末帧第一图像,并在最初采集的若干帧第一图像中选择一帧与末帧第一图像相似度最高的图像,作为用于生成全景视频的首帧第一图像。例如,假设共获取N帧第一图像,若第二帧第一图像与第N帧第一图像足够接近,则将第二帧第一图像作为首帧第一图像,并舍弃第一帧第一图像。选择首帧第一图像的方法与上文中选择末帧第一图像的方法类似,在此不做赘述。In some embodiments, it is also possible to retain the last captured first frame of the first image as the last frame of the first image, and select an image with the highest similarity to the last frame of the first image among the initially collected frames of the first image, As the first image of the first frame used to generate the panoramic video. For example, assuming that a total of N frames of the first image are acquired, if the first image of the second frame is close enough to the first image of the Nth frame, the first image of the second frame is used as the first image of the first frame, and the first image of the first frame is discarded. image. The method for selecting the first image of the first frame is similar to the method for selecting the first image of the last frame above, and will not be repeated here.
得到目标位移之后,在步骤S230,根据目标位移对第一图像进行映射,以得到第二图像。示例性地,可以根据目标位移和拍摄装置的内参矩阵得到第一图像与第二图像之间的第一单应性矩阵,第一单应性矩阵描述了第一图像与第二图像之间的映射关系。之后,根据第一单应性矩阵对第一图像进行映射,以得到所述第二图像。After the target displacement is obtained, in step S230, the first image is mapped according to the target displacement to obtain a second image. Exemplarily, the first homography matrix between the first image and the second image can be obtained according to the target displacement and the internal reference matrix of the shooting device, and the first homography matrix describes the distance between the first image and the second image. Mapping relations. Afterwards, the first image is mapped according to the first homography matrix to obtain the second image.
其中,可以参照公式(1),根据目标位移和内参矩阵得到第一单应性矩阵,即
Figure PCTCN2021095551-appb-000002
得到第一单应性矩阵之后,可以参照公式(2),对第一图像进行映射,得到第二图像。
Among them, the first homography matrix can be obtained according to the target displacement and the internal reference matrix by referring to formula (1), namely
Figure PCTCN2021095551-appb-000002
After obtaining the first homography matrix, the first image may be mapped with reference to formula (2) to obtain the second image.
通过如上所述的一系列图像处理,首末帧第二图像之间和的拍摄角度足够接近,能够实现图像之间的平滑过渡。进一步地,由于光照强度的差异,会造成图像之间亮度的不均匀,使得生成的全景视频会出现明暗交替,因此,在执行上述步骤之后,对第一图像进行的预处理还包括:对多帧第一图像的亮度进行平滑处理,以降低末帧第一图像与首帧第一图像之间的亮度差异。当然,为了进一步提高全景视频的可视化效果,在对多帧第一图像的亮度进行平滑处理时,不仅降低末帧第一图像与首帧第一图像之间的亮度差异,还 需均衡其余各帧第一图像的亮度。Through a series of image processing as described above, the shooting angles of the first and last frames of the second images are close enough to achieve a smooth transition between the images. Further, due to the difference in light intensity, the brightness between the images will be uneven, so that the generated panoramic video will appear alternately bright and dark. Therefore, after performing the above steps, the preprocessing of the first image also includes: The brightness of the first image of the frame is smoothed to reduce the brightness difference between the first image of the last frame and the first image of the first frame. Of course, in order to further improve the visualization effect of the panoramic video, when smoothing the brightness of the first image of multiple frames, not only the brightness difference between the first image of the last frame and the first image of the first frame is reduced, but also the rest of the frames need to be balanced Brightness of the first image.
示例性地,可以通过拍摄装置的光照模型矫正图像的光照不均匀性,之后通过相邻两幅图像重叠区域之间的关系,建立相邻两幅图像之间直方图映射表,通过映射表对两幅图像做整体的映射变换,最终达到整体的亮度和颜色的一致性。For example, the illumination inhomogeneity of the image can be corrected by the illumination model of the shooting device, and then the histogram mapping table between two adjacent images can be established through the relationship between the overlapping areas of the two adjacent images, and the The two images are mapped and transformed as a whole, and finally the overall brightness and color consistency are achieved.
最后,在步骤S130,基于多帧第二图像生成全景视频。其中,可以将多帧第二图像按照原有顺序排列,作为全景视频的视频帧,从而得到环绕目标对象的全视场角的全景视频。Finally, in step S130, a panoramic video is generated based on multiple frames of second images. Wherein, multiple frames of second images may be arranged according to the original order, and used as video frames of the panoramic video, so as to obtain a panoramic video with a full field of view around the target object.
在生成全景视频后,还包括显示全景视频的步骤。全景视频的生成和显示可以实现在不同的设备中。例如,可移动平台的处理器可以将生成的全景视频发送至客户端,并在客户端的显示界面上进行显示。After the panoramic video is generated, a step of displaying the panoramic video is also included. The generation and display of the panoramic video can be implemented in different devices. For example, the processor of the mobile platform can send the generated panoramic video to the client, and display it on the display interface of the client.
在一些实施例中,可以同步显示全景视频和与全景视频关联的进度条,进度条用于描述预设轨迹,以及描述当前时刻显示的全景视频在预设轨迹中对应的位置。进度条可以实现为长条形、环形、球形等,其中包括操作控件,操作控件所在的位置代表当前时刻显示的全景视频在预设轨迹中对应的位置,即当前时刻显示的画面所对应的拍摄位置,通过调节操作控件,可以调节对全景视频的观看角度。全景视频可以自动播放,即自动切换视角;也可以跟随用户对操作控件的调节而切换视角。其中,进度条描述的预设轨迹首尾相连,即通过调节操作控件,可以直接从预设轨迹末端对应的观看角度过渡到预设轨迹首端对应的观看角度,且由于本发明实施例对用于生成全景视频的图像进行了如上所述的预处理,在过渡过程中不会产生明显的突变。In some embodiments, the panoramic video and a progress bar associated with the panoramic video can be displayed synchronously, and the progress bar is used to describe the preset track and describe the corresponding position of the panoramic video displayed at the current moment in the preset track. The progress bar can be implemented as a long strip, ring, spherical, etc., including the operation control. The position of the operation control represents the corresponding position of the panoramic video displayed at the current moment in the preset track, that is, the shooting corresponding to the picture displayed at the current moment. Position, by adjusting the operation control, you can adjust the viewing angle of the panoramic video. The panoramic video can be played automatically, that is, the angle of view can be automatically switched; it can also be switched as the user adjusts the operation controls. Wherein, the preset track described by the progress bar is connected end to end, that is, by adjusting the operation control, the viewing angle corresponding to the end of the preset track can be directly transitioned to the viewing angle corresponding to the head end of the preset track, and because the embodiment of the present invention is applicable to The images that generate the panorama video are preprocessed as described above, and there will be no obvious abrupt changes in the transition process.
以上示例性地描述了根据本发明实施例的生成全景视频的方法所包括的示例性步骤流程。本发明实施例的生成全景视频的方法100通过可移动平台的拍摄装置拍摄图像,拍摄轨迹更加灵活,并且通过对首末帧图像之间进行平滑处理,能够生成首尾平滑过渡的高质量的全景视频。The above has exemplarily described the exemplary steps involved in the method for generating a panoramic video according to the embodiment of the present invention. The method 100 for generating a panoramic video in the embodiment of the present invention uses a mobile platform camera to capture images, and the shooting trajectory is more flexible, and by smoothing the first and last frame images, a high-quality panoramic video with a smooth transition from the beginning to the end can be generated. .
下面,参照图3,对本发明实施例另一方面提供的生成全景视频的方法300进行描述。如图3所示,本发明实施例的生成全景视频的方法300包括如下步骤:Next, with reference to FIG. 3 , a method 300 for generating a panoramic video provided by another aspect of the embodiment of the present invention will be described. As shown in FIG. 3 , a method 300 for generating a panoramic video in an embodiment of the present invention includes the following steps:
在步骤S310,获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,所述图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的,其中,所述预设轨迹的首尾两端的位移大于或等于 第一预设阈值;In step S310, multiple frames of images obtained by shooting the target object at different angles by the shooting device of the movable platform are obtained, and the images are taken while the movable platform is running around the target object along a preset track , wherein, the displacement at both ends of the preset trajectory is greater than or equal to a first preset threshold;
在步骤S320,基于所述多帧图像生成全景视频,其中,在所述全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。In step S320, a panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
其中,预设轨迹的首尾两端的位移为拍摄装置在空间坐标系下的位移,空间坐标系可以是GPS或者类似的绝对的物理坐标系,也可以是拍摄装置的坐标系。预设轨迹首尾两端的位移为拍摄装置在拍摄第一帧图像对应的位姿与拍摄最后一帧图像对应的位姿之间的实际位移。首帧与末帧之间的图像位移为图像间的位移。由于预设轨迹的首尾两端的位移大于或等于第一预设阈值,使得首尾两端拍摄的图像之间存在突变;而在基于多帧图像生成全景视频时,通过对图像进行处理,使得首帧与末帧之间的图像位移小于或等于第二预设阈值,从而使得全景视频能够在首末帧图像之间平滑过渡。Wherein, the displacements at both ends of the preset trajectory are displacements of the photographing device in a spatial coordinate system, and the spatial coordinate system may be GPS or a similar absolute physical coordinate system, or the coordinate system of the photographing device. The displacement at both ends of the preset trajectory is the actual displacement of the photographing device between the pose corresponding to the first frame of image and the pose corresponding to the last frame of image. The image displacement between the first frame and the last frame is the displacement between images. Since the displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold, there is a sudden change between the images taken at the first and last ends; and when generating a panoramic video based on multiple frames of images, by processing the images, the first frame The image displacement between the last frame and the last frame is less than or equal to the second preset threshold, so that the panoramic video can smoothly transition between the first and last frame images.
在步骤S310中,目标对象可以是基于用户的选取指令确定的,也可以是基于图像进行识别的。当基于拍摄装置拍摄的图像自动识别目标对象时,可以在可移动平台的飞行过程中实时地识别目标对象,或者,还可以获取用户通过控制装置输入的开始自动拍摄的控制指令,响应于该控制指令开始识别拍摄范围内满足预设拍摄条件的目标对象。In step S310, the target object may be determined based on a user's selection instruction, or may be identified based on an image. When the target object is automatically identified based on the image taken by the shooting device, the target object can be recognized in real time during the flight of the movable platform, or a control command to start automatic shooting input by the user through the control device can also be obtained, and in response to the control The instruction starts to identify the target objects meeting the preset shooting conditions within the shooting range.
可以通过任意适合的方法识别可移动平台的拍摄装置的拍摄范围内满足预设拍摄条件的目标对象。目标对象包括但不限于人、动物、植物、建筑物等。例如,可以根据图像中各对象的形状信息或位置信息识别目标对象。例如,形状信息包括物体的俯视形状、侧视形状等,俯视形状例如可以为建筑物的屋顶形状。位置信息可以包括物体的经纬坐标,或者其他任意能够物体位置的坐标信息等。在识别到图像中各物体的形状信息和位置信息之后,与预先标定的目标对象的形状信息和位置信息进行匹配,将匹配成功的物体确定为目标对象。其中,匹配成功可以是形状信息与位置信息均匹配成功,也可以是形状信息和位置信息中的一项匹配成功。Target objects meeting preset shooting conditions within the shooting range of the shooting device of the movable platform may be identified by any suitable method. Target objects include but are not limited to people, animals, plants, buildings, etc. For example, the target object can be identified according to the shape information or position information of each object in the image. For example, the shape information includes the top view shape, side view shape, etc. of the object, and the top view shape may be, for example, the roof shape of a building. The location information may include the longitude and latitude coordinates of the object, or any other coordinate information that can determine the location of the object. After the shape information and position information of each object in the image are recognized, it is matched with the shape information and position information of the pre-marked target object, and the successfully matched object is determined as the target object. Wherein, the successful matching may mean that both the shape information and the position information are successfully matched, or one item of the shape information and the position information is successfully matched.
确定目标对象后,响应用户的拍摄指令,控制可移动平台搭载拍摄装置沿预设轨迹环绕目标对象进行拍摄。可以理解的是,即使设定的预设轨迹为首尾重叠的轨迹,但在控制可移动平台沿预设轨迹运行过程中,首尾两端基本无法实现无缝衔接,因此首尾两端的位移大于或等于第一预设阈值。After the target object is determined, in response to the user's shooting instruction, the mobile platform is controlled to carry the shooting device to surround the target object along a preset trajectory to shoot. It is understandable that even if the preset trajectory is set to overlap the trajectory from the beginning to the end, in the process of controlling the movable platform to run along the preset trajectory, the two ends of the head and the tail cannot be seamlessly connected, so the displacement of the two ends is greater than or equal to The first preset threshold.
示例性地,首先生成环绕目标对象运行的预设轨迹,以控制可移动平台沿预设轨迹环绕目标对象运行。其中,预设轨迹可以是系统基于目标对象的 类型、尺寸、形状或移动特性中的一种或多种确定的,系统可以是可移动平台的控制系统,或者其他能够与可移动平台通信的计算设备。其中,目标对象的类型可以包括目标对象在人、动物、植物、建筑物等预设分类中对应的类型;目标对象的尺寸包括目标对象的高度、大小等;目标对象的形状可以为目标对象外部轮廓的形状,包括但不限于在水平面上的投影形状;目标对象的移动特性可以包括目标对象为移动或静止、目标对象的移动方向、移动速度等。可以根据目标对象的类型、尺寸、形状和移动特性等规划预设轨迹,使得目标对象在拍摄画面中所占的比例、拍摄目标在拍摄画面中的位置等满足预设要求。Exemplarily, firstly, a preset track running around the target object is generated, so as to control the movable platform to run around the target object along the preset track. Wherein, the preset trajectory can be determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, and the system can be the control system of the movable platform, or other computing systems capable of communicating with the movable platform equipment. Wherein, the type of the target object may include the corresponding type of the target object in preset categories such as people, animals, plants, buildings, etc.; the size of the target object may include the height, size, etc. of the target object; the shape of the target object may be The shape of the outline includes but is not limited to the projected shape on the horizontal plane; the moving characteristics of the target object may include whether the target object is moving or stationary, the moving direction and moving speed of the target object, and the like. The preset trajectory can be planned according to the type, size, shape, and movement characteristics of the target object, so that the proportion of the target object in the shooting frame, the position of the shooting target in the shooting frame, etc. meet the preset requirements.
或者,预设轨迹可以是响应用户的设置指令确定的。例如,用户输入设置指令的方式可以实现为通过与可移动平台通信连接的控制装置、在实时的拍摄画面上绘制预设轨迹,也可以实现为通过控制装置输入预设轨迹的相关参数,从而使控制装置或可移动平台根据相关参数生成预设轨迹。Alternatively, the preset trajectory may be determined in response to a user's setting instruction. For example, the way for the user to input the setting instruction can be implemented as drawing a preset trajectory on the real-time shooting screen through the control device connected to the mobile platform in communication, or it can be realized as inputting the relevant parameters of the preset trajectory through the control device, so that A control device or a movable platform generates a preset trajectory according to relevant parameters.
之后,在步骤S320,基于步骤S310中获取的多帧图像生成全景视频。示例性地,首先对多帧图像进行预处理,之后基于预处理后的图像生成全景视频。对多帧图像进行的预处理减小了首帧图像与末帧图像之间的差异,使得在生成的全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。对图像进行预处理方法可以参照生成全景视频的方法100中的相关描述。Afterwards, in step S320, a panoramic video is generated based on the multi-frame images acquired in step S310. Exemplarily, multi-frame images are firstly preprocessed, and then a panoramic video is generated based on the preprocessed images. The preprocessing performed on the multi-frame images reduces the difference between the first frame image and the last frame image, so that in the generated panoramic video, the image displacement between the first frame and the last frame is less than or equal to the second preset threshold. For a method of preprocessing an image, reference may be made to related descriptions in the method 100 for generating a panoramic video.
在生成全景视频后,还包括显示全景视频的步骤。示例性地,在显示全景视频时,可以同步显示全景视频和与全景视频关联的进度条,进度条用于描述预设轨迹,以及描述当前时刻显示的全景视频在预设轨迹中对应的位置,并且,进度条描述的预设轨迹首尾相连。在播放过程中,全景视频可以自动切换视角;也可以跟随用户对进度条的调节而切换视角。After the panoramic video is generated, a step of displaying the panoramic video is also included. For example, when displaying the panoramic video, the panoramic video and the progress bar associated with the panoramic video can be displayed synchronously, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track, Moreover, the preset tracks described by the progress bar are connected end to end. During the playing process, the panoramic video can automatically switch the angle of view; it can also switch the angle of view following the user's adjustment of the progress bar.
综上所述,本发明实施例的生成全景视频的方法300通过可移动平台的拍摄装置拍摄图像,拍摄轨迹更加灵活,并且能够生成首尾平滑过渡的高质量的全景视频。To sum up, the method 300 for generating a panoramic video according to the embodiment of the present invention captures an image by a camera on a movable platform, the shooting track is more flexible, and a high-quality panoramic video with a smooth transition from the beginning to the end can be generated.
如图4所示,本发明实施例还提供一种生成全景视频的装置400,该生成全景视频的装置400包括一个或多个存储器410以及一个或多个处理器420,当然,根据需要,生成全景视频的装置400也可以具有其他组件和结构,例如通信接口、显示器等。处理器420用于执行存储器410中存储的程序指令,使得处理器420执行前文中的生成全景视频的方法的步骤,其中,为了避免 重复,对于一些步骤的细节描述可以参考前文,在此不再赘述。As shown in Figure 4, the embodiment of the present invention also provides a device 400 for generating a panoramic video, the device 400 for generating a panoramic video includes one or more memories 410 and one or more processors 420, of course, according to needs, generate The panoramic video device 400 may also have other components and structures, such as a communication interface, a display, and the like. The processor 420 is configured to execute the program instructions stored in the memory 410, so that the processor 420 executes the steps of the method for generating a panoramic video above, wherein, in order to avoid repetition, the detailed description of some steps can refer to the above, and will not be repeated here. repeat.
具体地,存储器410用于存储在生成全景视频的过程中产生的各种数据和可执行程序指令,例如用于存储各种应用程序或实现各种具体功能的算法。可以包括一个或多个计算机程序产品,计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。Specifically, the memory 410 is used for storing various data and executable program instructions generated during the process of generating the panoramic video, for example, for storing various application programs or algorithms for realizing various specific functions. One or more computer program products may be included, and computer program products may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include random access memory (RAM) and/or cache memory (cache), etc., for example. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, and the like.
处理器420可以是中央处理单元(CPU)、图像处理单元(GPU)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元,并且可以控制装置400中的其它组件以执行期望的功能。例如,处理器420可以包括一个或多个嵌入式处理器、处理器核心、微型处理器、逻辑电路、硬件有限状态机(FSM)、数字信号处理器(DSP)、图像处理单元(GPU)或它们的组合。The processor 420 may be a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other forms of processing with data processing capabilities and/or instruction execution capabilities. unit, and can control other components in apparatus 400 to perform desired functions. For example, processor 420 may include one or more embedded processors, processor cores, microprocessors, logic circuits, hardware finite state machines (FSMs), digital signal processors (DSPs), graphics processing units (GPUs) or their combination.
在一个实施例中,存储器410中存储的指令被处理器420执行时,使得处理器执行以下步骤:获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,第一图像是在可移动平台沿预设轨迹环绕目标对象运行的过程中拍摄的;对第一图像进行预处理,以得到第二图像,其中,预处理用于使多帧第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;基于多帧第二图像生成全景视频。In one embodiment, when the instructions stored in the memory 410 are executed by the processor 420, the processor executes the following steps: acquiring multiple frames of first images obtained by photographing the target object at different angles by the photographing device of the movable platform, the first An image is taken while the movable platform is running around a target object along a preset trajectory; preprocessing is performed on the first image to obtain a second image, wherein the preprocessing is used to make the last image in multiple frames of the first image A smooth transition between the first frame of the first image and the first frame of the first image; generating a panoramic video based on multiple frames of the second image.
示例性地,对第一图像进行预处理,包括:获取相邻帧第一图像对应的拍摄装置的位姿之间的实际位移;对实际位移进行调节,以得到目标位移,其中,末帧第一图像到首帧第一图像之间的第一目标位移,小于末帧第一图像到首帧第一图像之间的第一实际位移;根据目标位移对第一图像进行映射,以得到第二图像。Exemplarily, the preprocessing of the first image includes: obtaining the actual displacement between the poses of the shooting device corresponding to the first image of the adjacent frame; adjusting the actual displacement to obtain the target displacement, wherein the last frame of the first image The first target displacement between an image and the first image of the first frame is smaller than the first actual displacement between the first image of the last frame and the first image of the first frame; the first image is mapped according to the target displacement to obtain the second image.
示例性地,根据目标位移对第一图像进行映射,以得到第二图像,包括:根据目标位移和拍摄装置的内参矩阵得到第一图像与第二图像之间的第一单应性矩阵;根据第一单应性矩阵对第一图像进行映射,以得到第二图像。Exemplarily, the mapping of the first image according to the target displacement to obtain the second image includes: obtaining the first homography matrix between the first image and the second image according to the target displacement and the internal reference matrix of the shooting device; The first homography matrix maps the first image to obtain the second image.
示例性地,对实际位移进行调节,以得到目标位移,包括:获取末帧第一图像到首帧第一图像之间的目标位移与末帧第一图像到首帧第一图像之间的实际位移的偏差;将偏差分配到其余各帧第一图像之间。Exemplarily, adjusting the actual displacement to obtain the target displacement includes: obtaining the target displacement between the first image in the last frame and the first image in the first frame and the actual displacement between the first image in the last frame and the first image in the first frame. Bias of displacement; distributes the bias between the first images of the remaining frames.
示例性地,将偏差分配到其余各帧第一图像之间,包括:对偏差进行线 性分配,使得在各帧第一图像之间的实际位移的基础上,增加或减少部分偏差。Exemplarily, distributing the deviation among the remaining first images of each frame includes: linearly distributing the deviation, so that part of the deviation is increased or decreased on the basis of the actual displacement between the first images of each frame.
示例性地,对实际位移进行调节,还包括:根据分配偏差后的实际位移得到位移分布曲线;对位移分布曲线进行平滑处理;对平滑处理后的位移分布曲线进行差分,以得到各帧第一图像之间的目标位移。Exemplarily, adjusting the actual displacement further includes: obtaining a displacement distribution curve according to the actual displacement after the distribution deviation; smoothing the displacement distribution curve; and performing a difference on the smoothed displacement distribution curve to obtain the first Object displacement between images.
示例性地,获取相邻帧第一图像对应的拍摄装置的位姿之间的实际位移,包括:提取第一图像中的特征点,对相邻帧第一图像中的特征点进行匹配,以得到相邻帧第一图像的匹配特征点对;根据匹配特征点对得到相邻帧第一图像之间的实际位移。Exemplarily, obtaining the actual displacement between the poses of the shooting device corresponding to the first images of adjacent frames includes: extracting feature points in the first images, and matching the feature points in the first images of adjacent frames to Obtain the matching feature point pairs of the first images of adjacent frames; and obtain the actual displacement between the first images of adjacent frames according to the matching feature point pairs.
示例性地,根据匹配特征点对得到相邻帧第一图像之间的实际位移,包括:根据匹配特征点对进行非线性优化,以得到相邻帧第一图像之间的第二单应性矩阵;根据第二单应性矩阵和拍摄装置的内参矩阵,得到相邻帧第一图像之间的实际位移。Exemplarily, obtaining the actual displacement between the first images of adjacent frames according to the pair of matching feature points includes: performing nonlinear optimization according to the pair of matching feature points to obtain the second homography between the first images of adjacent frames matrix; according to the second homography matrix and the internal reference matrix of the shooting device, the actual displacement between the first images of adjacent frames is obtained.
示例性地,获取相邻帧第一图像对应的拍摄装置的位姿之间的实际位移,包括:根据拍摄第一图像的过程中、可移动平台的惯性测量装置测得的惯性测量数据得到实际位移。Exemplarily, obtaining the actual displacement between the poses of the photographing device corresponding to the first image of adjacent frames includes: obtaining the actual displacement according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of photographing the first image displacement.
示例性地,对实际位移进行调节,以得到目标位移,包括:分别对不同维度的实际位移进行调节,以得到不同维度的目标位移。Exemplarily, adjusting the actual displacement to obtain the target displacement includes: respectively adjusting the actual displacement in different dimensions so as to obtain the target displacement in different dimensions.
示例性地,实际位移包括实际旋转角度和实际平移量中的至少一个;对实际位移进行调节,以得到目标位移,包括以下至少一项:对实际旋转角度进行调节,以得到目标旋转角度;对实际平移量进行调节,以得到目标平移量。Exemplarily, the actual displacement includes at least one of an actual rotation angle and an actual translation amount; adjusting the actual displacement to obtain a target displacement includes at least one of the following: adjusting the actual rotation angle to obtain a target rotation angle; The actual translation amount is adjusted to obtain the target translation amount.
示例性地,处理器420还用于:根据预设条件在末尾的至少两帧第一图像中选择末帧第一图像。例如,可以分别对末尾的至少两帧第一图像与首帧第一图像进行匹配,将与首帧第一图像之间的匹配特征点对的数量最多的一帧第一图像作为末帧第一图像。或者,可以分别获取末尾的至少两帧第一图像与首帧第一图像之间的实际位移;将实际位移最小的一帧第一图像作为末帧第一图像。Exemplarily, the processor 420 is further configured to: select the first image of the last frame from at least two last first images of the frame according to a preset condition. For example, at least two frames of the first image at the end can be matched with the first frame of the first image, and the first frame of the first image with the largest number of matching feature point pairs between the first frame of the first image can be used as the first frame of the last frame. image. Alternatively, the actual displacement between at least two frames of the first image at the end and the first image of the first frame may be obtained respectively; and the frame of the first image with the smallest actual displacement is used as the first image of the last frame.
示例性地,对第一图像进行预处理,还包括:对多帧第一图像的亮度进行平滑处理,以降低末帧第一图像与首帧第一图像之间的亮度差异。Exemplarily, the preprocessing of the first image further includes: smoothing brightness of multiple frames of the first image, so as to reduce brightness difference between the last frame of the first image and the first frame of the first image.
生成全景视频后,处理器420还用于:同步显示全景视频和与全景视频 关联的进度条,进度条用于描述预设轨迹,以及描述当前时刻显示的全景视频在预设轨迹中对应的位置,并且,进度条描述的预设轨迹首尾相连。示例性地,处理器420还用于:根据用户指令生成预设轨迹;控制可移动平台沿预设轨迹环绕目标对象运行;在可移动平台沿预设轨迹环绕目标对象运行的过程中,控制拍摄装置拍摄第一图像。After the panoramic video is generated, the processor 420 is also used to: synchronously display the panoramic video and the progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end. Exemplarily, the processor 420 is also configured to: generate a preset trajectory according to user instructions; control the movable platform to run around the target object along the preset trajectory; The device captures a first image.
在另一个实施例中,存储器410中存储的指令被处理器420执行时,使得处理器执行以下步骤:In another embodiment, when the instructions stored in the memory 410 are executed by the processor 420, the processor is made to perform the following steps:
获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,图像是在可移动平台沿预设轨迹环绕目标对象运行的过程中拍摄的,其中,预设轨迹的首尾两端的位移大于或等于第一预设阈值;Obtain multi-frame images of the target object captured by the shooting device of the movable platform at different angles, and the images are taken during the process of the movable platform orbiting the target object along the preset trajectory, wherein the first and last ends of the preset trajectory are The displacement is greater than or equal to a first preset threshold;
基于多帧图像生成全景视频,其中,在全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。A panoramic video is generated based on multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
进一步地,在获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像之前,还包括:响应用户的拍摄指令,控制可移动平台沿预设轨迹环绕目标对象进行拍摄。其中,目标对象可以是基于用户的选取指令确定的,或者,目标对象是基于图像进行识别的。预设轨迹可以是系统基于目标对象的类型、尺寸、形状或移动特性中的一种或多种确定的,或者,预设轨迹可以是响应用户的设置指令确定的。Further, before acquiring multiple frames of images obtained by the shooting device of the movable platform shooting the target object at different angles, it also includes: responding to a user's shooting instruction, controlling the movable platform to shoot around the target object along a preset trajectory. Wherein, the target object may be determined based on a user's selection instruction, or the target object may be identified based on an image. The preset trajectory may be determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, or the preset trajectory may be determined in response to a user's setting instruction.
以上描述了生成全景视频的装置400各部件的主要功能,进一步的细节可以参照上文生成全景视频的方法100和生成全景视频的方法300中的相关描述,在此不做赘述。The above describes the main functions of the components of the apparatus 400 for generating a panoramic video. For further details, refer to the related descriptions in the method 100 for generating a panoramic video and the method 300 for generating a panoramic video, and details are not repeated here.
本发明实施例另一方面提供一种可移动平台,包括可移动平台本体和拍摄装置,拍摄装置搭载在所述可移动平台本体上,用于对目标对象进行拍摄;可移动平台还包括生成全景视频的装置400,生成全景视频的装置400与拍摄装置通信连接,用于基于拍摄装置拍摄的图像生成全景视频。Another aspect of the embodiments of the present invention provides a movable platform, including a movable platform body and a photographing device, and the photographing device is mounted on the movable platform body for photographing a target object; The device 400 for video, the device 400 for generating a panoramic video is communicatively connected with the shooting device, and is used for generating a panoramic video based on an image captured by the shooting device.
示例性地,可移动平台可以包括飞行器(例如无人机)、机器人、无人车、无人船等。下面以飞行器为例对可移动平台进行描述,但可以理解的是,这并不意欲对本申请的应用场景构成限制。本领域技术人员应该了解,本文所描述的关于飞行器的任何实施例适用于任何飞行器(如无人飞行器,也称无人机)。Exemplarily, the movable platform may include an aircraft (such as a drone), a robot, an unmanned vehicle, an unmanned boat, and the like. The mobile platform is described below by taking an aircraft as an example, but it can be understood that this is not intended to limit the application scenario of the present application. Those skilled in the art should understand that any embodiments described herein regarding aircraft are applicable to any aircraft (such as unmanned aerial vehicles, also called unmanned aerial vehicles).
飞行器可以包括处理器、存储器、动力机构,传感系统、以及通讯系统。 这些组件通过总线系统和/或其它形式的连接机构互连。在一些实施例中,拍摄装置可以通过云台等承载体设置在飞行器上。Aircraft may include processors, memory, powertrains, sensing systems, and communication systems. These components are interconnected by bus systems and/or other forms of connection mechanisms. In some embodiments, the photographing device can be set on the aircraft through a carrier such as a pan/tilt.
动力机构可以包括一个或者多个旋转体、螺旋桨、桨叶、引擎、电机、轮子、轴承、磁铁、喷嘴。例如,动力机构的旋转体可以是自紧固旋转体、旋转体组件、或者其它的旋转体动力单元。飞行器可以有一个或多个动力机构。所有的动力机构可以是相同的类型。可选的,一个或者多个动力机构可以是不同的类型。动力机构可以通过合适的手段安装在飞行器上,如通过支撑元件(如驱动轴)。动力机构可以安装在飞行器任何合适的位置,如顶端、下端、前端、后端、侧面或者其中的任意结合。The power mechanism may include one or more rotating bodies, propellers, paddles, engines, motors, wheels, bearings, magnets, nozzles. For example, the rotating body of the power mechanism may be a self-fastening rotating body, a rotating body assembly, or other rotating body power units. An aircraft can have one or more power units. All power mechanisms can be of the same type. Optionally, one or more power mechanisms may be of different types. The power unit can be mounted on the aircraft by suitable means, such as via support elements (eg drive shafts). The power mechanism can be installed in any suitable position of the aircraft, such as top, bottom, front, rear, side or any combination thereof.
在某些实施例中,动力机构能够使飞行器垂直地从表面起飞,或者垂直地降落在表面上,而不需要飞行器任何水平运动(如不需要在跑道上滑行)。可选的,动力机构可以允许飞行器在空中预设位置和/或方向盘旋。一个或者多个动力机构在受到控制时可以独立于其它的动力机构。可选的,一个或者多个动力机构可以同时受到控制。例如,飞行器可以有多个水平方向的旋转体,以追踪目标的提升及/或推动。水平方向的旋转体可以被致动以提供飞行器垂直起飞、垂直降落、盘旋的能力。在某些实施例中,水平方向的旋转体中的一个或者多个可以顺时针方向旋转,而水平方向的旋转体中的其它一个或者多个可以逆时针方向旋转。例如,顺时针旋转的旋转体与逆时针旋转的旋转体的数量一样。每一个水平方向的旋转体的旋转速率可以独立变化,以实现每个旋转体导致的提升及/或推动操作,从而调整飞行器的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)。In some embodiments, the power mechanism is capable of causing the aircraft to take off vertically from a surface, or land vertically on a surface, without requiring any horizontal motion of the aircraft (eg, without taxiing on a runway). Optionally, the power mechanism may allow the aircraft to hover at a preset position and/or direction in the air. One or more powered mechanisms may be controlled independently of other powered mechanisms. Optionally, one or more power mechanisms can be controlled simultaneously. For example, an aircraft may have multiple horizontally oriented rotators to track the lifting and/or pushing of objects. The rotating body in the horizontal direction can be actuated to provide the capability of the aircraft to take off vertically, land vertically, and hover. In some embodiments, one or more of the horizontally oriented rotators may rotate clockwise, while the other one or more of the horizontally oriented rotators may rotate counterclockwise. For example, there are as many rotators that rotate clockwise as there are rotators that rotate counterclockwise. The rate of rotation of each horizontal rotator can be varied independently to achieve the lift and/or push action caused by each rotator, thereby adjusting the spatial orientation, velocity, and/or acceleration of the aircraft (e.g., relative to up to three free-wheeling degrees of rotation and translation).
传感系统可以包括一个或者多个传感器,以感测飞行器的空间方位、速度及/或加速度(如相对于多达三个自由度的旋转及平移)。所述一个或者多个传感器包括前述描述的任何传感器,包括GPS传感器、运动传感器、惯性传感器、近程传感器或者影像传感器。传感系统提供的感测数据可以用于追踪目标的空间方位、速度及/或加速度。可选的,传感系统可以用于采集飞行器的环境的数据,如气候条件、要接近的潜在的障碍、地理特征的位置、人造结构的位置、图像信息等。The sensing system may include one or more sensors to sense the spatial orientation, velocity and/or acceleration (eg, rotation and translation with respect to up to three degrees of freedom) of the aircraft. The one or more sensors include any of the aforementioned sensors, including GPS sensors, motion sensors, inertial sensors, proximity sensors, or image sensors. The sensing data provided by the sensing system can be used to track the spatial orientation, velocity and/or acceleration of the target. Optionally, the sensing system may be used to collect data about the aircraft's environment, such as weather conditions, potential obstacles to approach, locations of geographic features, locations of man-made structures, image information, and the like.
通讯系统能够实现与具有通讯系统的控制装置通过无线信号进行通讯。通讯系统、可以包括任何数量的用于无线通讯的发送器、接收器、及/或收发器。所述通讯可以是单向通讯,这样数据可以从一个方向发送。例如,单向 通讯可以包括,只有飞行器传送数据给控制装置,或者反之亦然。通讯系统的一个或者多个发送器可以发送数据给通讯系统的一个或者多个接收器,反之亦然。可选的,所述通讯可以是双向通讯,这样,数据可以在飞行器与控制装置之间在两个方向传输。双向通讯包括通讯系统的一个或者多个发送器可以发送数据给通讯系统的一个或者多个接收器,及反之亦然。The communication system can communicate with the control device with the communication system through wireless signals. A communication system may include any number of transmitters, receivers, and/or transceivers for wireless communication. The communication may be one-way communication, such that data is sent in one direction. For example, one-way communication may include that only the aircraft transmits data to the control device, or vice versa. One or more transmitters of the communication system can send data to one or more receivers of the communication system, and vice versa. Optionally, the communication may be bi-directional, so that data can be transmitted in both directions between the aircraft and the control means. Two-way communication involves that one or more transmitters of the communication system can send data to one or more receivers of the communication system, and vice versa.
在某些实施例中,控制装置可以向飞行器、承载体及拍摄装置中的一个或者多个提供控制数据,并且从飞行器、承载体及拍摄装置中的一个或者多个中接收信息(如飞行器、承载体或者拍摄装置的位置及/或运动信息,拍摄装置例如相机捕获的影像数据等)。在某些实施例中,控制装置的控制数据可以包括关于位置、运动、致动的指令,或者对飞行器、承载体及/或拍摄装置的控制。例如,控制数据可以导致飞行器位置及/或方向的改变(如通过控制动力机构),或者导致承载体相对于飞行器的运动(如通过对承载体的控制)。控制装置的控制数据可以导致拍摄装置控制,如控制相机或者其它拍摄装置的操作(捕获静止或者运动的影像、变焦、开启或关闭、切换拍摄模式、改变影像分辨率、改变焦距、改变景深、改变曝光时间、改变可视角度或者视场)。在某些实施例中,飞行器、承载体及/或拍摄装置的通讯可以包括一个或者多个传感器(如传感系统或者拍摄装置)发出的信息。所述通讯可以包括从一个或者多个不同类型的传感器(如GPS传感器、运动传感器、惯性传感器、近程传感器或者影像传感器)传送的感应信息。所述感应信息是关于飞行器、承载体及/或拍摄装置的位置(如方向、位置)、运动、或者加速度。从拍摄装置传送的感应信息包括拍摄装置捕获的数据或者拍摄装置的状态。控制装置传送提供的控制数据可以用于追踪飞行器、承载体或者拍摄装置中一个或者多个的状态。可选的或者同时地,承载体及拍摄装置每一个都可以包括通讯模块,用于与控制装置通讯,以便控制装置可以单独地通讯或者追踪飞行器、承载体及拍摄装置。In some embodiments, the control device can provide control data to one or more of the aircraft, the carrier, and the photographing device, and receive information from one or more of the aircraft, the carrier, and the photographing device (such as the aircraft, the carrier, and the photographing device). The position and/or motion information of the carrier or the photographing device, image data captured by the photographing device such as a camera, etc.). In some embodiments, the control data of the control device may include instructions about position, movement, actuation, or control of the aircraft, carrier and/or camera. For example, the control data may result in a change in the position and/or orientation of the aircraft (eg, by controlling a power mechanism), or cause a movement of the carrier relative to the aircraft (eg, by controlling the carrier). The control data of the control device can lead to the control of the shooting device, such as controlling the operation of the camera or other shooting devices (capturing still or moving images, zooming, turning on or off, switching shooting modes, changing image resolution, changing focal length, changing depth of field, changing exposure time, changing viewing angle or field of view). In some embodiments, the communication of the aircraft, the carrier and/or the camera may include information from one or more sensors (such as a sensor system or a camera). The communication may include sensory information transmitted from one or more sensors of different types, such as GPS sensors, motion sensors, inertial sensors, proximity sensors, or image sensors. The sensing information is about the position (such as direction, position), motion, or acceleration of the aircraft, carrier, and/or photographing device. The sensing information transmitted from the camera includes data captured by the camera or the state of the camera. The control data transmitted and provided by the control device can be used to track the status of one or more of the aircraft, the carrier or the camera device. Optionally or simultaneously, each of the carrier and the photographing device may include a communication module for communicating with the control device, so that the control device can communicate or track the aircraft, the carrier and the photographing device individually.
在某些实施例中,飞行器可以与除了控制装置之外的其它远程设备通讯,控制装置也可以与除飞行器之外的其它远程设备进行通讯。例如,飞行器及/或控制装置可以与另一个飞行器或者另一个飞行器的承载体或拍摄装置通讯。当有需要的时候,所述另外的远程设备可以是第二控制装置或者其它计算设备(如计算机、桌上型电脑、平板电脑、智能手机、或者其它移动设备)。该远程设备可以向飞行器传送数据,从飞行器接收数据,传送数据给控制装置, 及/或从控制装置接收数据。可选的,该远程设备可以连接到因特网或者其它电信网络,以使从飞行器及/或控制装置接收的数据上传到网站或者服务器上。In some embodiments, the aircraft may communicate with remote devices other than the control device, and the control device may also communicate with remote devices other than the aircraft. For example, the aircraft and/or the control device may communicate with another aircraft or with a carrier or camera of another aircraft. The additional remote device may be a second control device or other computing device (such as a computer, desktop, tablet, smart phone, or other mobile device), when desired. The remote device may transmit data to the aircraft, receive data from the aircraft, transmit data to the control device, and/or receive data from the control device. Optionally, the remote device may be connected to the Internet or other telecommunication network to allow data received from the aircraft and/or controls to be uploaded to a website or server.
在某些实施例中,飞行器的运动、承载体的运动及拍摄装置相对固定参照物(如外部环境)的运动,及/或者彼此间的运动,都可以由控制装置所控制。所述控制装置可以是远程控制终端,位于远离飞行器、承载体及/或拍摄装置的地方。控制装置可以位于或者粘贴于支撑平台上。可选的,所述控制装置可以是手持的或者穿戴式的。例如,所述控制装置可以包括智能手机、平板电脑、桌上型电脑、计算机、眼镜、手套、头盔、麦克风或者其中任意的结合。所述控制装置可以包括用户界面,如键盘、鼠标、操纵杆、触摸屏或者显示器。任何适合的用户输入可以与控制装置交互,如手动输入指令、声音控制、手势控制或者位置控制(如通过控制装置的运动、位置或者倾斜)。In some embodiments, the movement of the aircraft, the movement of the carrying body and the movement of the photographing device relative to a fixed reference object (such as the external environment), and/or the movement between them can all be controlled by the control device. The control device may be a remote control terminal located far away from the aircraft, carrier and/or photographing device. The control device may be located or attached to the support platform. Optionally, the control device may be handheld or wearable. For example, the control device may include a smart phone, a tablet computer, a desktop computer, a computer, glasses, gloves, a helmet, a microphone, or any combination thereof. The control means may comprise a user interface such as a keyboard, mouse, joystick, touch screen or display. Any suitable user input may interact with the control device, such as manual input commands, voice control, gesture control, or positional control (eg by movement, position or tilt of the control device).
飞行器可以包括一个或者多个存储器,存储器上存储有由所述处理器运行的计算机程序,例如用于存储用于实现根据本申请实施例的生成全景视频的方法中的相应步骤和程序指令。可以包括一个或多个计算机程序产品,所述计算机程序产品可以包括各种形式的计算机可读存储介质,例如易失性存储器和/或非易失性存储器。所述易失性存储器例如可以包括随机存取存储器(RAM)和/或高速缓冲存储器(cache)等。所述非易失性存储器例如可以包括只读存储器(ROM)、硬盘、闪存等。The aircraft may include one or more memories, on which are stored computer programs executed by the processor, for example, for storing corresponding steps and program instructions for implementing the method for generating panoramic video according to the embodiment of the present application. One or more computer program products may be included, which may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and/or cache memory (cache). The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, and the like.
飞行器可以包括一个或者多个处理器,处理器可以是中央处理单元(CPU)、图像处理单元(GPU)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者具有数据处理能力和/或指令执行能力的其它形式的处理单元,并且可以控制飞行器中的其它组件以执行期望的功能。所述处理器能够执行存储器中存储的程序指令,以执行上文描述的本申请实施例的生成全景视频的方法中的相关步骤。例如,处理器能够包括一个或多个嵌入式处理器、处理器核心、微型处理器、逻辑电路、硬件有限状态机(FSM)、数字信号处理器(DSP)或它们的组合。在本实施例中,所述处理器包括现场可编程门阵列(FPGA),或者一个或者多个ARM处理器。The aircraft may include one or more processors, and the processor may be a central processing unit (CPU), a graphics processing unit (GPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or have data processing capabilities and/or or other form of processing unit capable of executing instructions and may control other components in the aircraft to perform desired functions. The processor can execute the program instructions stored in the memory, so as to execute the relevant steps in the method for generating a panoramic video in the embodiment of the present application described above. For example, a processor can include one or more embedded processors, processor cores, microprocessors, logic circuits, hardware finite state machines (FSMs), digital signal processors (DSPs), or combinations thereof. In this embodiment, the processor includes a Field Programmable Gate Array (FPGA), or one or more ARM processors.
本发明实施例的可移动平台由于具有本发明实施例的生成全景视频的装置400,因此也具备类似的优点。Since the mobile platform in the embodiment of the present invention has the apparatus 400 for generating panoramic video in the embodiment of the present invention, it also has similar advantages.
此外,本发明实施例还提供一种计算机存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现生成全景视频的方法100或300的步 骤。计算机存储介质例如可以包括智能电话的存储卡、平板电脑的存储部件、个人计算机的硬盘、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器、或者上述存储介质的任意组合。所述计算机可读存储介质可以是一个或多个计算机可读存储介质的任意组合。In addition, an embodiment of the present invention also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method 100 or 300 for generating a panoramic video are implemented. Computer storage media may include, for example, a memory card of a smartphone, a memory component of a tablet computer, a hard disk of a personal computer, read only memory (ROM), erasable programmable read only memory (EPROM), portable compact disk ROM ( CD-ROM), USB memory, or any combination of the above storage media. The computer readable storage medium can be any combination of one or more computer readable storage medium.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
尽管这里已经参考附图描述了示例实施例,应理解上述示例实施例仅仅是示例性的,并且不意图将本发明的范围限制于此。本领域普通技术人员可以在其中进行各种改变和修改,而不偏离本发明的范围和精神。所有这些改变和修改意在被包括在所附权利要求所要求的本发明的范围之内。Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above-described example embodiments are exemplary only and are not intended to limit the scope of the invention thereto. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。例如,以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个设备,或一些特征可以忽略,或不执行。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another device, or some features may be omitted, or not implemented.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本发明并帮助理解各个发明方面中的一个或多个,在对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该本发明的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如相应的权利要求书所反映的 那样,其发明点在于可以用少于某个公开的单个实施例的所有特征的特征来解决相应的技术问题。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be understood that in the description of the exemplary embodiments of the invention, in order to streamline the disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure , or in its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the corresponding claims reflect, the inventive point lies in that the corresponding technical problem can be solved by using less than all features of a single disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域的技术人员可以理解,除了特征之间相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的替代特征来代替。It will be appreciated by those skilled in the art that all features disclosed in this specification (including accompanying claims, abstract and drawings) and all features of any method or apparatus so disclosed may be used in any combination, except where the features are mutually exclusive. process or unit. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的一些模块的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some modules according to the embodiments of the present invention. The present invention can also be implemented as an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
以上所述,仅为本发明的具体实施方式或对具体实施方式的说明,本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention or a description of the specific embodiment, and the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily Any changes or substitutions that come to mind should be covered within the protection scope of the present invention. The protection scope of the present invention should be based on the protection scope of the claims.

Claims (46)

  1. 一种生成全景视频的方法,其特征在于,所述方法包括:A method for generating panoramic video, characterized in that the method comprises:
    获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,所述第一图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的;Obtain multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform, and the first images are taken while the movable platform is running around the target object along a preset track ;
    对所述第一图像进行预处理,以得到第二图像,其中,所述预处理用于使多帧所述第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;Preprocessing the first image to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
    基于多帧所述第二图像生成全景视频。A panoramic video is generated based on multiple frames of the second image.
  2. 根据权利要求1所述的方法,其特征在于,所述对所述第一图像进行预处理,包括:The method according to claim 1, wherein said preprocessing the first image comprises:
    获取相邻帧所述第一图像对应的所述拍摄装置的位姿之间的实际位移;Acquiring the actual displacement between the poses of the photographing device corresponding to the first image in adjacent frames;
    对所述实际位移进行调节,以得到目标位移,其中,所述末帧第一图像到所述首帧第一图像之间的第一目标位移,小于所述末帧第一图像到所述首帧第一图像之间的第一实际位移;adjusting the actual displacement to obtain a target displacement, wherein the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the first target displacement between the first image in the last frame and the first image in the first frame a first actual displacement between the first images of the frame;
    根据所述目标位移对所述第一图像进行映射,以得到所述第二图像。Mapping the first image according to the target displacement to obtain the second image.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述目标位移对所述第一图像进行映射,以得到所述第二图像,包括:The method according to claim 2, wherein said mapping said first image according to said target displacement to obtain said second image comprises:
    根据所述目标位移和所述拍摄装置的内参矩阵得到所述第一图像与所述第二图像之间的第一单应性矩阵;obtaining a first homography matrix between the first image and the second image according to the target displacement and the internal reference matrix of the photographing device;
    根据所述第一单应性矩阵对所述第一图像进行映射,以得到所述第二图像。Mapping the first image according to the first homography matrix to obtain the second image.
  4. 根据权利要求2或3所述的方法,其特征在于,所述对所述实际位移进行调节,以得到目标位移,包括:The method according to claim 2 or 3, wherein said adjusting said actual displacement to obtain a target displacement comprises:
    获取所述末帧第一图像到所述首帧第一图像之间的所述目标位移与所述末帧第一图像到所述首帧第一图像之间的所述实际位移的偏差;Acquiring a deviation between the target displacement between the first image in the last frame and the first image in the first frame and the actual displacement between the first image in the last frame and the first image in the first frame;
    将所述偏差分配到各帧所述第一图像之间。Distributing the offset between frames of the first image.
  5. 根据权利要求4所述的方法,其特征在于,所述将所述偏差分配到各帧所述第一图像之间,包括:The method according to claim 4, wherein the distributing the deviation between the first images of each frame comprises:
    对所述偏差进行线性分配,使得在各帧所述第一图像之间的所述实际位移的基础上,增加或减少部分所述偏差。The deviation is distributed linearly, so that part of the deviation is increased or decreased on the basis of the actual displacement between the frames of the first image.
  6. 根据权利要求4或5所述的方法,其特征在于,所述对所述实际位移进行调节,还包括:The method according to claim 4 or 5, wherein the adjusting the actual displacement further comprises:
    根据分配所述偏差后的所述实际位移得到位移分布曲线;Obtaining a displacement distribution curve according to the actual displacement after allocating the deviation;
    对所述位移分布曲线进行平滑处理;smoothing the displacement distribution curve;
    对平滑处理后的位移分布曲线进行差分,以得到各帧所述第一图像之间的所述目标位移。Performing a difference on the smoothed displacement distribution curves to obtain the target displacement between the first images in each frame.
  7. 根据权利要求2-6中任一项所述的方法,其特征在于,所述获取相邻帧所述第一图像对应的所述拍摄装置的位姿之间的实际位移,包括:The method according to any one of claims 2-6, wherein the acquiring the actual displacement between the poses of the photographing device corresponding to the first image in adjacent frames comprises:
    提取所述第一图像中的特征点,对相邻帧所述第一图像中的所述特征点进行匹配,以得到相邻帧所述第一图像的匹配特征点对;extracting feature points in the first image, and matching the feature points in the first image in adjacent frames to obtain matching feature point pairs in the first image in adjacent frames;
    根据所述匹配特征点对得到相邻帧所述第一图像之间的所述实际位移。The actual displacement between the first images in adjacent frames is obtained according to the pair of matching feature points.
  8. 根据权利要求7所述的方法,其特征在于,所述根据所述匹配特征点对得到相邻帧所述第一图像之间的所述实际位移,包括:The method according to claim 7, wherein the obtaining the actual displacement between the first images of adjacent frames according to the pair of matching feature points comprises:
    根据所述匹配特征点对进行非线性优化,以得到相邻帧所述第一图像之间的第二单应性矩阵;performing nonlinear optimization according to the matching feature point pairs to obtain a second homography matrix between the first images in adjacent frames;
    根据所述第二单应性矩阵和所述拍摄装置的内参矩阵,得到相邻帧所述第一图像之间的所述实际位移。The actual displacement between the first images in adjacent frames is obtained according to the second homography matrix and the internal reference matrix of the photographing device.
  9. 根据权利要求2-6中任一项所述的方法,其特征在于,所述获取相邻帧所述第一图像对应的拍摄装置的位姿之间的实际位移,包括:The method according to any one of claims 2-6, wherein the obtaining the actual displacement between the poses of the photographing device corresponding to the first image in adjacent frames comprises:
    根据拍摄所述第一图像的过程中、所述可移动平台的惯性测量装置测得的惯性测量数据得到所述实际位移。The actual displacement is obtained according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of capturing the first image.
  10. 根据权利要求2-9中任一项所述的方法,其特征在于,所述对所述实际位移进行调节,以得到目标位移,包括:The method according to any one of claims 2-9, wherein the adjusting the actual displacement to obtain the target displacement comprises:
    分别对不同维度的所述实际位移进行调节,以得到不同维度的所述目标位移。The actual displacements in different dimensions are respectively adjusted to obtain the target displacements in different dimensions.
  11. 根据权利要求2-10中任一项所述的方法,其特征在于,所述实际位移包括实际旋转角度和实际平移量中的至少一个;所述对所述实际位移进行调节,以得到目标位移,包括以下至少一项:The method according to any one of claims 2-10, wherein the actual displacement includes at least one of an actual rotation angle and an actual translation amount; the adjustment of the actual displacement is performed to obtain a target displacement , including at least one of the following:
    对所述实际旋转角度进行调节,以得到目标旋转角度;adjusting the actual rotation angle to obtain a target rotation angle;
    对所述实际平移量进行调节,以得到目标平移量。The actual translation amount is adjusted to obtain a target translation amount.
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,还包括:根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像。The method according to any one of claims 1-11, further comprising: selecting the first image of the last frame from at least two frames of the first images at the end according to preset conditions.
  13. 根据权利要求12所述的方法,其特征在于,所述根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像,包括:The method according to claim 12, wherein the selecting the first image of the last frame from at least two frames of the first images at the end according to preset conditions comprises:
    分别对末尾的至少两帧所述第一图像与首帧第一图像进行匹配,将与所述首帧第一图像之间的匹配特征点对的数量最多的一帧所述第一图像作为所 述末帧第一图像。Match the first image of at least two frames at the end with the first image of the first frame, and use the first image of the frame with the largest number of matching feature point pairs between the first image of the first frame as the first image. Describe the first image of the last frame.
  14. 根据权利要求12所述的方法,其特征在于,所述根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像,包括:The method according to claim 12, wherein the selecting the first image of the last frame from at least two frames of the first images at the end according to preset conditions comprises:
    分别获取末尾的至少两帧所述第一图像与首帧第一图像之间的实际位移;Respectively acquire the actual displacement between the first image of at least two frames at the end and the first image of the first frame;
    将所述实际位移最小的一帧所述第一图像作为所述末帧第一图像。The frame of the first image with the smallest actual displacement is used as the first image of the last frame.
  15. 根据权利要求2-14中任一项所述的方法,其特征在于,所述对所述第一图像进行预处理,还包括:The method according to any one of claims 2-14, wherein said preprocessing the first image further comprises:
    对多帧所述第一图像的亮度进行平滑处理,以降低所述末帧第一图像与所述首帧第一图像之间的亮度差异。Smoothing the brightness of the multiple frames of the first image to reduce the brightness difference between the last frame of the first image and the first frame of the first image.
  16. 根据权利要求1-15中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-15, further comprising:
    同步显示所述全景视频和与所述全景视频关联的进度条,所述进度条用于描述所述预设轨迹,以及描述当前时刻显示的所述全景视频在所述预设轨迹中对应的位置,并且,所述进度条描述的所述预设轨迹首尾相连。Synchronously displaying the panoramic video and a progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end.
  17. 根据权利要求1-16中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1-16, further comprising:
    根据用户指令生成所述预设轨迹;generating the preset trajectory according to a user instruction;
    控制所述可移动平台沿所述预设轨迹环绕所述目标对象运行;controlling the movable platform to run around the target object along the preset track;
    在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中,控制所述拍摄装置拍摄所述第一图像。During the process of the movable platform running around the target object along a preset trajectory, the photographing device is controlled to photograph the first image.
  18. 一种生成全景视频的方法,其特征在于,所述方法包括:A method for generating panoramic video, characterized in that the method comprises:
    获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,所述图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的,其中,所述预设轨迹的首尾两端的位移大于或等于第一预设阈值;Obtaining multiple frames of images obtained by the shooting device of the movable platform shooting the target object at different angles, the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
    基于所述多帧图像生成全景视频,其中,在所述全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。A panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  19. 根据权利要求18所述的方法,其特征在于,所述获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像之前,还包括:The method according to claim 18, characterized in that before acquiring the multi-frame images obtained by shooting the target object at different angles by the shooting device of the movable platform, further comprising:
    响应用户的拍摄指令,控制所述可移动平台沿所述预设轨迹环绕所述目标对象进行拍摄。In response to a user's shooting instruction, the movable platform is controlled to surround the target object along the preset trajectory to shoot.
  20. 根据权利要求19所述的方法,其特征在于,所述目标对象是基于用户的选取指令确定的,或者,所述目标对象是基于图像进行识别的。The method according to claim 19, wherein the target object is determined based on a user's selection instruction, or the target object is identified based on an image.
  21. 根据权利要求19所述的方法,其特征在于,所述预设轨迹是系统基于所述目标对象的类型、尺寸、形状或移动特性中的一种或多种确定的,或者,所述预设轨迹是响应用户的设置指令确定的。The method according to claim 19, wherein the preset trajectory is determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, or the preset trajectory The trajectory is determined in response to a user's setting instruction.
  22. 根据权利要求18-21中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 18-21, further comprising:
    同步显示所述全景视频和与所述全景视频关联的进度条,所述进度条用于描述所述预设轨迹,以及描述当前时刻显示的所述全景视频在所述预设轨迹中对应的位置,并且,所述进度条描述的所述预设轨迹首尾相连。Synchronously displaying the panoramic video and a progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end.
  23. 一种生成全景视频的装置,其特征在于,所述装置包括:A device for generating panoramic video, characterized in that the device comprises:
    存储器,用于存储可执行指令;memory for storing executable instructions;
    处理器,用于执行所述存储器中存储的所述指令,使得所述处理器执行以下步骤:a processor, configured to execute the instructions stored in the memory, so that the processor performs the following steps:
    获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧第一图像,所述第一图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中拍摄的;Obtain multiple frames of first images obtained by shooting the target object at different angles by the shooting device of the movable platform, and the first images are taken while the movable platform is running around the target object along a preset track ;
    对所述第一图像进行预处理,以得到第二图像,其中,所述预处理用于使多帧所述第一图像中的末帧第一图像到首帧第一图像之间平滑过渡;Preprocessing the first image to obtain a second image, wherein the preprocessing is used to make a smooth transition between the first image in the last frame and the first image in the first frame among the multiple frames of the first image;
    基于多帧所述第二图像生成全景视频。A panoramic video is generated based on multiple frames of the second image.
  24. 根据权利要求23所述的装置,其特征在于,所述对所述第一图像进行预处理,包括:The device according to claim 23, wherein said preprocessing the first image comprises:
    获取相邻帧所述第一图像对应的所述拍摄装置的位姿之间的实际位移;Acquiring the actual displacement between the poses of the photographing device corresponding to the first image in adjacent frames;
    对所述实际位移进行调节,以得到目标位移,其中,所述末帧第一图像到所述首帧第一图像之间的第一目标位移,小于所述末帧第一图像到所述首帧第一图像之间的第一实际位移;adjusting the actual displacement to obtain a target displacement, wherein the first target displacement between the first image in the last frame and the first image in the first frame is smaller than the first target displacement between the first image in the last frame and the first image in the first frame a first actual displacement between the first images of the frame;
    根据所述目标位移对所述第一图像进行映射,以得到所述第二图像。Mapping the first image according to the target displacement to obtain the second image.
  25. 根据权利要求14所述的装置,其特征在于,所述根据所述目标位移对所述第一图像进行映射,以得到所述第二图像,包括:The device according to claim 14, wherein said mapping said first image according to said target displacement to obtain said second image comprises:
    根据所述目标位移和所述拍摄装置的内参矩阵得到所述第一图像与所述第二图像之间的第一单应性矩阵;obtaining a first homography matrix between the first image and the second image according to the target displacement and the internal reference matrix of the photographing device;
    根据所述第一单应性矩阵对所述第一图像进行映射,以得到所述第二图像。Mapping the first image according to the first homography matrix to obtain the second image.
  26. 根据权利要求24或25所述的装置,其特征在于,所述对所述实际位移进行调节,以得到目标位移,包括:The device according to claim 24 or 25, wherein said adjusting said actual displacement to obtain a target displacement comprises:
    获取所述末帧第一图像到所述首帧第一图像之间的所述目标位移与所述末帧第一图像到所述首帧第一图像之间的所述实际位移的偏差;Acquiring a deviation between the target displacement between the first image in the last frame and the first image in the first frame and the actual displacement between the first image in the last frame and the first image in the first frame;
    将所述偏差分配到其余各帧所述第一图像之间。Distributing the offset among the remaining frames of the first image.
  27. 根据权利要求26所述的装置,其特征在于,所述将所述偏差分配到 其余各帧所述第一图像之间,包括:The device according to claim 26, wherein the distributing the deviation between the first images of the remaining frames comprises:
    对所述偏差进行线性分配,使得在各帧所述第一图像之间的所述实际位移的基础上,增加或减少部分所述偏差。The deviation is distributed linearly, so that part of the deviation is increased or decreased on the basis of the actual displacement between the frames of the first image.
  28. 根据权利要求26或27所述的装置,其特征在于,所述对所述实际位移进行调节,还包括:The device according to claim 26 or 27, wherein the adjusting the actual displacement further comprises:
    根据分配所述偏差后的所述实际位移得到位移分布曲线;Obtaining a displacement distribution curve according to the actual displacement after allocating the deviation;
    对所述位移分布曲线进行平滑处理;smoothing the displacement distribution curve;
    对平滑处理后的位移分布曲线进行差分,以得到各帧所述第一图像之间的所述目标位移。Performing a difference on the smoothed displacement distribution curves to obtain the target displacement between the first images in each frame.
  29. 根据权利要求24-28中任一项所述的装置,其特征在于,所述获取相邻帧所述第一图像对应的所述拍摄装置的位姿之间的实际位移,包括:The device according to any one of claims 24-28, wherein the acquiring the actual displacement between the poses of the shooting device corresponding to the first image in adjacent frames comprises:
    提取所述第一图像中的特征点,对相邻帧所述第一图像中的所述特征点进行匹配,以得到相邻帧所述第一图像的匹配特征点对;extracting feature points in the first image, and matching the feature points in the first image in adjacent frames to obtain matching feature point pairs in the first image in adjacent frames;
    根据所述匹配特征点对得到相邻帧所述第一图像之间的所述实际位移。The actual displacement between the first images in adjacent frames is obtained according to the pair of matching feature points.
  30. 根据权利要求29所述的装置,其特征在于,所述根据所述匹配特征点对得到相邻帧所述第一图像之间的所述实际位移,包括:The device according to claim 29, wherein the obtaining the actual displacement between the first images in adjacent frames according to the pair of matching feature points comprises:
    根据所述匹配特征点对进行非线性优化,以得到相邻帧所述第一图像之间的第二单应性矩阵;performing nonlinear optimization according to the matching feature point pairs to obtain a second homography matrix between the first images in adjacent frames;
    根据所述第二单应性矩阵和所述拍摄装置的内参矩阵,得到相邻帧所述第一图像之间的所述实际位移。The actual displacement between the first images in adjacent frames is obtained according to the second homography matrix and the internal reference matrix of the photographing device.
  31. 根据权利要求24-28中任一项所述的装置,其特征在于,所述获取相邻帧所述第一图像对应的拍摄装置的位姿之间的实际位移,包括:The device according to any one of claims 24-28, wherein the acquiring the actual displacement between the poses of the photographing device corresponding to the first image in adjacent frames comprises:
    根据拍摄所述第一图像的过程中、所述可移动平台的惯性测量装置测得的惯性测量数据得到所述实际位移。The actual displacement is obtained according to the inertial measurement data measured by the inertial measurement device of the movable platform during the process of capturing the first image.
  32. 根据权利要求24-31中任一项所述的装置,其特征在于,所述对所述实际位移进行调节,以得到目标位移,包括:The device according to any one of claims 24-31, wherein the adjusting the actual displacement to obtain the target displacement comprises:
    分别对不同维度的所述实际位移进行调节,以得到不同维度的所述目标位移。The actual displacements in different dimensions are respectively adjusted to obtain the target displacements in different dimensions.
  33. 根据权利要求24-32中任一项所述的装置,其特征在于,所述实际位移包括实际旋转角度和实际平移量中的至少一个;所述对所述实际位移进行调节,以得到目标位移,包括以下至少一项:The device according to any one of claims 24-32, wherein the actual displacement includes at least one of an actual rotation angle and an actual translation amount; the actual displacement is adjusted to obtain a target displacement , including at least one of the following:
    对所述实际旋转角度进行调节,以得到目标旋转角度;adjusting the actual rotation angle to obtain a target rotation angle;
    对所述实际平移量进行调节,以得到目标平移量。The actual translation amount is adjusted to obtain a target translation amount.
  34. 根据权利要求23-33中任一项所述的装置,其特征在于,所述处理器还用于:根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像。The device according to any one of claims 23-33, wherein the processor is further configured to: select the last frame first image from at least two last frames of the first image according to preset conditions. image.
  35. 根据权利要求34所述的装置,其特征在于,所述根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像,包括:The device according to claim 34, wherein the selecting the first image of the last frame from at least two frames of the first images at the end according to preset conditions comprises:
    分别对末尾的至少两帧所述第一图像与首帧第一图像进行匹配,将与所述首帧第一图像之间的匹配特征点对的数量最多的一帧所述第一图像作为所述末帧第一图像。Match the first image of at least two frames at the end with the first image of the first frame, and use the first image of the frame with the largest number of matching feature point pairs between the first image of the first frame as the first image. Describe the first image of the last frame.
  36. 根据权利要求34所述的装置,其特征在于,所述根据预设条件在末尾的至少两帧所述第一图像中选择所述末帧第一图像,包括:The device according to claim 34, wherein the selecting the first image of the last frame from at least two frames of the first images at the end according to preset conditions comprises:
    分别获取末尾的至少两帧所述第一图像与首帧第一图像之间的实际位移;Respectively acquire the actual displacement between the first image of at least two frames at the end and the first image of the first frame;
    将所述实际位移最小的一帧所述第一图像作为所述末帧第一图像。The frame of the first image with the smallest actual displacement is used as the first image of the last frame.
  37. 根据权利要求24-36中任一项所述的装置,其特征在于,所述对所述第一图像进行预处理,还包括:The device according to any one of claims 24-36, wherein the preprocessing the first image further comprises:
    对多帧所述第一图像的亮度进行平滑处理,以降低所述末帧第一图像与所述首帧第一图像之间的亮度差异。Smoothing the brightness of the multiple frames of the first image to reduce the brightness difference between the last frame of the first image and the first frame of the first image.
  38. 根据权利要求23-37中任一项所述的装置,其特征在于,所述处理器还用于:The device according to any one of claims 23-37, wherein the processor is further configured to:
    同步显示所述全景视频和与所述全景视频关联的进度条,所述进度条用于描述所述预设轨迹,以及描述当前时刻显示的所述全景视频在所述预设轨迹中对应的位置,并且,所述进度条描述的所述预设轨迹首尾相连。Synchronously displaying the panoramic video and a progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end.
  39. 根据权利要求23-38中任一项所述的装置,其特征在于,所述处理器还用于:The device according to any one of claims 23-38, wherein the processor is further configured to:
    根据用户指令生成所述预设轨迹;generating the preset trajectory according to a user instruction;
    控制所述可移动平台沿所述预设轨迹环绕所述目标对象运行;controlling the movable platform to run around the target object along the preset track;
    在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程中,控制所述拍摄装置拍摄所述第一图像。During the process of the movable platform running around the target object along a preset trajectory, the photographing device is controlled to photograph the first image.
  40. 一种生成全景视频的装置,其特征在于,所述装置包括:A device for generating panoramic video, characterized in that the device comprises:
    存储器,用于存储可执行指令;memory for storing executable instructions;
    处理器,用于执行所述存储器中存储的所述指令,使得所述处理器执行以下步骤:a processor, configured to execute the instructions stored in the memory, so that the processor performs the following steps:
    获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像,所述图像是在所述可移动平台沿预设轨迹环绕所述目标对象运行的过程 中拍摄的,其中,所述预设轨迹的首尾两端的位移大于或等于第一预设阈值;Obtaining multiple frames of images obtained by the shooting device of the movable platform shooting the target object at different angles, the images are taken during the process of the movable platform running around the target object along a preset trajectory, wherein the The displacement of the first and last ends of the preset trajectory is greater than or equal to the first preset threshold;
    基于所述多帧图像生成全景视频,其中,在所述全景视频中,首帧与末帧之间的图像位移小于或等于第二预设阈值。A panoramic video is generated based on the multiple frames of images, wherein, in the panoramic video, the image displacement between the first frame and the last frame is less than or equal to a second preset threshold.
  41. 根据权利要求40所述的装置,其特征在于,所述获取可移动平台的拍摄装置在不同角度下拍摄目标对象所得到的多帧图像之前,还包括:The device according to claim 40, wherein before the multi-frame images obtained by capturing the target object at different angles by the photographing device of the movable platform, further comprising:
    响应用户的拍摄指令,控制所述可移动平台沿所述预设轨迹环绕所述目标对象进行拍摄。In response to a user's shooting instruction, the movable platform is controlled to surround the target object along the preset trajectory to shoot.
  42. 根据权利要求40所述的装置,其特征在于,所述目标对象是基于用户的选取指令确定的,或者,所述目标对象是基于图像进行识别的。The device according to claim 40, wherein the target object is determined based on a user's selection instruction, or the target object is identified based on an image.
  43. 根据权利要求40所述的装置,其特征在于,所述预设轨迹是系统基于所述目标对象的类型、尺寸、形状或移动特性中的一种或多种确定的,或者,所述预设轨迹是响应用户的设置指令确定的。The device according to claim 40, wherein the preset trajectory is determined by the system based on one or more of the type, size, shape or movement characteristics of the target object, or the preset trajectory The trajectory is determined in response to a user's setting command.
  44. 根据权利要求40-43中任一项所述的装置,其特征在于,还包括:The device according to any one of claims 40-43, further comprising:
    同步显示所述全景视频和与所述全景视频关联的进度条,所述进度条用于描述所述预设轨迹,以及描述当前时刻显示的所述全景视频在所述预设轨迹中对应的位置,并且,所述进度条描述的所述预设轨迹首尾相连。Synchronously displaying the panoramic video and a progress bar associated with the panoramic video, the progress bar is used to describe the preset track, and describe the corresponding position of the panoramic video displayed at the current moment in the preset track , and the preset tracks described by the progress bar are connected end to end.
  45. 一种可移动平台,其特征在于,所述可移动平台包括:A mobile platform, characterized in that the mobile platform comprises:
    可移动平台本体;Movable platform body;
    拍摄装置,搭载在所述可移动平台本体上,用于对目标对象进行拍摄;A photographing device, mounted on the movable platform body, for photographing the target object;
    以及,如权利要求23-44中任一项所述的生成全景视频的装置,所述生成全景视频的装置与所述拍摄装置通信连接,用于基于所述拍摄装置拍摄的图像生成全景视频。And, the device for generating a panoramic video according to any one of claims 23-44, wherein the device for generating a panoramic video is communicatively connected to the shooting device, and is used to generate a panoramic video based on an image captured by the shooting device.
  46. 一种计算机存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现权利要求1至22中任一项所述的生成全景视频的方法。A computer storage medium on which a computer program is stored, wherein the method for generating panoramic video according to any one of claims 1 to 22 is implemented when the program is executed by a processor.
PCT/CN2021/095551 2021-05-24 2021-05-24 Method for generating panoramic video, apparatus, and mobile platform WO2022246608A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/095551 WO2022246608A1 (en) 2021-05-24 2021-05-24 Method for generating panoramic video, apparatus, and mobile platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/095551 WO2022246608A1 (en) 2021-05-24 2021-05-24 Method for generating panoramic video, apparatus, and mobile platform

Publications (1)

Publication Number Publication Date
WO2022246608A1 true WO2022246608A1 (en) 2022-12-01

Family

ID=84229274

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095551 WO2022246608A1 (en) 2021-05-24 2021-05-24 Method for generating panoramic video, apparatus, and mobile platform

Country Status (1)

Country Link
WO (1) WO2022246608A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857769A (en) * 2024-03-07 2024-04-09 长江龙新媒体有限公司 Self-adaptive multi-camera capturing and real-time free view video rendering method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539847A (en) * 2014-12-26 2015-04-22 宇龙计算机通信科技(深圳)有限公司 Panoramic photographing method and mobile terminal
CN106651773A (en) * 2016-11-30 2017-05-10 努比亚技术有限公司 Picture processing method and device
CN107071281A (en) * 2017-04-19 2017-08-18 珠海市魅族科技有限公司 Panorama shooting method and device
CN109003226A (en) * 2017-06-06 2018-12-14 中林信达(北京)科技信息有限责任公司 A kind of real-time joining method of panoramic picture and device
CN110099220A (en) * 2019-06-17 2019-08-06 广东中星微电子有限公司 A kind of panorama mosaic method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104539847A (en) * 2014-12-26 2015-04-22 宇龙计算机通信科技(深圳)有限公司 Panoramic photographing method and mobile terminal
CN106651773A (en) * 2016-11-30 2017-05-10 努比亚技术有限公司 Picture processing method and device
CN107071281A (en) * 2017-04-19 2017-08-18 珠海市魅族科技有限公司 Panorama shooting method and device
CN109003226A (en) * 2017-06-06 2018-12-14 中林信达(北京)科技信息有限责任公司 A kind of real-time joining method of panoramic picture and device
CN110099220A (en) * 2019-06-17 2019-08-06 广东中星微电子有限公司 A kind of panorama mosaic method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857769A (en) * 2024-03-07 2024-04-09 长江龙新媒体有限公司 Self-adaptive multi-camera capturing and real-time free view video rendering method and system

Similar Documents

Publication Publication Date Title
WO2018214078A1 (en) Photographing control method and device
US11644832B2 (en) User interaction paradigms for a flying digital assistant
US20210120191A1 (en) System and method for acquiring virtual and augmented reality scenes by a user
JP6496323B2 (en) System and method for detecting and tracking movable objects
US20200346750A1 (en) Method for generating flight path, control device, and unmanned aerial vehicle
CN108139799B (en) System and method for processing image data based on a region of interest (ROI) of a user
US20210133996A1 (en) Techniques for motion-based automatic image capture
KR101569600B1 (en) Two-dimensional image capture for an augmented reality representation
CN112567201A (en) Distance measuring method and apparatus
US20190011921A1 (en) Systems and methods for uav interactive instructions and control
CN107027014A (en) A kind of intelligent optical projection system of trend and its method
US20210112194A1 (en) Method and device for taking group photo
WO2020014987A1 (en) Mobile robot control method and apparatus, device, and storage medium
WO2023056544A1 (en) Object and camera localization system and localization method for mapping of the real world
WO2022021027A1 (en) Target tracking method and apparatus, unmanned aerial vehicle, system, and readable storage medium
WO2019140688A1 (en) Image processing method and apparatus and computer readable storage medium
WO2019183789A1 (en) Method and apparatus for controlling unmanned aerial vehicle, and unmanned aerial vehicle
WO2022246608A1 (en) Method for generating panoramic video, apparatus, and mobile platform
JP7435599B2 (en) Information processing device, information processing method, and program
WO2020151429A1 (en) Robot dog system and implementation method therefor
JP7006810B2 (en) 3D measuring device, mobile robot, push wheel type moving device and 3D measurement processing method
Zhang et al. Virtual Reality Aided High-Quality 3D Reconstruction by Remote Drones
WO2022021028A1 (en) Target detection method, device, unmanned aerial vehicle, and computer-readable storage medium
WO2021115192A1 (en) Image processing device, image processing method, program and recording medium
CN114463520A (en) Method and device for realizing Virtual Reality (VR) roaming

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE