WO2023221923A1 - Video processing method and apparatus, electronic device and storage medium - Google Patents

Video processing method and apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2023221923A1
WO2023221923A1 PCT/CN2023/094199 CN2023094199W WO2023221923A1 WO 2023221923 A1 WO2023221923 A1 WO 2023221923A1 CN 2023094199 W CN2023094199 W CN 2023094199W WO 2023221923 A1 WO2023221923 A1 WO 2023221923A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
preview
panoramic image
image data
posture
Prior art date
Application number
PCT/CN2023/094199
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 影石创新科技股份有限公司
Publication of WO2023221923A1 publication Critical patent/WO2023221923A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/738Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • This application relates to the field of image processing technology, and specifically to a video processing method, device, electronic equipment and storage medium.
  • the panoramic video is directly transmitted to other electronic devices.
  • the panoramic video since the panoramic video does not include the user during the recording process, The viewing angle requires the user to adjust the viewing angle to watch the video at the corresponding angle.
  • Embodiments of the present application provide a video processing method, device, electronic device, and storage medium.
  • the video processing method can play the video corresponding to the panoramic image data at the preview angle when the user previews the panoramic image.
  • embodiments of the present application provide a video processing method, including:
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
  • embodiments of the present application provide a video processing device, including:
  • the sending module is used to obtain the corresponding preview posture data when the user previews the panoramic picture, and sends the preview posture data to the recording device;
  • the acquisition module is used to obtain the panoramic image data sent by the recording device.
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
  • Extraction module used to extract preview pose data and panoramic image data from panoramic image data
  • the playback module is used to play the video corresponding to the panoramic image data based on the preview posture data.
  • embodiments of the present application provide an electronic device, including a memory storing executable program code, and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the method provided by the embodiment of the present application. steps in the video processing method or the data processing method.
  • embodiments of the present application provide a storage medium.
  • the storage medium stores a plurality of instructions, and the instructions are suitable for loading by the processor to execute steps in the video processing method or data processing method provided by the embodiments of the present application.
  • the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data.
  • the video can be played from the user's preview angle.
  • Figure 1 is a schematic diagram of a data transmission scenario between a recording device and a control device provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a three-dimensional space provided by an embodiment of the present application.
  • FIG. 3 is a first flowchart of the video processing method provided by the embodiment of the present application.
  • FIG. 4 is a second schematic flowchart of the video processing method provided by the embodiment of the present application.
  • FIG. 5 is a third flowchart of the video processing method provided by the embodiment of the present application.
  • Figure 6 is a first flow diagram of the data processing method provided by the embodiment of the present application.
  • Figure 7 is a schematic structural diagram of a video processing device provided by an embodiment of the present application.
  • Figure 8 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the panoramic video is directly transmitted to other electronic devices.
  • other electronic devices obtain the panoramic video, since the panoramic video does not include the user's data during the recording process, Viewing angle, users need to adjust the viewing angle themselves to watch the video at the corresponding angle.
  • embodiments of the present application provide a video processing method, device, electronic device, and storage medium.
  • This video processing method can be applied to VR (Virtual Reality, virtual reality) glasses, and can also be applied to various electronic devices such as smartphones and computers.
  • VR Virtual Reality, virtual reality
  • Figure 1 is a schematic diagram of a data transmission scenario between a recording device and a control device provided by an embodiment of the present application.
  • the recording device may record panoramic image data
  • the control device may preview the panoramic image recorded by the recording device
  • the control device may also be used to play the panoramic image data recorded by the recording device.
  • S1 is the control device
  • S2 is the recording device.
  • the control device can be VR glasses
  • the recording device can be a drone.
  • the drone is equipped with a 360-degree panoramic camera, and the recording device can record real-life scenes. panoramic picture in three-dimensional space.
  • control device can also be a mobile phone, computer or other electronic device with computing capabilities.
  • the recording device can also be an electronic device such as a panoramic camera.
  • the drones and VR glasses shown in Figure 1 are only examples and should not be regarded as limitations of this application.
  • the recording device can transmit the recorded panoramic image to the control device, and the user can preview and control the panoramic image through the control device.
  • the device will obtain the preview posture data corresponding to the user when previewing the panoramic image, and then send the preview posture data to the recording device.
  • the panoramic picture previewed by the user on the control device may be a low-definition picture.
  • the panoramic image data recorded by the recording device is the data corresponding to the original panoramic image, but if the recording device transmits the data corresponding to the original panoramic image to the control device, due to the large data size, a high delay will occur during the transmission process, which is not conducive to Users preview in real time.
  • the recording device can convert the acquired panoramic image data into preview panoramic image data with a lower resolution, and then send the preview panoramic image data to the control device.
  • the control device can preview the panoramic picture according to the preview panoramic image data, and the control device sends the preview data when the user previews the panoramic picture to the recording device.
  • the control device can obtain the preview posture data of the user when previewing the panoramic screen through sensors such as gyroscopes and acceleration sensors.
  • the recording device After the recording device receives the preview posture data, the recording device generates panoramic image data based on the recorded panoramic image data and preview posture data, and then the recording device sends the panoramic image data to the control device.
  • control device After the control device receives the panoramic image data, the control device extracts the panoramic image data to extract preview posture data and panoramic image data, and finally plays the video corresponding to the panoramic image data based on the preview posture data.
  • the control device can determine the user's preview angle based on the preview gesture data, and then play the video corresponding to the panoramic image data based on the preview angle.
  • Figure 2 is a schematic diagram of a three-dimensional space provided by an embodiment of the present application.
  • the control device can first determine the space center point A2, and then establish a three-dimensional space A1.
  • This three-dimensional space corresponds to the three-dimensional space where the recording device is located.
  • the position of the space center point in the three-dimensional space corresponds to the real three-dimensional space of the recording device. location in.
  • the north direction obtained by the recording device through the fusion magnetometer can be determined as the standard direction corresponding to the center point of the space, and then the three-dimensional space is established based on this standard direction.
  • the three-dimensional space is a virtual space.
  • the control device can render the preview panoramic image data in the three-dimensional space to obtain a preview panoramic picture.
  • the preview panoramic image data transmitted by the recording device is a data stream, it is rendered in three-dimensional space. What is dyed is panoramic video.
  • the control device can use sensors to record the user's corresponding preview posture data.
  • the user's corresponding preview posture data can be determined through data recorded by sensors such as gyroscopes and acceleration sensors.
  • the control device can obtain the user's preview posture data.
  • the user rotates his head to look in a certain direction, and the control device can record the preview posture data corresponding to that direction.
  • the preview posture data can be European. Pull angle data.
  • the Euler angle is a set of three independent angular parameters used to uniquely determine the position of a fixed-point rotating rigid body, consisting of the nutation angle ⁇ , the precession angle ⁇ and the rotation angle ⁇ .
  • the control device when the control device is rendering a panoramic image or panoramic video, the control device can determine the corresponding viewing angle B1 and viewing distance C1. Under the viewing angle B1 and viewing distance C1, the panoramic view is The picture previewed by the user is determined from the image or panoramic video. This screen is then displayed on the display area of the control device. Among them, the visible distance C1 is the distance between the space center point A2 and the space point A3.
  • FIG. 3 is a first flow diagram of the video processing method provided by the embodiment of the present application.
  • the video processing method may include the following steps:
  • the control device when the user uses the control device to preview the panoramic image sent by the recording device, the control device can record the user's preview gesture data and send the preview gesture data to the recording device.
  • the control device can use a gyroscope, acceleration sensor, etc. to obtain the user's corresponding preview gesture data.
  • the corresponding sensor data can be obtained through the sensor, and then the sensor data can be used to determine the user.
  • Preview attitude data for example, preview attitude data includes Euler angle data, angular velocity data, acceleration data, etc.
  • the control device can convert the user's mouse movement information or finger sliding information into Preview posture data corresponding to when the user previews the panoramic picture, such as mouse movement information or finger sliding information, is used to determine the direction selected by the user when previewing the panoramic picture, thereby determining the direction as the preview posture data.
  • control device after the control device obtains the user's preview gesture data, it can associate the preview gesture data with a specific time, and then send the preview gesture data after the associated time to the recording device.
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data.
  • the recording device after the control device sends the preview posture data to the recording device, the recording device generates panoramic image data based on the recorded panoramic image data and preview posture data.
  • Panoramic image data can be understood as data including image data and posture data.
  • the control device can receive the panoramic image data sent by the recording device through wireless communication.
  • the control device can analyze the panoramic image data to obtain panoramic image data and preview attitude data.
  • the control device can use a corresponding decoding method to decode the panoramic image data, thereby obtaining the panoramic image data and preview posture data.
  • control device can also determine the time information corresponding to the preview posture data and the time information corresponding to the panoramic image data, and then correspond the preview posture data and the panoramic image data at the same time.
  • control device when the control device parses the panoramic image data, the control device can smooth the panoramic image data to filter out useless data or noise data therein.
  • the control device can first determine the starting point of time that needs to be played, and then determine the preview gesture data and panoramic image data corresponding to the starting point of playing based on the starting point of time. Then the screen corresponding to the panoramic image data is rendered through the preview posture data in chronological order, thereby rendering the user's preview angle picture.
  • the control device plays the video corresponding to the panoramic image data.
  • control device can determine the user's preview angle based on the preview gesture data, and then play the video corresponding to the panoramic image data based on the preview angle.
  • the device that plays the video of the panoramic image data is not limited to the control device, but can also be other electronic devices with playback capabilities.
  • the control device can determine the user's preview angle in the three-dimensional space based on the Euler angle data, and determine the preview angle. corresponding screen.
  • the video corresponding to the panoramic image data is played at the user's preview angle.
  • the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data.
  • the video can be played from the user's preview angle.
  • FIG. 4 is a second schematic flowchart of the video processing method provided by an embodiment of the present application.
  • the video processing method may include the following steps:
  • the control device can use a gyroscope, acceleration sensor, etc. to obtain the user's corresponding preview gesture data.
  • the corresponding sensor data can be obtained through the sensor, and then the sensor data can be used to determine the user.
  • Preview attitude data for example, preview attitude data includes Euler angle data, angular velocity data, acceleration data, etc.
  • the control device can convert the user's mouse movement information or finger sliding information into corresponding preview gesture data when the user previews the panoramic picture.
  • mouse movement information or finger sliding information is used to determine the direction selected by the user when previewing the panoramic screen, thereby determining the direction. is the preview posture data.
  • control device may determine the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame, and then determine the first preview gesture data corresponding to the current video frame and the previous video frame The difference between the corresponding second preview pose data.
  • the first preview posture data is the first Euler angle data
  • the second posture data is the second Euler angle data
  • the control device converts the first Euler angle data of the current video frame into a first space vector, converts the second Euler angle data of the previous video frame into a second space vector, and finally determines the first space vector and the first space vector.
  • the difference between the first space vector and the second space vector is the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame.
  • control device can set a preset difference range, and the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame is within the preset difference range. Within the range, it is considered that the user's preview posture changes very little, for example, the user's head changes very little.
  • the preset difference range is 0 to 5 degrees
  • the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame is 4 degrees, then the current video frame is determined
  • the difference between the corresponding first preview gesture data and the second preview gesture data corresponding to the previous video frame is within a preset difference range.
  • the control device can stop sending the preview data of the current video frame to the recording device, reducing data transmission to the recording device, so that the amount of panoramic image data finally generated by the recording device based on the preview posture data and panoramic image data is smaller. . At the same time, it can reduce the transmission of useless data and improve the data transmission efficiency between the data control device and the recording device.
  • the difference if the difference is outside the preset difference range, it means that the user's preview posture has changed significantly compared with the current video frame and the previous video frame. At this time, the first preview posture data can be sent. Give recording equipment.
  • the recording device can determine the timestamp corresponding to the first preview gesture data, and then associate it with the panoramic image data of the same time based on the timestamp.
  • the recording device can associate the multi-frame preview posture data with its corresponding panoramic image data, thereby generating panoramic image data.
  • the preview posture data corresponding to time 10:01 is associated with its corresponding panoramic image data
  • the preview posture data corresponding to time 10:02 is associated with its corresponding panoramic image data. In this way, after the preview posture data and the panoramic image data are associated, the panoramic image data is obtained.
  • the control device can receive the panoramic image data sent by the recording device through wireless communication.
  • the user can edit the preview posture data in the panoramic image data, thereby generating edited posture data. For example, after selecting a key frame, the user can edit the preview posture data corresponding to the key frame to obtain the edited posture data.
  • the first key frame corresponds to the first target preview posture data
  • the first edited posture data corresponding to the first key frame is obtained.
  • the second key frame corresponds to the second target preview posture data, and after the user edits the second target preview posture data, the second edited posture data corresponding to the second key frame is obtained.
  • the user can also change other parameters of the panoramic image data, such as changing the viewing angle corresponding to the key frame after the user selects the key frame.
  • control device can determine the preview angle of the picture corresponding to the key frame through the edited posture data corresponding to the key frame, determine the preview angle of the picture corresponding to other frames in the panoramic image data through the preview posture data, and finally determine the preview angle of the picture corresponding to other frames in the panoramic image data through Preview of the screen corresponding to the key frame Angle plays the picture corresponding to the key frame, and plays the picture corresponding to other frames through the preview angle of the picture corresponding to other frames.
  • control device can also smooth the posture data corresponding to the panoramic image data of each frame in the panoramic image data through the edited posture data and the preview posture data, and then play the panoramic view according to the smoothed posture data.
  • Figure 5 is a third flow diagram of the video processing method provided by the embodiment of the present application. .
  • the video processing method may also include the following steps:
  • the control device determines the first key frame of the panoramic image data edited by the user and the first target preview posture data corresponding to the first key frame, where the first target preview posture The data is extracted from the panoramic image data of the control device.
  • the first key frame is a key frame corresponding to the panoramic image data selected by the user in the panoramic image data.
  • the preview posture data is Euler angle data.
  • edit the first target Euler angle data corresponding to the first key frame thereby obtaining the edited Euler angle corresponding to the first key frame. data.
  • the preset time range corresponding to the first key frame is the first five seconds before the first key frame and the last five seconds after the first key frame.
  • the control device can determine whether there is a user selected to edit within this preset time range. Second keyframe.
  • step 304 is entered. If there is no second key frame within the preset time range corresponding to the first key frame, step 306 is entered.
  • control device can determine the second target preview posture data corresponding to the second key frame, and then obtain the second target preview posture data edited by the user. Generated second edited pose data.
  • control device can perform interpolation calculation on the posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data to obtain the first key frame.
  • the control device can calculate the posture data corresponding to frame A, frame B, and frame C according to the first edited posture data and the second edited posture data, thereby obtaining the interpolated posture data corresponding to frame A, frame B, and frame C respectively.
  • the viewing angles corresponding to frame A, frame B, and frame C are determined based on the interpolation gesture data, and finally the pictures corresponding to frame A, frame B, and frame C are played based on the viewing angles.
  • the video corresponding to the panoramic image data between the first key frame and the second key frame is played according to the interpolated posture data.
  • preview gesture data extracted from the panoramic image data can be used to play the corresponding video.
  • the video corresponding to the panoramic image data can be played through the preview posture data.
  • the attitude data of the entire panoramic image data can be smoothed, so that when playing the video corresponding to the panoramic image data, it can have a smoother viewing angle transition playback effect without the occurrence of lag between video frames. sudden phenomenon.
  • the preset time range corresponding to the first key frame is the first five seconds before the first key frame and the last five seconds after the first key frame. If there is no second key frame within the preset time range corresponding to the first key frame, , at this time, the control device determines the first video frame corresponding to 5 seconds before the first key frame, and the second video frame corresponding to 5 seconds after the first key frame.
  • the control device first obtains the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame from the panoramic image data, and then obtains the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame.
  • the posture data performs interpolation calculation on the posture data corresponding to the first key frame, thereby calculating the first interpolation posture data corresponding to the first key frame.
  • control device determines the viewing angle corresponding to the first key frame by using the first interpolation posture data, then determines the panoramic image data corresponding to the first key frame in the panoramic image data, and finally displays the viewing angle corresponding to the first key frame.
  • the control device after the control device obtains the panoramic image data, it can play the video corresponding to the panoramic image data at the angle when the user previews the panoramic image according to the preview posture data in the panoramic image data. If the user edits the preview posture data in the panoramic image data, the video corresponding to the panoramic image data can be played together based on the edited posture data and the preview posture data edited by the user.
  • the file format of the edited panoramic image data can be converted to a common format, such as mp4 format, and then other devices can play the edited panoramic image data.
  • mp4 format a common format
  • the control device obtains the preview posture data and then determines the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame. If the difference is within the preset If the difference value is within the range, then stop sending the first preview gesture data to the recording device. If the difference is outside the preset difference range, the first preview posture data is sent to the recording device, and then the panoramic image data sent by the recording device according to the preview posture data is obtained, and the edited posture data generated after editing the preview posture data is obtained. , and finally play the video corresponding to the panoramic image data based on the edited posture data and preview posture data. Thereby, the video corresponding to the panoramic image data is played through the angle corresponding to the edited posture data and the preview posture data.
  • Figure 6 is a first flow diagram of a data processing method provided by an embodiment of the present application.
  • the data processing method is directed to a recording device.
  • the data processing method may include the following steps:
  • the recording device is equipped with a 360-degree panoramic camera, and the panoramic image data is captured through the panoramic camera, and the panoramic image data is native data.
  • the recording device can convert the panoramic image data into preview panoramic image data with lower definition, and then send the preview panoramic image data to the control device, so that the user can preview the panoramic picture corresponding to the preview panoramic image data through the control device.
  • the recording device can also obtain preview gesture data sent from the control device, and the preview gesture data contains corresponding time information. For example, preview posture data at different times corresponds to a timestamp.
  • the recording device can associate the panoramic image data and the preview posture data at the same time according to the time information of the preview posture data and the time information of the panoramic image data, and generate an associated file; set the associated file in the panoramic image data At the tail end, panoramic image data is generated.
  • the recording device can send panoramic image data to the control device through wireless communication.
  • the recording device collects panoramic image data and then receives control
  • the preview posture data sent by the device is then associated with the panoramic image data and preview posture data at the same time to generate panoramic image data, and finally the panoramic image data is sent to the control device.
  • the user's preview posture data and the panoramic image data are associated.
  • FIG. 7 is a schematic structural diagram of a video processing device provided by an embodiment of the present application.
  • the video processing device 500 may include:
  • the sending module 510 is used to obtain corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device.
  • the sending module 510 is also used to determine the difference between the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame;
  • the first preview gesture data is sent to the recording device
  • the sending module 510 is also used to convert the first Euler angle data of the current video frame into a first space vector, and convert the second Euler angle data of the previous video frame into a second space vector;
  • the difference between the first space vector and the second space vector is determined.
  • the acquisition module 520 is used to acquire panoramic image data sent by the recording device.
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data.
  • the extraction module 530 is used to extract preview gesture data and panoramic image data from panoramic image data.
  • the play module 540 is used to play the video corresponding to the panoramic image data according to the preview gesture data.
  • the playback module 540 is also used to obtain the edited posture data generated after editing the preview posture data; and play the video corresponding to the panoramic image data according to the edited posture data and the preview posture data.
  • the playback module 540 is also used to determine the first key frame corresponding to the panoramic image data and the first target preview posture data corresponding to the first key frame;
  • the playback module 540 is also used to determine whether there is a second key frame within the preset time range corresponding to the first key frame;
  • the playback module 540 is also used to perform interpolation calculation on the posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data, to obtain the third Interpolated posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame;
  • the playback module 540 is also configured to determine if there is no second key frame within the preset time range corresponding to the first key frame.
  • the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data.
  • the video can be played from the user's preview angle.
  • FIG. 8 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • the data processing device 600 may include:
  • Collection module 610 is used to collect panoramic image data.
  • the receiving module 620 is used to receive preview gesture data sent by the control device.
  • the correlation module 630 is used to correlate panoramic image data and preview posture data at the same time to generate panoramic image data.
  • the association module 630 is also used to associate the initial panoramic image data and preview posture data at the same time, and generate an association file;
  • the data sending module 640 is used to send panoramic image data to the control device.
  • the recording device collects panoramic image data, then receives the preview posture data sent by the control device, then associates the panoramic image data and preview posture data at the same time to generate panoramic image data, and finally converts the panoramic image data into sent to the control device.
  • the user's preview posture data and the initial panoramic image data are associated.
  • the electronic device may include a memory 701 with one or more computer-readable storage media, an input unit 702, a display unit 703, a sensor 704, It includes a processor 705 with one or more processing cores, a power supply 706 and other components.
  • a memory 701 with one or more computer-readable storage media
  • an input unit 702 a display unit 703, a sensor 704, It includes a processor 705 with one or more processing cores, a power supply 706 and other components.
  • a processor 705 with one or more processing cores
  • a power supply 706 and other components.
  • FIG. 9 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. in:
  • the memory 701 can be used to store software programs and modules.
  • the processor 705 executes various functional applications and data processing by running the software programs and modules stored in the memory 701 .
  • the memory 701 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store a program based on Data created by the use of electronic devices (such as audio data, phone books, etc.), etc.
  • the memory 701 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 701 may also include a memory controller to provide the processor 705 and the input unit 702 with access to the memory 701 .
  • the input unit 702 may be used to receive input numeric or character information, and to generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit 702 may include a touch-sensitive surface as well as other input equipment.
  • a touch-sensitive surface also known as a touch display or trackpad, can collect the user's touch operations on or near it (such as the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface). operations near the surface), and drive the corresponding connection device according to the preset program.
  • the touch-sensitive surface may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller. to the processor 705, and can receive commands sent by the processor 705 and execute them.
  • touch-sensitive surfaces can be implemented using a variety of types including resistive, capacitive, infrared, and surface acoustic waves.
  • input unit 702 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, etc.
  • the display unit 703 may be used to display information input by the user or information provided to the user as well as various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the display unit 703 may include a display panel.
  • the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc.
  • the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near the touch-sensitive surface, it is sent to the processor 705 to determine the type of the touch event. The processor 705 then displays the display panel according to the type of the touch event.
  • Corresponding visual output is provided on the panel.
  • the touch-sensitive surface and the display panel are used as two independent components to implement the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to implement the input and output functions.
  • the electronic device may also include at least one sensor 704, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light.
  • the proximity sensor may close the display panel and/or when the electronic device moves to the ear. Backlight.
  • the gravity acceleration sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary.
  • the processor 705 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 701, and calling data stored in the memory 701 , perform various functions of the electronic device and process data, thereby overall monitoring the electronic device.
  • the processor 705 may include one or more processing cores; preferably, the processor 705 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 705.
  • the electronic device also includes a power supply 706 (such as a battery) that supplies power to various components.
  • a power supply 706 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 705 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system.
  • Power supply 706 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
  • the electronic device may also include a camera, a Bluetooth module, etc., which will not be described again here.
  • the processor 705 in the electronic device loads the computer program stored in the memory 701.
  • the processor 705 loads the computer program to implement various functions:
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
  • embodiments of the present application provide a computer-readable storage medium in which a plurality of instructions are stored, and the instructions can be loaded by the processor to execute the steps in any video processing method provided by the embodiments of the present application. .
  • this command can perform the following steps:
  • the panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
  • the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
  • ROM read-only memory
  • RAM random access memory
  • magnetic disk or optical disk etc.

Abstract

Provided are a video processing method and apparatus, an electronic device, and a storage medium. The video processing method comprises: a control device acquiring preview posture data corresponding to a user previewing a panoramic picture, and sending the preview posture data to a recording device (110); then acquiring panoramic video data sent by the recording device, the panoramic video data being generated by the recording device according to the recorded panoramic image data and the preview posture data (120); then extracting the preview posture data and the panoramic image data from the panoramic video data (130); finally, playing, according to the preview posture data, a video corresponding to the panoramic image data (140). Therefore, the video can be played at a preview angle of the user when the video corresponding to the panoramic image data is played.

Description

视频处理方法、装置、电子设备及存储介质Video processing method, device, electronic equipment and storage medium 技术领域Technical field
本申请涉及图像处理技术领域,具体涉及一种视频处理方法、装置、电子设备及存储介质。This application relates to the field of image processing technology, and specifically to a video processing method, device, electronic equipment and storage medium.
背景技术Background technique
在现有技术中,无人机通过摄像头采集到的全景视频之后,直接将全景视频传输到其他电子设备上,其他电子设备在获取到全景视频之后,由于该全景视频不包括在录制过程中用户的观看角度,需要用户自行调节观看角度才能观看到对应角度的视频。In the existing technology, after the drone collects the panoramic video through the camera, the panoramic video is directly transmitted to other electronic devices. After other electronic devices obtain the panoramic video, since the panoramic video does not include the user during the recording process, The viewing angle requires the user to adjust the viewing angle to watch the video at the corresponding angle.
发明内容Contents of the invention
本申请实施例提供一种视频处理方法、装置、电子设备及存储介质。该视频处理方法可以以用户预览全景画面时的预览角度播放全景图像数据对应的视频。Embodiments of the present application provide a video processing method, device, electronic device, and storage medium. The video processing method can play the video corresponding to the panoramic image data at the preview angle when the user previews the panoramic image.
第一方面,本申请实施例提供了一种视频处理方法,包括:In the first aspect, embodiments of the present application provide a video processing method, including:
获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;Obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device;
获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;Obtain the panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
从全景影像数据中提取预览姿态数据和全景图像数据;Extract preview pose data and panoramic image data from panoramic image data;
根据预览姿态数据播放全景图像数据对应的视频。Play the video corresponding to the panoramic image data according to the preview posture data.
第二方面,本申请实施例提供了一种视频处理装置,包括:In a second aspect, embodiments of the present application provide a video processing device, including:
发送模块,用于获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;The sending module is used to obtain the corresponding preview posture data when the user previews the panoramic picture, and sends the preview posture data to the recording device;
获取模块,用于获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;The acquisition module is used to obtain the panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
提取模块,用于从全景影像数据中提取预览姿态数据和全景图像数据;Extraction module, used to extract preview pose data and panoramic image data from panoramic image data;
播放模块,用于根据预览姿态数据播放全景图像数据对应的视频。 The playback module is used to play the video corresponding to the panoramic image data based on the preview posture data.
第三方面,本申请实施例提供了一种电子设备,包括存储有可执行程序代码的存储器、与存储器耦合的处理器;处理器调用存储器中存储的可执行程序代码,执行本申请实施例提供的视频处理方法或数据处理方法中的步骤。In a third aspect, embodiments of the present application provide an electronic device, including a memory storing executable program code, and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the method provided by the embodiment of the present application. steps in the video processing method or the data processing method.
第四方面,本申请实施例提供了一种存储介质,存储介质存储有多条指令,指令适于处理器进行加载,以执行本申请实施例提供的视频处理方法或数据处理方法中的步骤。In the fourth aspect, embodiments of the present application provide a storage medium. The storage medium stores a plurality of instructions, and the instructions are suitable for loading by the processor to execute steps in the video processing method or data processing method provided by the embodiments of the present application.
在本申请实施例中,控制设备可以获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;然后获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;再从全景影像数据中提取预览姿态数据和全景图像数据;最后根据预览姿态数据播放全景图像数据对应的视频。从而实现在播放全景图像数据对应的视频时能够以用户的预览角度来播放视频。In the embodiment of this application, the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data. Thus, when playing the video corresponding to the panoramic image data, the video can be played from the user's preview angle.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed 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 application. For those skilled in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1是本申请实施例提供的录制设备和控制设备进行数据传输的场景示意图。Figure 1 is a schematic diagram of a data transmission scenario between a recording device and a control device provided by an embodiment of the present application.
图2是本申请实施例提供的三维空间的示意图。Figure 2 is a schematic diagram of a three-dimensional space provided by an embodiment of the present application.
图3是本申请实施例提供的视频处理方法的第一流程示意图。Figure 3 is a first flowchart of the video processing method provided by the embodiment of the present application.
图4是本申请实施例提供的视频处理方法的第二流程示意图。Figure 4 is a second schematic flowchart of the video processing method provided by the embodiment of the present application.
图5是本申请实施例提供的视频处理方法的第三流程示意图。FIG. 5 is a third flowchart of the video processing method provided by the embodiment of the present application.
图6是本申请实施例提供的数据处理方法的第一流程示意图。Figure 6 is a first flow diagram of the data processing method provided by the embodiment of the present application.
图7是本申请实施例提供的视频处理装置的结构示意图。Figure 7 is a schematic structural diagram of a video processing device provided by an embodiment of the present application.
图8是本申请实施例提供的数据处理装置的结构示意图Figure 8 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
图9是本申请实施例提供的电子设备的结构示意图。 Figure 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts fall within the scope of protection of this application.
在相关技术中,无人机通过摄像头采集到的全景视频之后,直接将全景视频传输到其他电子设备上,其他电子设备在获取到全景视频之后,由于该全景视频不包括在录制过程中用户的观看角度,需要用户自行调节观看角度才能观看到对应角度的视频。In related technologies, after the drone collects the panoramic video through the camera, the panoramic video is directly transmitted to other electronic devices. After other electronic devices obtain the panoramic video, since the panoramic video does not include the user's data during the recording process, Viewing angle, users need to adjust the viewing angle themselves to watch the video at the corresponding angle.
为了解决上述技术问题,本申请实施例中提供了一种视频处理方法、装置、电子设备及存储介质。该视频处理方法可以应用于VR(Virtual Reality,虚拟现实)眼镜,还可以应用于智能手机、电脑等多种电子设备。In order to solve the above technical problems, embodiments of the present application provide a video processing method, device, electronic device, and storage medium. This video processing method can be applied to VR (Virtual Reality, virtual reality) glasses, and can also be applied to various electronic devices such as smartphones and computers.
请参阅图1,图1是本申请实施例提供的录制设备和控制设备进行数据传输的场景示意图。Please refer to Figure 1. Figure 1 is a schematic diagram of a data transmission scenario between a recording device and a control device provided by an embodiment of the present application.
在本申请实施例中,录制设备可以是录制全景图像数据,控制设备可以对录制设备录制的全景画面进行预览,控制设备还可以用于对录制设备录制完成的全景图像数据进行播放。In this embodiment of the present application, the recording device may record panoramic image data, the control device may preview the panoramic image recorded by the recording device, and the control device may also be used to play the panoramic image data recorded by the recording device.
如图1所示,其中S1为控制设备,S2为录制设备,控制设备可以是VR眼镜,录制设备可以是无人机,无人机上设置有三百六十度全景摄像头,录制设备可以录制真实的立体空间内的全景画面。As shown in Figure 1, S1 is the control device, and S2 is the recording device. The control device can be VR glasses, and the recording device can be a drone. The drone is equipped with a 360-degree panoramic camera, and the recording device can record real-life scenes. panoramic picture in three-dimensional space.
需要说明的是,控制设备还可以是手机、电脑或者其他拥有计算能力的电子设备。录制设备还可以是全景摄像机等电子设备。图1所示的无人机和VR眼镜仅仅是例举,不应视为对本申请的限制。It should be noted that the control device can also be a mobile phone, computer or other electronic device with computing capabilities. The recording device can also be an electronic device such as a panoramic camera. The drones and VR glasses shown in Figure 1 are only examples and should not be regarded as limitations of this application.
请继续参阅图1,在实际应用场景中,当控制设备和录制设备建立通信连接之后,录制设备可以将录制的全景画面传输到控制设备上,用户可以通过控制设备来对全景画面进行预览,控制设备会获取用户预览全景画面时用户对应的预览姿态数据,然后将预览姿态数据发送给录制设备。Please continue to refer to Figure 1. In actual application scenarios, after the control device and the recording device establish a communication connection, the recording device can transmit the recorded panoramic image to the control device, and the user can preview and control the panoramic image through the control device. The device will obtain the preview posture data corresponding to the user when previewing the panoramic image, and then send the preview posture data to the recording device.
比如,用户在控制设备上预览的全景画面可以是一个低清晰度的画面。 比如录制设备录制的全景图像数据时原始全景画面对应的数据,但是如果录制设备对控制设备传输原始的全景画面对应的数据,由于数据较大,会导致传输过程中出现较高的延迟,不利于用户实时预览。For example, the panoramic picture previewed by the user on the control device may be a low-definition picture. For example, when the panoramic image data recorded by the recording device is the data corresponding to the original panoramic image, but if the recording device transmits the data corresponding to the original panoramic image to the control device, due to the large data size, a high delay will occur during the transmission process, which is not conducive to Users preview in real time.
因此,录制设备可以将获取的全景图像数据转换为分辨率较低的预览全景图像数据,然后将预览全景图像数据发送给控制设备。控制设备在接收到预览全景图像数据之后,可以根据预览全景图像数据来对全景画面进行预览,控制设备将用户预览全景画面时的预览数据发送给录制设备。比如控制设备可以通过陀螺仪、加速度传感器等传感器来获取用户预览全景画面时的预览姿态数据。Therefore, the recording device can convert the acquired panoramic image data into preview panoramic image data with a lower resolution, and then send the preview panoramic image data to the control device. After receiving the preview panoramic image data, the control device can preview the panoramic picture according to the preview panoramic image data, and the control device sends the preview data when the user previews the panoramic picture to the recording device. For example, the control device can obtain the preview posture data of the user when previewing the panoramic screen through sensors such as gyroscopes and acceleration sensors.
当录制设备接收到预览姿态数据之后,录制设备会根据录制的全景图像数据和预览姿态数据来生成全景影像数据,然后录制设备将全景影像数据发送给控制设备。After the recording device receives the preview posture data, the recording device generates panoramic image data based on the recorded panoramic image data and preview posture data, and then the recording device sends the panoramic image data to the control device.
控制设备接收到全景影像数据之后,控制设备对全景影像数据进行提取,从而提取出预览姿态数据和全景图像数据,最后根据预览姿态数据播放全景图像数据对应的视频。After the control device receives the panoramic image data, the control device extracts the panoramic image data to extract preview posture data and panoramic image data, and finally plays the video corresponding to the panoramic image data based on the preview posture data.
其中,控制设备可以根据预览姿态数据来确定用户的预览角度,然后根据预览角度来播放全景图像数据对应的视频。The control device can determine the user's preview angle based on the preview gesture data, and then play the video corresponding to the panoramic image data based on the preview angle.
针对于控制设备根据预览全景图像数据预览全景画面的内容,请一并参阅图2,图2是本申请实施例提供的三维空间的示意图。For the control device to preview the content of the panoramic image according to the preview panoramic image data, please refer to Figure 2 as well. Figure 2 is a schematic diagram of a three-dimensional space provided by an embodiment of the present application.
其中,控制设备可以先确定出空间中心点A2,然后建立三维空间A1,该三维空间对应于录制设备所处的立体空间,该空间中心点在三维空间中的位置对应于录制设备在真实立体空间中的位置。在控制设备建立三维空间的过程中,可以将录制设备通过融合磁力计得到的北方方向确定为空间中心点对应的标准方向,然后以该标准方向来建立三维空间。Among them, the control device can first determine the space center point A2, and then establish a three-dimensional space A1. This three-dimensional space corresponds to the three-dimensional space where the recording device is located. The position of the space center point in the three-dimensional space corresponds to the real three-dimensional space of the recording device. location in. In the process of controlling the device to establish a three-dimensional space, the north direction obtained by the recording device through the fusion magnetometer can be determined as the standard direction corresponding to the center point of the space, and then the three-dimensional space is established based on this standard direction.
该三维空间是虚拟空间,当录制设备将预览全景图像数据传输给控制设备时,控制设备可以将预览全景图像数据渲染在三维空间中,从而得到预览的全景画面。The three-dimensional space is a virtual space. When the recording device transmits the preview panoramic image data to the control device, the control device can render the preview panoramic image data in the three-dimensional space to obtain a preview panoramic picture.
当录制设备传输的预览全景图像数据为数据流时,则在三维空间中渲 染的是全景视频。When the preview panoramic image data transmitted by the recording device is a data stream, it is rendered in three-dimensional space. What is dyed is panoramic video.
用户在使用控制设备预览全景画面时,控制设备可以利用传感器来记录下用户对应的预览姿态数据,比如通过陀螺仪、加速度传感器等传感器记录下的数据确定出用户对应的预览姿态数据。When the user uses the control device to preview the panoramic image, the control device can use sensors to record the user's corresponding preview posture data. For example, the user's corresponding preview posture data can be determined through data recorded by sensors such as gyroscopes and acceleration sensors.
比如,用户在佩戴控制设备时,控制设备可以获取用户的预览姿态数据,比如用户通过转动头部观看其中某一方向,控制设备可以记录下该方向对应的预览姿态数据,预览姿态数据可以是欧拉角数据。其中欧拉角是用来唯一地确定定点转动刚体位置的三个一组独立角参量,由章动角θ、进动角ψ和自转角φ组成。For example, when the user wears the control device, the control device can obtain the user's preview posture data. For example, the user rotates his head to look in a certain direction, and the control device can record the preview posture data corresponding to that direction. The preview posture data can be European. Pull angle data. Among them, the Euler angle is a set of three independent angular parameters used to uniquely determine the position of a fixed-point rotating rigid body, consisting of the nutation angle θ, the precession angle ψ and the rotation angle φ.
如图2所示,控制设备在渲染全景图像或者全景视频的过程中,控制设备可以确定出对应的可视角度B1和可视距离C1,在该可视角度B1和可视距离C1下在全景图像或者全景视频中确定出用户所预览的画面。然后将该画面显示在控制设备的显示区域上。其中,可视距离C1为空间中心点A2到空间点A3之间的距离。As shown in Figure 2, when the control device is rendering a panoramic image or panoramic video, the control device can determine the corresponding viewing angle B1 and viewing distance C1. Under the viewing angle B1 and viewing distance C1, the panoramic view is The picture previewed by the user is determined from the image or panoramic video. This screen is then displayed on the display area of the control device. Among them, the visible distance C1 is the distance between the space center point A2 and the space point A3.
为了更加详细的了解本申请实施例提供的视频处理方法,请参阅图3,图3是本申请实施例提供的视频处理方法的第一流程示意图。该视频处理方法可以包括如下步骤:In order to understand the video processing method provided by the embodiment of the present application in more detail, please refer to Figure 3 , which is a first flow diagram of the video processing method provided by the embodiment of the present application. The video processing method may include the following steps:
110、获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备。110. Obtain the corresponding preview posture data when the user previews the panoramic image, and send the preview posture data to the recording device.
在一些实施方式中,用户在使用控制设备来对录制设备发送的全景画面进行预览时,此时控制设备可以对用户的预览姿态数据进行记录,并将预览姿态数据发送给录制设备。In some embodiments, when the user uses the control device to preview the panoramic image sent by the recording device, the control device can record the user's preview gesture data and send the preview gesture data to the recording device.
例如,控制设备可以采用陀螺仪、加速度传感器等来获取用户对应的预览姿态数据,比如控制设备被用户佩戴或者用户手持的时候,可以通过传感器来获取对应的传感器数据,然后将传感器数据来确定用户的预览姿态数据,比如预览姿态数据包括欧拉角数据、角速度数据、加速度数据等。For example, the control device can use a gyroscope, acceleration sensor, etc. to obtain the user's corresponding preview gesture data. For example, when the control device is worn by the user or held by the user, the corresponding sensor data can be obtained through the sensor, and then the sensor data can be used to determine the user. Preview attitude data, for example, preview attitude data includes Euler angle data, angular velocity data, acceleration data, etc.
又例如,用户在使用鼠标或者触控的方式来滑动屏幕实现对全景画面的预览时,控制设备可以将用户的鼠标移动信息或者手指滑动信息来转换 为用户预览全景画面时对应的预览姿态数据,比如鼠标移动信息或者手指滑动信息来确定用户在预览全景画面时所选择的方向,从而将该方向确定为预览姿态数据。For another example, when the user uses the mouse or touch to slide the screen to preview the panoramic picture, the control device can convert the user's mouse movement information or finger sliding information into Preview posture data corresponding to when the user previews the panoramic picture, such as mouse movement information or finger sliding information, is used to determine the direction selected by the user when previewing the panoramic picture, thereby determining the direction as the preview posture data.
在一些实施方式中,当控制设备获取到用户的预览姿态数据之后,可以将预览姿态数据和具体时间相关联,然后将关联时间后的预览姿态数据发送给录制设备。In some implementations, after the control device obtains the user's preview gesture data, it can associate the preview gesture data with a specific time, and then send the preview gesture data after the associated time to the recording device.
120、获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成。120. Obtain the panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data.
在一些实施方式中,当控制设备将预览姿态数据发送给录制设备之后,录制设备会根据录制的全景图像数据和预览姿态数据生成全景影像数据。全景影像数据可以理解为是包含图像数据和姿态数据的数据。In some implementations, after the control device sends the preview posture data to the recording device, the recording device generates panoramic image data based on the recorded panoramic image data and preview posture data. Panoramic image data can be understood as data including image data and posture data.
控制设备可以通过无线通信的方式接收录制设备发送的全景影像数据。The control device can receive the panoramic image data sent by the recording device through wireless communication.
130、从全景影像数据中提取预览姿态数据和全景图像数据。130. Extract preview pose data and panoramic image data from panoramic image data.
控制设备在获取到全景影像数据之后,可以对全景影像数据进行解析,从而得到全景图像数据和预览姿态数据。After acquiring the panoramic image data, the control device can analyze the panoramic image data to obtain panoramic image data and preview attitude data.
比如,全景图像数据和预览姿态数据是通过预设的编码格式生成的全景影像数据,则控制设备可以采用对应的解码方式来对全景影像数据进行解码,从而得到全景图像数据和预览姿态数据。For example, if the panoramic image data and preview posture data are panoramic image data generated through a preset encoding format, the control device can use a corresponding decoding method to decode the panoramic image data, thereby obtaining the panoramic image data and preview posture data.
需要说明的是,控制设备还可以确定出预览姿态数据对应的时间信息以及全景图像数据对应的时间信息,然后将相同时间的预览姿态数据和全景图像数据相对应。It should be noted that the control device can also determine the time information corresponding to the preview posture data and the time information corresponding to the panoramic image data, and then correspond the preview posture data and the panoramic image data at the same time.
在一些实施方式中,在控制设备对全景影像数据进行解析时,控制设备可以对全景影像数据进行平滑处理,从而滤除其中的无用数据或者噪声数据。In some implementations, when the control device parses the panoramic image data, the control device can smooth the panoramic image data to filter out useless data or noise data therein.
140、根据预览姿态数据播放全景图像数据对应的视频。140. Play the video corresponding to the panoramic image data according to the preview posture data.
在一些实施方式中,当用户需要播放全景影像数据对应的视频的时候,控制设备可以先确定出需要播放的时间起点,然后根据该时间起点确定出播放起点对应的预览姿态数据和全景图像数据,然后按照时间顺序通过预览姿态数据来渲染全景图像数据对应的画面,从而渲染出用户预览角度下 的画面。In some implementations, when the user needs to play the video corresponding to the panoramic image data, the control device can first determine the starting point of time that needs to be played, and then determine the preview gesture data and panoramic image data corresponding to the starting point of playing based on the starting point of time. Then the screen corresponding to the panoramic image data is rendered through the preview posture data in chronological order, thereby rendering the user's preview angle picture.
当电子设备连续显示多帧预览角度下的画面时,则控制设备播放了全景影像数据对应的视频。When the electronic device continuously displays images from multiple frames of preview angles, the control device plays the video corresponding to the panoramic image data.
也就是说,在本申请实施例中,控制设备可以根据预览姿态数据确定用户的预览角度,然后根据预览角度播放全景影像数据对应的视频。That is to say, in this embodiment of the present application, the control device can determine the user's preview angle based on the preview gesture data, and then play the video corresponding to the panoramic image data based on the preview angle.
需要说明的是,在对全景影像数据的视频进行播放的设备不仅限于控制设备,还可以是其他具备播放能力的电子设备。It should be noted that the device that plays the video of the panoramic image data is not limited to the control device, but can also be other electronic devices with playback capabilities.
请一并参阅图2,如图2所示,在预览姿态数据为欧拉角数据的情况下,控制设备可以根据欧拉角数据在三维空间中确定出用户的预览角度,并确定出预览角度对应的画面。Please refer to Figure 2 as well. As shown in Figure 2, when the preview posture data is Euler angle data, the control device can determine the user's preview angle in the three-dimensional space based on the Euler angle data, and determine the preview angle. corresponding screen.
当控制设备的显示区域显示多帧预览角度分别对应的画面时,则实现了在用户的预览角度下播放全景影像数据对应的视频。When the display area of the control device displays images corresponding to multiple frames of preview angles, the video corresponding to the panoramic image data is played at the user's preview angle.
在本申请实施例中,控制设备可以获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;然后获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;再从全景影像数据中提取预览姿态数据和全景图像数据;最后根据预览姿态数据播放全景图像数据对应的视频。从而实现在播放全景图像数据对应的视频时能够以用户的预览角度来播放视频。In the embodiment of this application, the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data. Thus, when playing the video corresponding to the panoramic image data, the video can be played from the user's preview angle.
请继续参阅图4,图4是本申请实施例提供的视频处理方法的第二流程示意图。该视频处理方法可以包括以下步骤:Please continue to refer to FIG. 4 , which is a second schematic flowchart of the video processing method provided by an embodiment of the present application. The video processing method may include the following steps:
201、获取预览姿态数据。201. Obtain preview posture data.
例如,控制设备可以采用陀螺仪、加速度传感器等来获取用户对应的预览姿态数据,比如控制设备被用户佩戴或者用户手持的时候,可以通过传感器来获取对应的传感器数据,然后将传感器数据来确定用户的预览姿态数据,比如预览姿态数据包括欧拉角数据、角速度数据、加速度数据等。For example, the control device can use a gyroscope, acceleration sensor, etc. to obtain the user's corresponding preview gesture data. For example, when the control device is worn by the user or held by the user, the corresponding sensor data can be obtained through the sensor, and then the sensor data can be used to determine the user. Preview attitude data, for example, preview attitude data includes Euler angle data, angular velocity data, acceleration data, etc.
又例如,用户在使用鼠标或者触控的方式来滑动屏幕实现对全景画面的预览时,控制设备可以将用户的鼠标移动信息或者手指滑动信息来转换为用户预览全景画面时对应的预览姿态数据,比如鼠标移动信息或者手指滑动信息来确定用户在预览全景画面时所选择的方向,从而将该方向确定 为预览姿态数据。For another example, when the user uses the mouse or touch to slide the screen to preview the panoramic picture, the control device can convert the user's mouse movement information or finger sliding information into corresponding preview gesture data when the user previews the panoramic picture. For example, mouse movement information or finger sliding information is used to determine the direction selected by the user when previewing the panoramic screen, thereby determining the direction. is the preview posture data.
202、确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值。202. Determine the difference between the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame.
在一些实施方式中,控制设备可以确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据,然后确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值。In some implementations, the control device may determine the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame, and then determine the first preview gesture data corresponding to the current video frame and the previous video frame The difference between the corresponding second preview pose data.
当预览姿态数据为欧拉角数据时,则第一预览姿态数据为第一欧拉角数据,第二姿态数据为第二欧拉角数据。When the preview posture data is Euler angle data, the first preview posture data is the first Euler angle data, and the second posture data is the second Euler angle data.
具体的,控制设备将当前视频帧的第一欧拉角数据转换为第一空间矢量,将前一视频帧的第二欧拉角数据转换为第二空间矢量,最后确定第一空间矢量和第二空间矢量之间的差值。该第一空间矢量和第二空间矢量之间的差值就是当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值。Specifically, the control device converts the first Euler angle data of the current video frame into a first space vector, converts the second Euler angle data of the previous video frame into a second space vector, and finally determines the first space vector and the first space vector. The difference between two space vectors. The difference between the first space vector and the second space vector is the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame.
203、若差值在预设差值范围内,则停止将第一预览姿态数据发送给录制设备。203. If the difference is within the preset difference range, stop sending the first preview gesture data to the recording device.
在一些实施方式中,控制设备可以设置一个预设差值范围,当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值在该预设差值范围内时,则认为用户的预览姿态变化很小,比如用户的头部变化很小。In some embodiments, the control device can set a preset difference range, and the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame is within the preset difference range. Within the range, it is considered that the user's preview posture changes very little, for example, the user's head changes very little.
例如,预设差值范围为0~5度,而当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值为4度,则确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值在预设差值范围内。For example, the preset difference range is 0 to 5 degrees, and the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame is 4 degrees, then the current video frame is determined The difference between the corresponding first preview gesture data and the second preview gesture data corresponding to the previous video frame is within a preset difference range.
此时,控制设备可以停止将当前视频帧的预览数据发送给录制设备,减少对录制设备的数据传输,从而使得录制设备最终根据预览姿态数据和全景图像数据生成的全景影像数据的数据量更小。同时能够减少无用数据的传输,提升数据控制设备和录制设备之间的数据传输效率。At this time, the control device can stop sending the preview data of the current video frame to the recording device, reducing data transmission to the recording device, so that the amount of panoramic image data finally generated by the recording device based on the preview posture data and panoramic image data is smaller. . At the same time, it can reduce the transmission of useless data and improve the data transmission efficiency between the data control device and the recording device.
204、若差值在预设差值范围外,则将第一预览姿态数据发送给录制设备。 204. If the difference is outside the preset difference range, send the first preview posture data to the recording device.
在一些实施方式中,若差值在预设差值范围外,则说明当前视频帧和前一视频帧相比,用户的预览姿态发生了较大变化,此时可以将第一预览姿态数据发送给录制设备。In some implementations, if the difference is outside the preset difference range, it means that the user's preview posture has changed significantly compared with the current video frame and the previous video frame. At this time, the first preview posture data can be sent. Give recording equipment.
205、获取录制设备根据预览姿态数据发送的全景影像数据。205. Obtain the panoramic image data sent by the recording device based on the preview posture data.
在一些实施方式中,当录制设备接收到第一预览姿态数据之后,录制设备可以确定出第一预览姿态数据对应的时间戳,然后根据该时间戳和相同时间的全景图像数据相关联。In some embodiments, after the recording device receives the first preview gesture data, the recording device can determine the timestamp corresponding to the first preview gesture data, and then associate it with the panoramic image data of the same time based on the timestamp.
录制设备可以将多帧预览姿态数据和其对应的全景图像数据相关联,从而生成全景影像数据。The recording device can associate the multi-frame preview posture data with its corresponding panoramic image data, thereby generating panoramic image data.
比如,时间10:01对应的预览姿态数据和其对应的全景图像数据相关联,时间10:02对应的预览姿态数据和其对应的全景图像数据相关联。通过该方式,对预览姿态数据和全景图像数据相关联之后,则得到全景影像数据。For example, the preview posture data corresponding to time 10:01 is associated with its corresponding panoramic image data, and the preview posture data corresponding to time 10:02 is associated with its corresponding panoramic image data. In this way, after the preview posture data and the panoramic image data are associated, the panoramic image data is obtained.
控制设备可以通过无线通信的方式接收录制设备发送的全景影像数据。The control device can receive the panoramic image data sent by the recording device through wireless communication.
206、获取对预览姿态数据编辑后生成的已编辑姿态数据。206. Obtain the edited posture data generated after editing the preview posture data.
在一些实施方式中,当控制设备接收到全景影像数据之后,用户可以对全景影像数据中的预览姿态数据进行编辑,从而生成已编辑姿态数据。比如用户在选取关键帧之后,可以对关键帧对应的预览姿态数据进行编辑,从而得到已编辑姿态数据。In some implementations, after the control device receives the panoramic image data, the user can edit the preview posture data in the panoramic image data, thereby generating edited posture data. For example, after selecting a key frame, the user can edit the preview posture data corresponding to the key frame to obtain the edited posture data.
比如,第一关键帧对应第一目标预览姿态数据,而用户对第一目标预览姿态数据进行编辑之后,得到第一关键帧对应的第一已编辑姿态数据。第二关键帧对应第二目标预览姿态数据,而用户对第二目标预览姿态数据进行编辑之后,得到第二关键帧对应的第二已编辑姿态数据。For example, the first key frame corresponds to the first target preview posture data, and after the user edits the first target preview posture data, the first edited posture data corresponding to the first key frame is obtained. The second key frame corresponds to the second target preview posture data, and after the user edits the second target preview posture data, the second edited posture data corresponding to the second key frame is obtained.
在一些实施方式中,用户还可以对全景影像数据的其他参数进行更改,比如用户选取关键帧之后,改变关键帧对应的可视角度。In some implementations, the user can also change other parameters of the panoramic image data, such as changing the viewing angle corresponding to the key frame after the user selects the key frame.
207、根据已编辑姿态数据和预览姿态数据播放全景影像数据对应的视频。207. Play the video corresponding to the panoramic image data based on the edited posture data and preview posture data.
在一些实施方式中,控制设备可以通过关键帧对应的已编辑姿态数据来确定关键帧对应的画面的预览角度,通过预览姿态数据来确定全景影像数据中其他帧对应的画面的预览角度,最后通过关键帧对应的画面的预览 角度播放关键帧对应的画面,通过其他帧对应的画面的预览角度播放其他帧对应的画面。In some implementations, the control device can determine the preview angle of the picture corresponding to the key frame through the edited posture data corresponding to the key frame, determine the preview angle of the picture corresponding to other frames in the panoramic image data through the preview posture data, and finally determine the preview angle of the picture corresponding to other frames in the panoramic image data through Preview of the screen corresponding to the key frame Angle plays the picture corresponding to the key frame, and plays the picture corresponding to other frames through the preview angle of the picture corresponding to other frames.
在一些实施方式中,控制设备还可以通过已编辑姿态数据和预览姿态数据对全景影像数据中每一帧的全景图像数据对应的姿态数据进行平滑处理,然后根据平滑处理后的姿态数据播放对全景影像数据中每一帧的全景图像数据对应的画面。In some embodiments, the control device can also smooth the posture data corresponding to the panoramic image data of each frame in the panoramic image data through the edited posture data and the preview posture data, and then play the panoramic view according to the smoothed posture data. The picture corresponding to the panoramic image data of each frame in the image data.
从而实现根据已编辑姿态数据和预览姿态数据播放全景图像数据对应的视频。This enables the video corresponding to the panoramic image data to be played based on the edited posture data and the preview posture data.
为了更加详细的了解本申请实施例中根据已编辑姿态数据和预览姿态数据播放全景影像数据对应的视频,请继续参阅图5,图5是本申请实施例提供的视频处理方法的第三流程示意图。该视频处理方法还可以包括如下步骤:In order to understand in more detail the video corresponding to the panoramic image data played according to the edited posture data and preview posture data in the embodiment of the present application, please continue to refer to Figure 5. Figure 5 is a third flow diagram of the video processing method provided by the embodiment of the present application. . The video processing method may also include the following steps:
301、确定全景影像数据对应的第一关键帧以及第一关键帧对应的第一目标预览姿态数据。301. Determine the first key frame corresponding to the panoramic image data and the first target preview posture data corresponding to the first key frame.
在一些实施方式中,以用户编辑的第一关键帧为例,控制设备确定用户编辑全景影像数据的第一关键帧以及第一关键帧对应的第一目标预览姿态数据,其中第一目标预览姿态数据是控制设备全景影像数据中提取出的数据。第一关键帧为用户在全景图像数据中选取的全景图像数据对应的关键帧。In some embodiments, taking the first key frame edited by the user as an example, the control device determines the first key frame of the panoramic image data edited by the user and the first target preview posture data corresponding to the first key frame, where the first target preview posture The data is extracted from the panoramic image data of the control device. The first key frame is a key frame corresponding to the panoramic image data selected by the user in the panoramic image data.
302、获取对第一目标预览姿态数据编辑后生成的第一已编辑姿态数据。302. Obtain the first edited posture data generated after editing the first target preview posture data.
例如,预览姿态数据为欧拉角数据,当用户确定第一关键帧之后,对第一关键帧对应的第一目标欧拉角数据进行编辑,从而得到第一关键帧对应的已编辑欧拉角数据。For example, the preview posture data is Euler angle data. After the user determines the first key frame, edit the first target Euler angle data corresponding to the first key frame, thereby obtaining the edited Euler angle corresponding to the first key frame. data.
303、确定第一关键帧对应的预设时间范围内是否有第二关键帧。303. Determine whether there is a second key frame within the preset time range corresponding to the first key frame.
比如,第一关键帧对应的预设时间范围为第一关键帧之前的前五秒和第一关键帧之后的后五秒,控制设备可以确定在这个预设时间范围内是否有用户选择编辑的第二关键帧。For example, the preset time range corresponding to the first key frame is the first five seconds before the first key frame and the last five seconds after the first key frame. The control device can determine whether there is a user selected to edit within this preset time range. Second keyframe.
若第一关键帧对应的预设时间范围内有第二关键帧,则进入步骤304。若第一关键帧对应的预设时间范围内没有第二关键帧,则进入步骤306。 If there is a second key frame within the preset time range corresponding to the first key frame, step 304 is entered. If there is no second key frame within the preset time range corresponding to the first key frame, step 306 is entered.
304、若第一关键帧对应的预设时间范围内有第二关键帧,则获取第二关键帧对应的第二已编辑姿态数据。304. If there is a second key frame within the preset time range corresponding to the first key frame, obtain the second edited posture data corresponding to the second key frame.
比如,若第一关键帧对应的预设时间范围内有第二关键帧,控制设备可以确定第二关键帧对应的第二目标预览姿态数据,然后获取用户对第二目标预览姿态数据进行编辑后生成的第二已编辑姿态数据。For example, if there is a second key frame within the preset time range corresponding to the first key frame, the control device can determine the second target preview posture data corresponding to the second key frame, and then obtain the second target preview posture data edited by the user. Generated second edited pose data.
305、根据第一已编辑姿态数据和第二已编辑姿态数据播放第一关键帧和第二关键帧之间的全景图像数据对应的视频,根据预览姿态数据播放预设时间范围外的全景图像数据对应的视频。305. Play the video corresponding to the panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data, and play the panoramic image data outside the preset time range based on the preview posture data. corresponding video.
具体的,控制设备可以根据第一已编辑姿态数据和第二已编辑姿态数据对第一关键帧和第二关键帧之间每一帧全景图像数据对应的姿态数据进行插值计算,得到第一关键帧和第二关键帧之间每一帧全景图像数据对应的插值姿态数据;然后根据插值姿态数据播放第一关键帧和第二关键帧之间的全景图像数据对应的视频。Specifically, the control device can perform interpolation calculation on the posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data to obtain the first key frame. Interpolation posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame; and then playing the video corresponding to the panoramic image data between the first key frame and the second key frame according to the interpolation posture data.
例如,在第一关键帧和第二关键帧之间有三帧画面,将这三帧按照时间顺序分别确定为帧A、帧B、帧C。控制设备可以根据第一已编辑姿态数据和第二已编辑姿态数据对帧A、帧B、帧C分别对应的姿态数据进行计算,从而得到帧A、帧B、帧C分别对应的插值姿态数据。For example, there are three frames between the first key frame and the second key frame, and these three frames are respectively determined as frame A, frame B, and frame C in time order. The control device can calculate the posture data corresponding to frame A, frame B, and frame C according to the first edited posture data and the second edited posture data, thereby obtaining the interpolated posture data corresponding to frame A, frame B, and frame C respectively. .
然后根据插值姿态数据确定出帧A、帧B、帧C分别对应的观看角度,最后根据该观看角度播放帧A、帧B、帧C分别对应的画面。从而实现根据插值姿态数据播放第一关键帧和第二关键帧之间的全景图像数据对应的视频。Then the viewing angles corresponding to frame A, frame B, and frame C are determined based on the interpolation gesture data, and finally the pictures corresponding to frame A, frame B, and frame C are played based on the viewing angles. Thereby, the video corresponding to the panoramic image data between the first key frame and the second key frame is played according to the interpolated posture data.
在一些实施方式中,在预设时间范围外的全景图像数据,可以采取从全景图像数据中提取的预览姿态数据来播放对应的视频。In some implementations, for panoramic image data outside the preset time range, preview gesture data extracted from the panoramic image data can be used to play the corresponding video.
比如,在第一关键帧前5秒之前的全景图像数据,则可以通过的预览姿态数据来播放全景图像数据对应的视频。For example, for panoramic image data 5 seconds before the first key frame, the video corresponding to the panoramic image data can be played through the preview posture data.
通过上述方式,可以实现对整个全景影像数据进行姿态数据的平滑处理,使得播放全景影像数据对应的视频的时候,能够拥有更加平滑的观看角度过渡的播放效果,而不会出现视频画面之间卡顿的现象。Through the above method, the attitude data of the entire panoramic image data can be smoothed, so that when playing the video corresponding to the panoramic image data, it can have a smoother viewing angle transition playback effect without the occurrence of lag between video frames. sudden phenomenon.
306、若第一关键帧对应的预设时间范围内没有第二关键帧,则确定预 设时间范围内时间起点对应的第一视频帧和时间终点对应的第二视频帧。306. If there is no second key frame within the preset time range corresponding to the first key frame, determine the preset time range. Assume the first video frame corresponding to the time starting point and the second video frame corresponding to the time end point within the time range.
比如,第一关键帧对应的预设时间范围为第一关键帧之前的前五秒和第一关键帧之后的后五秒,若第一关键帧对应的预设时间范围内没有第二关键帧,此时控制设备确定第一关键帧前5秒对应的第一视频帧,以及第一关键帧后5秒对应的第二视频帧。For example, the preset time range corresponding to the first key frame is the first five seconds before the first key frame and the last five seconds after the first key frame. If there is no second key frame within the preset time range corresponding to the first key frame, , at this time, the control device determines the first video frame corresponding to 5 seconds before the first key frame, and the second video frame corresponding to 5 seconds after the first key frame.
307、根据第一视频帧对应的预览姿态数据和第二视频帧对应的预览姿态数据对第一关键帧对应的姿态数据进行插值计算,得到第一关键帧对应的第一插值姿态数据。307. Perform interpolation calculation on the posture data corresponding to the first key frame according to the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame, to obtain the first interpolation posture data corresponding to the first key frame.
比如,控制设备先从全景影像数据中获取第一视频帧对应的预览姿态数据和第二视频帧对应的预览姿态数据,然后通过第一视频帧对应的预览姿态数据和第二视频帧对应的预览姿态数据对第一关键帧对应的姿态数据进行插值计算,从而计算出第一关键帧对应的第一插值姿态数据。For example, the control device first obtains the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame from the panoramic image data, and then obtains the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame. The posture data performs interpolation calculation on the posture data corresponding to the first key frame, thereby calculating the first interpolation posture data corresponding to the first key frame.
对于用户对第一关键帧编辑的第一已编辑姿态数据,则不采用。For the first edited posture data edited by the user on the first keyframe, it is not used.
308、根据第一插值姿态数据和第一关键帧对应的全景图像数据显示第一关键帧对应的画面。308. Display the picture corresponding to the first key frame according to the first interpolation posture data and the panoramic image data corresponding to the first key frame.
比如,控制设备通过采用第一插值姿态数据确定第一关键帧对应的观看角度,然后在全景影像数据中确定第一关键帧对应的全景图像数据,最后通过第一关键帧对应的观看角度显示第一关键帧对应的全景图像数据的画面。For example, the control device determines the viewing angle corresponding to the first key frame by using the first interpolation posture data, then determines the panoramic image data corresponding to the first key frame in the panoramic image data, and finally displays the viewing angle corresponding to the first key frame. A frame of panoramic image data corresponding to a key frame.
在本申请实施例中,在控制设备获取到全景影像数据之后,可以根据全景影像数据中的预览姿态数据来对以用户预览全景画面时的角度播放全景影像数据对应的视频。如果用户对全景影像数据中的预览姿态数据进行编辑,则可以根据用户编辑的已编辑姿态数据和预览姿态数据来共同播放全景影像数据对应的视频。In the embodiment of the present application, after the control device obtains the panoramic image data, it can play the video corresponding to the panoramic image data at the angle when the user previews the panoramic image according to the preview posture data in the panoramic image data. If the user edits the preview posture data in the panoramic image data, the video corresponding to the panoramic image data can be played together based on the edited posture data and the preview posture data edited by the user.
在一些实施方式中,如果需要将编辑后的全景影像数据在其他设备上进行播放,则可以将编辑后的全景影像数据的文件格式转换为通用格式,比如mp4格式,然后其他设备播放编辑后的全景影像数据时,可以直接通过已编辑姿态数据和预览姿态数据对应的角度来播放全景影像数据对应的视频。 In some implementations, if the edited panoramic image data needs to be played on other devices, the file format of the edited panoramic image data can be converted to a common format, such as mp4 format, and then other devices can play the edited panoramic image data. When viewing panoramic image data, you can directly play the video corresponding to the panoramic image data through the angle corresponding to the edited posture data and preview posture data.
在本申请实施例中,控制设备通过获取预览姿态数据,然后确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值,若差值在预设差值范围内,则停止将第一预览姿态数据发送给录制设备。若差值在预设差值范围外,则将第一预览姿态数据发送给录制设备,然后获取录制设备根据预览姿态数据发送的全景影像数据,获取对预览姿态数据编辑后生成的已编辑姿态数据,最后根据已编辑姿态数据和预览姿态数据播放全景影像数据对应的视频。从而通过已编辑姿态数据和预览姿态数据对应的角度来播放全景影像数据对应的视频。In this embodiment of the present application, the control device obtains the preview posture data and then determines the difference between the first preview posture data corresponding to the current video frame and the second preview posture data corresponding to the previous video frame. If the difference is within the preset If the difference value is within the range, then stop sending the first preview gesture data to the recording device. If the difference is outside the preset difference range, the first preview posture data is sent to the recording device, and then the panoramic image data sent by the recording device according to the preview posture data is obtained, and the edited posture data generated after editing the preview posture data is obtained. , and finally play the video corresponding to the panoramic image data based on the edited posture data and preview posture data. Thereby, the video corresponding to the panoramic image data is played through the angle corresponding to the edited posture data and the preview posture data.
请参阅图6,图6是本申请实施例提供的数据处理方法的第一流程示意图,该数据处理方法针对于录制设备,该数据处理方法可以包括如下步骤:Please refer to Figure 6. Figure 6 is a first flow diagram of a data processing method provided by an embodiment of the present application. The data processing method is directed to a recording device. The data processing method may include the following steps:
410、采集全景图像数据。410. Collect panoramic image data.
录制设备上设置有三百六十度全景摄像头,通过全景摄像头捕获到全景图像数据,该全景图像数据为原生数据。The recording device is equipped with a 360-degree panoramic camera, and the panoramic image data is captured through the panoramic camera, and the panoramic image data is native data.
录制设备可以将全景图像数据转换为清晰度更低的预览全景图像数据,然后将预览全景图像数据发送给控制设备,从而实现用户通过控制设备预览该预览全景图像数据对应的全景画面。The recording device can convert the panoramic image data into preview panoramic image data with lower definition, and then send the preview panoramic image data to the control device, so that the user can preview the panoramic picture corresponding to the preview panoramic image data through the control device.
420、接收控制设备发送的预览姿态数据。420. Receive preview gesture data sent by the control device.
在一些实施方式中,录制设备还可以获取控制设备发送来的预览姿态数据,预览姿态数据内有对应的时间信息。比如不同时刻的预览姿态数据对应有一个时间戳。In some implementations, the recording device can also obtain preview gesture data sent from the control device, and the preview gesture data contains corresponding time information. For example, preview posture data at different times corresponds to a timestamp.
430、将相同时间的全景图像数据和预览姿态数据相关联,生成全景影像数据。430. Correlate the panoramic image data and preview posture data at the same time to generate panoramic image data.
在一些实施方式中,录制设备可以根据预览姿态数据的时间信息和全景图像数据的时间信息,将相同时间的全景图像数据和预览姿态数据相关联,生成关联文件;将关联文件设置在全景图像数据的尾部,生成全景影像数据。In some embodiments, the recording device can associate the panoramic image data and the preview posture data at the same time according to the time information of the preview posture data and the time information of the panoramic image data, and generate an associated file; set the associated file in the panoramic image data At the tail end, panoramic image data is generated.
440、将全景影像数据发送给控制设备。440. Send the panoramic image data to the control device.
录制设备可以通过无线通信的方式将全景影像数据发送给控制设备。The recording device can send panoramic image data to the control device through wireless communication.
在本申请实施例中,录制设备通过采集全景图像数据,然后接收控制 设备发送的预览姿态数据,再将相同时间的全景图像数据和预览姿态数据相关联,生成全景影像数据,最后将全景影像数据发送给控制设备。从而实现了将用户的预览姿态数据和全景图像数据相关联。In the embodiment of this application, the recording device collects panoramic image data and then receives control The preview posture data sent by the device is then associated with the panoramic image data and preview posture data at the same time to generate panoramic image data, and finally the panoramic image data is sent to the control device. Thus, the user's preview posture data and the panoramic image data are associated.
请参阅图7,图7是本申请实施例提供的视频处理装置的结构示意图。该视频处理装置500可以包括:Please refer to FIG. 7 , which is a schematic structural diagram of a video processing device provided by an embodiment of the present application. The video processing device 500 may include:
发送模块510,用于获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备。The sending module 510 is used to obtain corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device.
发送模块510,还用于确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值;The sending module 510 is also used to determine the difference between the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame;
若差值在预设差值范围外,则将第一预览姿态数据发送给录制设备;If the difference is outside the preset difference range, the first preview gesture data is sent to the recording device;
若差值在预设差值范围内,则停止将第一预览姿态数据发送给录制设备。If the difference is within the preset difference range, stop sending the first preview gesture data to the recording device.
发送模块510,还用于将当前视频帧的第一欧拉角数据转换为第一空间矢量,将前一视频帧的第二欧拉角数据转换为第二空间矢量;The sending module 510 is also used to convert the first Euler angle data of the current video frame into a first space vector, and convert the second Euler angle data of the previous video frame into a second space vector;
确定第一空间矢量和第二空间矢量之间的差值。The difference between the first space vector and the second space vector is determined.
获取模块520,用于获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成。The acquisition module 520 is used to acquire panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data.
提取模块530,用于从全景影像数据中提取预览姿态数据和全景图像数据。The extraction module 530 is used to extract preview gesture data and panoramic image data from panoramic image data.
播放模块540,用于根据预览姿态数据播放全景图像数据对应的视频。The play module 540 is used to play the video corresponding to the panoramic image data according to the preview gesture data.
播放模块540,还用于获取对预览姿态数据编辑后生成的已编辑姿态数据;根据已编辑姿态数据和预览姿态数据播放全景图像数据对应的视频。The playback module 540 is also used to obtain the edited posture data generated after editing the preview posture data; and play the video corresponding to the panoramic image data according to the edited posture data and the preview posture data.
播放模块540,还用于确定全景影像数据对应的第一关键帧以及第一关键帧对应的第一目标预览姿态数据;The playback module 540 is also used to determine the first key frame corresponding to the panoramic image data and the first target preview posture data corresponding to the first key frame;
获取对第一目标预览姿态数据编辑后生成的第一已编辑姿态数据。Obtain the first edited posture data generated after editing the first target preview posture data.
播放模块540,还用于确定第一关键帧对应的预设时间范围内是否有第二关键帧;The playback module 540 is also used to determine whether there is a second key frame within the preset time range corresponding to the first key frame;
若第一关键帧对应的预设时间范围内有第二关键帧,则获取第二关键 帧对应的第二已编辑姿态数据;If there is a second keyframe within the preset time range corresponding to the first keyframe, obtain the second keyframe The second edited posture data corresponding to the frame;
根据第一已编辑姿态数据和第二已编辑姿态数据播放第一关键帧和第二关键帧之间的全景图像数据对应的视频,根据预览姿态数据播放预设时间范围外的全景图像数据对应的视频。Play the video corresponding to the panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data, and play the video corresponding to the panoramic image data outside the preset time range based on the preview posture data. video.
播放模块540,还用于根据第一已编辑姿态数据和第二已编辑姿态数据,对第一关键帧和第二关键帧之间每一帧全景影像数据对应的姿态数据进行插值计算,得到第一关键帧和第二关键帧之间每一帧全景图像数据对应的插值姿态数据;The playback module 540 is also used to perform interpolation calculation on the posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame based on the first edited posture data and the second edited posture data, to obtain the third Interpolated posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame;
根据插值姿态数据播放第一关键帧和第二关键帧之间的全景图像数据对应的视频。Play the video corresponding to the panoramic image data between the first key frame and the second key frame according to the interpolated posture data.
在确定第一关键帧对应的预设时间范围内是否有第二关键帧之后,播放模块540,还用于若第一关键帧对应的预设时间范围内没有第二关键帧,则确定预设时间范围内时间起点对应的第一视频帧和时间终点对应的第二视频帧;After determining whether there is a second key frame within the preset time range corresponding to the first key frame, the playback module 540 is also configured to determine if there is no second key frame within the preset time range corresponding to the first key frame. The first video frame corresponding to the time starting point and the second video frame corresponding to the time end point within the time range;
根据第一视频帧对应的预览姿态数据和第二视频帧对应的预览姿态数据对第一关键帧的姿态数据进行插值计算,得到第一关键帧对应的第一插值姿态数据;Perform interpolation calculation on the posture data of the first key frame according to the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame to obtain the first interpolation posture data corresponding to the first key frame;
根据第一插值姿态数据和第一关键帧对应的全景图像数据显示第一关键帧对应的画面。Display the picture corresponding to the first key frame according to the first interpolation posture data and the panoramic image data corresponding to the first key frame.
在本申请实施例中,控制设备可以获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;然后获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;再从全景影像数据中提取预览姿态数据和全景图像数据;最后根据预览姿态数据播放全景图像数据对应的视频。从而实现在播放全景图像数据对应的视频时能够以用户的预览角度来播放视频。In the embodiment of this application, the control device can obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device; then obtain the panoramic image data sent by the recording device, and the panoramic image data is recorded by the recording device according to The panoramic image data and preview posture data are generated; then the preview posture data and panoramic image data are extracted from the panoramic image data; and finally the video corresponding to the panoramic image data is played based on the preview posture data. Thus, when playing the video corresponding to the panoramic image data, the video can be played from the user's preview angle.
请参阅图8,图8是本申请实施例提供的数据处理装置的结构示意图。该数据处理装置600可以包括:Please refer to FIG. 8 , which is a schematic structural diagram of a data processing device provided by an embodiment of the present application. The data processing device 600 may include:
采集模块610,用于采集全景图像数据。 Collection module 610 is used to collect panoramic image data.
接收模块620,用于接收控制设备发送的预览姿态数据。The receiving module 620 is used to receive preview gesture data sent by the control device.
关联模块630,用于将相同时间的全景图像数据和预览姿态数据相关联,生成全景影像数据。The correlation module 630 is used to correlate panoramic image data and preview posture data at the same time to generate panoramic image data.
关联模块630,还用于将相同时间的初始全景图像数据和预览姿态数据相关联,生成关联文件;The association module 630 is also used to associate the initial panoramic image data and preview posture data at the same time, and generate an association file;
将关联文件设置在全景图像数据的尾部,生成全景影像数据。Set the associated file at the end of the panoramic image data to generate the panoramic image data.
数据发送模块640,用于将全景影像数据发送给控制设备。The data sending module 640 is used to send panoramic image data to the control device.
在本申请实施例中,录制设备通过采集全景图像数据,然后接收控制设备发送的预览姿态数据,再将相同时间的全景图像数据和预览姿态数据相关联,生成全景影像数据,最后将全景影像数据发送给控制设备。从而实现了将用户的预览姿态数据和初始全景图像数据相关联。In the embodiment of this application, the recording device collects panoramic image data, then receives the preview posture data sent by the control device, then associates the panoramic image data and preview posture data at the same time to generate panoramic image data, and finally converts the panoramic image data into sent to the control device. Thus, the user's preview posture data and the initial panoramic image data are associated.
相应的,本申请实施例还提供一种电子设备,如图9所示,该电子设备可以包括有一个或一个以上计算机可读存储介质的存储器701、输入单元702、显示单元703、传感器704、包括有一个或者一个以上处理核心的处理器705、以及电源706等部件。本领域技术人员可以理解,图9中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:Correspondingly, embodiments of the present application also provide an electronic device. As shown in Figure 9 , the electronic device may include a memory 701 with one or more computer-readable storage media, an input unit 702, a display unit 703, a sensor 704, It includes a processor 705 with one or more processing cores, a power supply 706 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 9 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange different components. in:
存储器701可用于存储软件程序以及模块,处理器705通过运行存储在存储器701的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器701可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器701可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器701还可以包括存储器控制器,以提供处理器705和输入单元702对存储器701的访问。The memory 701 can be used to store software programs and modules. The processor 705 executes various functional applications and data processing by running the software programs and modules stored in the memory 701 . The memory 701 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store a program based on Data created by the use of electronic devices (such as audio data, phone books, etc.), etc. In addition, the memory 701 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 701 may also include a memory controller to provide the processor 705 and the input unit 702 with access to the memory 701 .
输入单元702可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元702可包括触敏表面以及其他输入 设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器705,并能接收处理器705发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元702还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 702 may be used to receive input numeric or character information, and to generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 702 may include a touch-sensitive surface as well as other input equipment. A touch-sensitive surface, also known as a touch display or trackpad, can collect the user's touch operations on or near it (such as the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface). operations near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the touch controller. to the processor 705, and can receive commands sent by the processor 705 and execute them. In addition, touch-sensitive surfaces can be implemented using a variety of types including resistive, capacitive, infrared, and surface acoustic waves. In addition to touch-sensitive surfaces, input unit 702 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, etc.
显示单元703可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元703可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器705以确定触摸事件的类型,随后处理器705根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图9中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 703 may be used to display information input by the user or information provided to the user as well as various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof. The display unit 703 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), organic light-emitting diode (OLED, Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near the touch-sensitive surface, it is sent to the processor 705 to determine the type of the touch event. The processor 705 then displays the display panel according to the type of the touch event. Corresponding visual output is provided on the panel. Although in FIG. 9 , the touch-sensitive surface and the display panel are used as two independent components to implement the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to implement the input and output functions.
电子设备还可包括至少一种传感器704,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于电子设备还可配置的陀螺仪、气压计、湿 度计、温度计、红外线传感器等其他传感器,在此不再赘述。The electronic device may also include at least one sensor 704, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light. The proximity sensor may close the display panel and/or when the electronic device moves to the ear. Backlight. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (usually three axes). It can detect the magnitude and direction of gravity when stationary. It can be used to identify applications of electronic device posture (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for electronic equipment, it can also be configured with gyroscope, barometer, hygrometer, etc. Other sensors such as thermometers, thermometers, and infrared sensors will not be described in detail here.
处理器705是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器701内的软件程序和/或模块,以及调用存储在存储器701内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器705可包括一个或多个处理核心;优选的,处理器705可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器705中。The processor 705 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 701, and calling data stored in the memory 701 , perform various functions of the electronic device and process data, thereby overall monitoring the electronic device. Optionally, the processor 705 may include one or more processing cores; preferably, the processor 705 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 705.
电子设备还包括给各个部件供电的电源706(比如电池),优选的,电源可以通过电源管理系统与处理器705逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源706还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 706 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 705 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. Power supply 706 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
尽管未示出,电子设备还可以包括摄像头、蓝牙模块等,在此不再赘述。具体在本实施例中,电子设备中的处理器705会加载存储器701上存储的计算机程序,处理器705通过加载计算机程序,从而实现各种功能:Although not shown, the electronic device may also include a camera, a Bluetooth module, etc., which will not be described again here. Specifically, in this embodiment, the processor 705 in the electronic device loads the computer program stored in the memory 701. The processor 705 loads the computer program to implement various functions:
获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;Obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device;
获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;Obtain the panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
从全景影像数据中提取预览姿态数据和全景图像数据;Extract preview pose data and panoramic image data from panoramic image data;
根据预览姿态数据播放全景图像数据对应的视频。Play the video corresponding to the panoramic image data according to the preview posture data.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过指令来完成,或通过指令控制相关的硬件来完成,该指令可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium, and loaded and executed by the processor.
为此,本申请实施例提供一种计算机可读存储介质,其中存储有多条指令,该指令能够被处理器进行加载,以执行本申请实施例所提供的任一种视频处理方法中的步骤。例如,该指令可以执行如下步骤: To this end, embodiments of the present application provide a computer-readable storage medium in which a plurality of instructions are stored, and the instructions can be loaded by the processor to execute the steps in any video processing method provided by the embodiments of the present application. . For example, this command can perform the following steps:
获取用户预览全景画面时对应的预览姿态数据,并将预览姿态数据发送给录制设备;Obtain the corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device;
获取录制设备发送的全景影像数据,全景影像数据由录制设备根据录制的全景图像数据和预览姿态数据生成;Obtain the panoramic image data sent by the recording device. The panoramic image data is generated by the recording device based on the recorded panoramic image data and preview posture data;
从全景影像数据中提取预览姿态数据和全景图像数据;Extract preview pose data and panoramic image data from panoramic image data;
根据预览姿态数据播放全景图像数据对应的视频。Play the video corresponding to the panoramic image data according to the preview posture data.
以上各个操作的具体实施可参见前面的实施例,在此不再赘述。For the specific implementation of each of the above operations, please refer to the previous embodiments and will not be described again here.
其中,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。Among them, the storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
由于该存储介质中所存储的指令,可以执行本申请实施例所提供的任一种视频处理方法中的步骤,因此,可以实现本申请实施例所提供的任一种视频处理方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the instructions stored in the storage medium can execute the steps in any video processing method provided by the embodiments of this application, therefore, it is possible to achieve what can be achieved by any video processing method provided by the embodiments of this application. The beneficial effects can be found in the previous embodiments for details and will not be described again here.
以上对本申请实施例所提供的一种视频处理方法、装置、电子设备及存储介质进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。 The above has introduced in detail a video processing method, device, electronic equipment and storage medium provided by the embodiments of the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only It is used to help understand the methods and core ideas of this application; at the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the ideas of this application. In summary, this specification The contents should not be construed as limitations on this application.

Claims (11)

  1. 一种视频处理方法,其特征在于,包括:A video processing method, characterized by including:
    获取用户预览全景画面时对应的预览姿态数据,并将所述预览姿态数据发送给录制设备;Obtain corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device;
    获取所述录制设备发送的全景影像数据,所述全景影像数据由所述录制设备根据录制的全景图像数据和所述预览姿态数据生成;Obtain panoramic image data sent by the recording device, and the panoramic image data is generated by the recording device based on the recorded panoramic image data and the preview posture data;
    从所述全景影像数据中提取所述预览姿态数据和所述全景图像数据;Extract the preview gesture data and the panoramic image data from the panoramic image data;
    根据所述预览姿态数据播放所述全景图像数据对应的视频。Play the video corresponding to the panoramic image data according to the preview gesture data.
  2. 根据权利要求1所述的视频处理方法,其特征在于,所述获取用户预览全景画面时对应的预览姿态数据,并将所述预览姿态数据发送给录制设备,包括:The video processing method according to claim 1, characterized in that, obtaining the corresponding preview gesture data when the user previews the panoramic picture, and sending the preview gesture data to the recording device, includes:
    确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值;Determine a difference between the first preview gesture data corresponding to the current video frame and the second preview gesture data corresponding to the previous video frame;
    若所述差值在预设差值范围外,则将所述第一预览姿态数据发送给所述录制设备;If the difference is outside the preset difference range, send the first preview gesture data to the recording device;
    若所述差值在所述预设差值范围内,则停止将所述第一预览姿态数据发送给所述录制设备。If the difference is within the preset difference range, stop sending the first preview gesture data to the recording device.
  3. 根据权利要求2所述的视频处理方法,其特征在于,所述预览姿态数据包括欧拉角数据,所述确定当前视频帧对应的第一预览姿态数据和前一视频帧对应的第二预览姿态数据之间的差值,包括:The video processing method according to claim 2, wherein the preview posture data includes Euler angle data, and the determining of the first preview posture data corresponding to the current video frame and the second preview posture corresponding to the previous video frame Differences between data, including:
    将所述当前视频帧的第一欧拉角数据转换为第一空间矢量,将所述前一视频帧的第二欧拉角数据转换为第二空间矢量;Convert the first Euler angle data of the current video frame into a first space vector, and convert the second Euler angle data of the previous video frame into a second space vector;
    确定所述第一空间矢量和所述第二空间矢量之间的差值。A difference between the first space vector and the second space vector is determined.
  4. 根据权利要求1所述的视频处理方法,其特征在于,所述根据所述预览姿态数据播放所述全景图像数据对应的视频,包括:The video processing method according to claim 1, wherein playing the video corresponding to the panoramic image data according to the preview gesture data includes:
    获取对所述预览姿态数据编辑后生成的已编辑姿态数据;Obtain edited posture data generated after editing the preview posture data;
    根据所述已编辑姿态数据和所述预览姿态数据播放所述全景图像数据对应的视频。Play the video corresponding to the panoramic image data according to the edited posture data and the preview posture data.
  5. 根据权利要求4所述的视频处理方法,其特征在于,所述获取对所 述预览姿态数据编辑后生成的已编辑姿态数据,包括:The video processing method according to claim 4, characterized in that: obtaining the The edited posture data generated after editing the preview posture data includes:
    确定所述全景影像数据对应的第一关键帧以及所述第一关键帧对应的第一目标预览姿态数据;Determine the first key frame corresponding to the panoramic image data and the first target preview posture data corresponding to the first key frame;
    获取对所述第一目标预览姿态数据编辑后生成的第一已编辑姿态数据。Obtain the first edited posture data generated after editing the first target preview posture data.
  6. 根据权利要求5所述的视频处理方法,其特征在于,所述根据所述已编辑姿态数据和所述预览姿态数据播放所述全景图像数据对应的视频,包括:The video processing method according to claim 5, wherein playing the video corresponding to the panoramic image data according to the edited posture data and the preview posture data includes:
    确定所述第一关键帧对应的预设时间范围内是否有第二关键帧;Determine whether there is a second key frame within the preset time range corresponding to the first key frame;
    若所述第一关键帧对应的预设时间范围内有第二关键帧,则获取所述第二关键帧对应的第二已编辑姿态数据;If there is a second key frame within the preset time range corresponding to the first key frame, obtain the second edited posture data corresponding to the second key frame;
    根据所述第一已编辑姿态数据和所述第二已编辑姿态数据播放所述第一关键帧和所述第二关键帧之间的全景图像数据对应的视频,根据所述预览姿态数据播放所述预设时间范围外的全景图像数据对应的视频。The video corresponding to the panoramic image data between the first key frame and the second key frame is played according to the first edited posture data and the second edited posture data, and the video corresponding to the panoramic image data between the first key frame and the second key frame is played according to the preview posture data. The video corresponding to the panoramic image data outside the preset time range.
  7. 根据权利要求6所述的视频处理方法,其特征在于,所述根据所述第一已编辑姿态数据和所述第二已编辑姿态数据播放所述第一关键帧和所述第二关键帧之间的全景图像数据对应的视频,包括:The video processing method according to claim 6, wherein the first key frame and the second key frame are played according to the first edited posture data and the second edited posture data. The video corresponding to the panoramic image data, including:
    根据所述第一已编辑姿态数据和所述第二已编辑姿态数据,对所述第一关键帧和所述第二关键帧之间每一帧全景影像数据对应的姿态数据进行插值计算,得到所述第一关键帧和所述第二关键帧之间每一帧全景图像数据对应的插值姿态数据;According to the first edited posture data and the second edited posture data, interpolation calculation is performed on the posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame to obtain Interpolated posture data corresponding to each frame of panoramic image data between the first key frame and the second key frame;
    根据所述插值姿态数据播放所述第一关键帧和所述第二关键帧之间的全景图像数据对应的视频。Play the video corresponding to the panoramic image data between the first key frame and the second key frame according to the interpolation gesture data.
  8. 根据权利要求6所述的视频处理方法,其特征在于,在所述确定所述第一关键帧对应的预设时间范围内是否有第二关键帧之后,所述方法还包括:The video processing method according to claim 6, wherein after determining whether there is a second key frame within the preset time range corresponding to the first key frame, the method further includes:
    若所述第一关键帧对应的预设时间范围内没有所述第二关键帧,则确定所述预设时间范围内时间起点对应的第一视频帧和时间终点对应的第二视频帧; If there is no second key frame within the preset time range corresponding to the first key frame, then determine the first video frame corresponding to the time starting point and the second video frame corresponding to the time end point within the preset time range;
    根据所述第一视频帧对应的预览姿态数据和所述第二视频帧对应的预览姿态数据对所述第一关键帧的姿态数据进行插值计算,得到所述第一关键帧对应的第一插值姿态数据;Interpolation calculation is performed on the posture data of the first key frame according to the preview posture data corresponding to the first video frame and the preview posture data corresponding to the second video frame to obtain the first interpolation value corresponding to the first key frame. attitude data;
    根据所述第一插值姿态数据和所述第一关键帧对应的全景图像数据显示所述第一关键帧对应的画面。The picture corresponding to the first key frame is displayed according to the first interpolation posture data and the panoramic image data corresponding to the first key frame.
  9. 一种视频处理装置,其特征在于,包括:A video processing device, characterized by including:
    发送模块,用于获取用户预览全景画面时对应的预览姿态数据,并将所述预览姿态数据发送给录制设备;A sending module, used to obtain corresponding preview posture data when the user previews the panoramic picture, and send the preview posture data to the recording device;
    获取模块,用于获取所述录制设备发送的全景影像数据,所述全景影像数据由所述录制设备根据录制的全景图像数据和所述预览姿态数据生成;An acquisition module, configured to acquire panoramic image data sent by the recording device, where the panoramic image data is generated by the recording device based on the recorded panoramic image data and the preview gesture data;
    提取模块,用于从所述全景影像数据中提取所述预览姿态数据和所述全景图像数据;An extraction module, configured to extract the preview gesture data and the panoramic image data from the panoramic image data;
    播放模块,用于根据所述预览姿态数据播放所述全景图像数据对应的视频。A playback module, configured to play the video corresponding to the panoramic image data according to the preview gesture data.
  10. 一种电子设备,其特征在于,包括:An electronic device, characterized by including:
    存储有可执行程序代码的存储器、与所述存储器耦合的处理器;A memory storing executable program code, a processor coupled to the memory;
    所述处理器调用所述存储器中存储的所述可执行程序代码,执行如权利要求1至8任一项所述的视频处理方法中的步骤。The processor calls the executable program code stored in the memory to execute the steps in the video processing method according to any one of claims 1 to 8.
  11. 一种存储介质,其特征在于,所述存储介质存储有多条指令,所述指令适于处理器进行加载,以执行权利要求1至10任一项所述的视频处理方法中的步骤。 A storage medium, characterized in that the storage medium stores a plurality of instructions, and the instructions are suitable for loading by a processor to execute the steps of the video processing method described in any one of claims 1 to 10.
PCT/CN2023/094199 2022-05-19 2023-05-15 Video processing method and apparatus, electronic device and storage medium WO2023221923A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210546992.2 2022-05-19
CN202210546992.2A CN117131225A (en) 2022-05-19 2022-05-19 Video processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2023221923A1 true WO2023221923A1 (en) 2023-11-23

Family

ID=88834616

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/094199 WO2023221923A1 (en) 2022-05-19 2023-05-15 Video processing method and apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN117131225A (en)
WO (1) WO2023221923A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108769739A (en) * 2018-06-27 2018-11-06 哈尔滨市舍科技有限公司 The method that picture and short-sighted frequency are obtained from panoramic video
CN108924590A (en) * 2018-06-27 2018-11-30 哈尔滨市舍科技有限公司 Video playing and camera system
US20190219824A1 (en) * 2015-09-07 2019-07-18 Sony Interactive Entertainment Inc. Information processing apparatus and image generating method
CN111131735A (en) * 2019-12-31 2020-05-08 歌尔股份有限公司 Video recording method, video playing method, video recording device, video playing device and computer storage medium
CN113301249A (en) * 2021-05-07 2021-08-24 影石创新科技股份有限公司 Panoramic video processing method and device, computer equipment and storage medium
WO2022095543A1 (en) * 2020-11-04 2022-05-12 贝壳技术有限公司 Image frame stitching method and apparatus, readable storage medium, and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190219824A1 (en) * 2015-09-07 2019-07-18 Sony Interactive Entertainment Inc. Information processing apparatus and image generating method
CN108769739A (en) * 2018-06-27 2018-11-06 哈尔滨市舍科技有限公司 The method that picture and short-sighted frequency are obtained from panoramic video
CN108924590A (en) * 2018-06-27 2018-11-30 哈尔滨市舍科技有限公司 Video playing and camera system
CN111131735A (en) * 2019-12-31 2020-05-08 歌尔股份有限公司 Video recording method, video playing method, video recording device, video playing device and computer storage medium
WO2022095543A1 (en) * 2020-11-04 2022-05-12 贝壳技术有限公司 Image frame stitching method and apparatus, readable storage medium, and electronic device
CN113301249A (en) * 2021-05-07 2021-08-24 影石创新科技股份有限公司 Panoramic video processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117131225A (en) 2023-11-28

Similar Documents

Publication Publication Date Title
US11640235B2 (en) Additional object display method and apparatus, computer device, and storage medium
CN109819313B (en) Video processing method, device and storage medium
WO2021135655A1 (en) Method and device for generating multimedia resources
CN109313812B (en) Shared experience with contextual enhancements
WO2017036329A1 (en) Method and device for playing video content at any position and time
US9992429B2 (en) Video pinning
CN111010510B (en) Shooting control method and device and electronic equipment
US10622021B2 (en) Method and system for video editing
KR20200032055A (en) Method and program for making reactive video
WO2021135678A1 (en) Editing template generating method and apparatus, electronic device, and storage medium
US11922694B2 (en) Systems and methods for augmented reality application for annotations and adding interfaces to control panels and screens
CN110572716B (en) Multimedia data playing method, device and storage medium
CN112261481B (en) Interactive video creating method, device and equipment and readable storage medium
WO2018204100A1 (en) Control video playback speed based on user interaction
US20200106967A1 (en) System and method of configuring a virtual camera
KR20230130748A (en) Image processing methods and apparatus, devices and media
CN111312207B (en) Text-to-audio method, text-to-audio device, computer equipment and storage medium
WO2023221923A1 (en) Video processing method and apparatus, electronic device and storage medium
US20150215530A1 (en) Universal capture
US11557065B2 (en) Automatic segmentation for screen-based tutorials using AR image anchors
WO2023221929A1 (en) Image display method and apparatus, electronic device, and storage medium
US20220245887A1 (en) Image processing device and image processing method
CN115734016A (en) Comment information display method and device, computer equipment and storage medium
CN117421425A (en) Relationship map creation method, device, terminal and storage medium
CN116489465A (en) Method and device for generating video notes for video and electronic equipment

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

Country of ref document: EP

Kind code of ref document: A1