WO2020125604A1 - 数据传输方法、装置、设备及存储介质 - Google Patents

数据传输方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020125604A1
WO2020125604A1 PCT/CN2019/125848 CN2019125848W WO2020125604A1 WO 2020125604 A1 WO2020125604 A1 WO 2020125604A1 CN 2019125848 W CN2019125848 W CN 2019125848W WO 2020125604 A1 WO2020125604 A1 WO 2020125604A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
session connection
video images
target splicing
target
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2019/125848
Other languages
English (en)
French (fr)
Inventor
辛安民
陈杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Publication of WO2020125604A1 publication Critical patent/WO2020125604A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • Embodiments of the present application relate to the field of network technology, and in particular, to a data transmission method, device, device, and storage medium.
  • some camera devices may be equipped with multiple cameras, and the multiple cameras can be used to shoot different angles of a scene at the same time point to obtain multiple video images at different angles.
  • a multi-angle spliced video image corresponding to the time point can be obtained, for example, a 360-degree panorama, so that as the shooting time increases, multiple angles can be obtained.
  • Video of stitched video images may be obtained.
  • the camera device when it is necessary to send video captured by a camera device equipped with multiple cameras to a terminal for display, the camera device generally shoots multiple images obtained by the multiple cameras at each time point based on the stitching parameters The video image is stitched to obtain the stitched video image corresponding to each time point. After that, the spliced video image corresponding to each time point is sent to the terminal for display by the terminal.
  • the camera device needs hardware support to stitch multiple video images, the hardware requirements for the camera device configuration are high, and the hardware cost is high. Even some current hardware may not support higher resolution video images. Stitching processing.
  • the embodiments of the present application provide a data transmission method, device, device, and storage medium, which can solve the problem of high hardware cost caused by the splicing processing of video images by the camera device, and even the problem that some hardware cannot be supported.
  • the technical solution is as follows:
  • a data transmission method which is applied to a camera device configured with a plurality of cameras for shooting different shooting angles.
  • the method includes:
  • the target splicing parameter is used for splicing video images captured by the multiple cameras at the same time point;
  • the target splicing parameter and the video images captured by the multiple cameras are sent to the terminal.
  • the sending the target splicing parameter and the video images captured by the multiple cameras to the terminal through a session connection with the terminal includes:
  • Establishing a session connection with the terminal in establishing a session connection with the terminal, by establishing a session connection protocol of the session connection, sending the target splicing parameter to the terminal, and based on A preset data transmission protocol is used to send video images captured by the multiple cameras to the terminal through a session connection established with the terminal.
  • sending the target splicing parameter to the terminal through a session connection protocol that establishes the session connection includes:
  • the session connection protocol includes the session description protocol SDP
  • a media description attribute is defined in the SDP
  • the sending a video image captured by the multiple cameras to the terminal based on a preset data transmission protocol through a session connection established with the terminal includes:
  • the synchronously processed video image is sent to the terminal through the session connection established with the terminal.
  • a session connection with the terminal is established, based on the preset data transmission protocol, through the session connection established with the terminal, the target splicing parameters and the multiple cameras are captured
  • the video image is sent to the terminal.
  • the target splicing parameter and the video images captured by the multiple cameras are sent to the terminal, include:
  • the preset data transmission protocol is the RTP protocol
  • the RTP data packet after the addition process is sent to the terminal through the session connection established with the terminal.
  • the adding the target splicing parameter to the target field of the header of the RTP data packet includes:
  • the method further includes:
  • the field in the header of the RTP data packet used to indicate whether the padding field is empty is set to a first value, and the first value is used to indicate that the padding field is not empty.
  • the method further includes:
  • the field in the header of the RTP data packet used to indicate whether the extended field is empty is set to a second value, and the second value is used to indicate that the extended field is not empty.
  • a data transmission device configured in a camera device configured with a plurality of cameras for shooting different shooting angles.
  • the device includes:
  • the receiving module is used to receive the data request from the terminal;
  • An obtaining module configured to obtain a target splicing parameter based on the data request, and the target splicing parameter is used for splicing video images captured by the multiple cameras at the same time point;
  • the sending module is configured to send the target splicing parameter and the video images captured by the multiple cameras to the terminal through a session connection with the terminal.
  • the sending module is used to:
  • Establishing a session connection with the terminal in establishing a session connection with the terminal, by establishing a session connection protocol of the session connection, sending the target splicing parameter to the terminal, and based on A preset data transmission protocol is used to send video images captured by the multiple cameras to the terminal through a session connection established with the terminal.
  • the sending module is used to:
  • the session connection protocol includes the session description protocol SDP
  • a media description attribute is defined in the SDP
  • the sending module is used to:
  • the synchronously processed video image is sent to the terminal through the session connection established with the terminal.
  • the sending module is also used to:
  • the sending module is used to:
  • the preset data transmission protocol is the RTP protocol
  • the RTP data packet after the addition process is sent to the terminal through the session connection established with the terminal.
  • the sending module is used to:
  • the sending module is used to:
  • the field in the header of the RTP data packet used to indicate whether the padding field is empty is set to a first value, and the first value is used to indicate that the padding field is not empty.
  • the sending module is used to:
  • the field in the header of the RTP data packet used to indicate whether the extended field is empty is set to a second value, and the second value is used to indicate that the extended field is not empty.
  • a computer-readable storage medium on which instructions are stored, and when the instructions are executed by a processor, the data transmission method according to the first aspect described above is implemented.
  • a computer program product containing instructions, which when executed on a computer, causes the computer to execute the data transmission method described in the first aspect above.
  • a device includes a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory communicate with each other through the communication bus.
  • the memory is used to store a computer program, and the processor is used to execute the program stored on the memory to implement the data transmission method described in the first aspect.
  • the target splicing parameter is used for splicing video images captured by multiple cameras at the same time point.
  • the target stitching parameters and the video images captured by multiple cameras are sent to the terminal, so that the terminal performs stitching processing on multiple video images corresponding to each same time point based on the target stitching parameters. In this way, it avoids the need for the camera device to perform the stitching process, and solves the problems that the hardware requirements of the camera device are relatively high, and some hardware cannot even support the high-resolution video image stitching process.
  • Fig. 1 is a schematic diagram of an implementation environment according to an exemplary embodiment
  • Fig. 2 is a flow chart showing a data transmission method according to an exemplary embodiment
  • Fig. 3 is a schematic diagram of stitching and displaying video images according to an exemplary embodiment
  • Fig. 4 is a frame diagram of a data transmission method according to an exemplary embodiment
  • Fig. 5 is a flow chart showing a method for data transmission according to another exemplary embodiment
  • Fig. 6 is a schematic diagram of a header of an RTP data packet according to an exemplary embodiment
  • Fig. 7 is a schematic diagram of a header of an RTP data packet according to another exemplary embodiment
  • Fig. 8 is a schematic structural diagram of a data transmission device according to an exemplary embodiment
  • Fig. 9 is a schematic structural diagram of a data transmission device according to another exemplary embodiment.
  • a multi-angle video image such as a panoramic image
  • a multi-camera integrated camera device for multi-angle shooting
  • multiple video images obtained by the multiple cameras at the same time point can be captured
  • Perform stitching processing to obtain multi-angle video images corresponding to each time point, and then display the stitched video images, for example, send them to the terminal for display.
  • the video image is generally spliced by the camera device to obtain the spliced video image, and then encoded and transmitted to the terminal for display.
  • the camera device cuts and splices the stitched video image, and then synthesizes a composite stream for transmission to the terminal.
  • the parameters of the multiple video images used in the stitching process are consistent, for example, the parameter includes information such as resolution and frame rate, and thus, the stitching process of the video image is limited.
  • the camera device may also establish multiple data transmission channels with the terminal to send video images captured by multiple cameras to the terminal through the multiple data transmission channels.
  • the video streams transmitted by multiple data transmission channels are managed synchronously, and multiple video images obtained after synchronization can be spliced according to a certain strategy to obtain spliced video images corresponding to each time point.
  • the terminal is added Management burden.
  • the data loss of a certain data transmission channel occurs during video image transmission, it may cause terminal synchronization errors.
  • the embodiments of the present application provide a data transmission method, which can solve the above-mentioned problems.
  • a data transmission method which can solve the above-mentioned problems.
  • FIG. 1 is a schematic diagram of an implementation environment according to an exemplary embodiment.
  • the implementation environment includes a camera device 110 and a terminal 120, and a connection may be established between the camera device 110 and the terminal 120 through a wired network or a wireless network.
  • the camera device 110 may be used to implement the data transmission method provided by the embodiments of the present application.
  • the camera device 110 is configured with a plurality of cameras, and can shoot different shooting angles of a scene through the plurality of cameras.
  • the camera device 110 is a camera device integrating multiple cameras.
  • the terminal 120 can be used to display video images. Further, the terminal 120 can also be used to store video images sent by the camera device 110, for example, the video images can be stored in a file format. In some embodiments, the terminal 120 may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, a portable computer, etc., which is not limited in the embodiments of the present application.
  • the data transmission method provided by the embodiments of the present application will be described in detail with reference to the accompanying drawings.
  • the target splicing parameters used for video image splicing processing can be transmitted to the terminal in different ways.
  • the following embodiments shown in FIG. 2 and FIG. 5 The data transmission method is introduced in detail.
  • Fig. 2 is a flowchart of a data transmission method according to an exemplary embodiment.
  • the data transmission method may be applied to the implementation environment shown in Fig. 1 above.
  • the data transmission method may include the following implementation steps:
  • Step 201 Receive a data request from the terminal.
  • the camera device can shoot different shooting angles through the configured multiple cameras to obtain video images at different angles. Moreover, in the implementation, the multiple cameras simultaneously perform shooting operations, that is, the multiple cameras shoot different shooting angles at the same time point to obtain multiple video images corresponding to each time point. Further, the camera device may store video images captured by the multiple cameras at each time point, and store a shooting time stamp corresponding to each video image.
  • the terminal may send a data request to the camera device, and the data request is used to instruct the camera device to send the video image to the terminal.
  • the terminal may send the data request to the camera device after receiving the data request instruction.
  • the data request instruction can be triggered by a user, and the user can be triggered by a preset operation.
  • the preset operation may include a click operation, a slide operation, a shake operation, etc., which is not limited in the embodiment of the present application.
  • the terminal may provide a video display interface, and the video display interface may provide a data request option and an address input box.
  • the user can enter the address information of the camera device where the video is to be obtained in the address input box, for example, the address information may be URL (Uniform Resource Locator) information of the camera device.
  • the address information may be URL (Uniform Resource Locator) information of the camera device.
  • the user can click the data request option to trigger the data request instruction.
  • the data request instruction carries the address information.
  • the terminal After receiving the data request instruction, the terminal sends a data request to the corresponding camera device based on the address information.
  • Step 202 Request a target splicing parameter based on the data, and the target splicing parameter is used for splicing video images captured by the multiple cameras at the same time point.
  • the camera device After receiving the data request, the camera device obtains the target splicing parameters.
  • the target stitching parameters include but are not limited to the number of images to be stitched, video image track information, position information of each video image, internal parameters and external parameters of the camera device. When the number and shooting orientation of the multiple cameras are unchanged, the target splicing parameters will not change.
  • the number of images to be spliced is used to indicate how many video images to be spliced at each same time point.
  • the number of images to be stitched can be understood as the number of multiple cameras configured by the camera device.
  • the above-mentioned video image track information includes track information corresponding to each video image in a data packet of multiple video images corresponding to each same time point, that is, based on the video image track information, each video image can be determined from the data packet.
  • the video images captured by a camera, wherein the data packet can be used to transmit at least multiple video images corresponding to each same time point.
  • the splicing order between multiple video images corresponding to each same time point can be determined based on the location information of each video image, that is, in multiple video images corresponding to each same time point, each The position information of the video image can be used to indicate its splicing position in the multiple video images.
  • the position information of each video image may include the upper left vertex pixel coordinates and the lower right vertex pixel coordinates of each video image.
  • the pixel coordinate of the upper left vertex of a video image A is (0,0), and the pixel coordinate of the lower right vertex is (0.300,1.000), and the video images taken at the same time as the video image also include video image B and video Image C
  • the pixel coordinate of the upper left vertex of the video image B is (0.300,0.000)
  • the pixel coordinate of the lower right vertex is (0.600, 1.000)
  • the pixel coordinate of the upper left vertex of the video image C is (0.600,0.000)
  • the pixel coordinates are (1.000, 1.000).
  • the stitching position of the video image A is before the video image B
  • the stitching position of the video image B is before the video image C.
  • the stitching sequence is shown in FIG. 3.
  • the 3D pixel coordinates can be converted into 2D pixel coordinates before the stitching processing.
  • the perspective transformation formula may be used to transform the 3D pixel coordinates into 2D pixel coordinates based on the internal and external parameters of the camera device, for example, so that the converted 2D pixel coordinates may include vertex pixel coordinates.
  • the internal reference of the above-mentioned imaging device refers to description information of multiple cameras of the imaging device, for example, the description information includes focal length and the like.
  • the external parameter of the camera device refers to the orientation information of multiple cameras, that is, it can be used to indicate the shooting orientation of each camera in the multiple cameras.
  • Step 203 Establish a session connection with the terminal, and in the process of establishing a session connection with the terminal, send the target splicing parameter to the terminal by establishing a session connection protocol of the session connection.
  • the target splicing parameters and the video images captured by the multiple cameras may be sent to the terminal through a session connection with the terminal, to The terminal performs stitching processing on the video image based on the target stitching parameters.
  • the target splicing parameter can be sent to the terminal by establishing the session connection protocol of the session connection, that is, before sending the video image to the terminal, Send the target splicing parameter to the terminal.
  • a specific implementation of sending the target splicing parameter to the terminal through a session connection protocol for establishing the session connection may include: when the session When the connection protocol includes SDP (Session Description Protocol), during the establishment of the session connection with the terminal, the media description attribute is defined in the SDP, and the target splicing parameter is added to the media description in the SDP The text line corresponding to the attribute.
  • SDP Session Description Protocol
  • the session connection protocol is RTSP (Real Time Time Streaming Protocol)
  • the RTSP protocol includes SDP.
  • the target splicing parameter can be carried through the SDP, so that during the session establishment process, the The target splicing parameter is sent to the terminal.
  • the description of the media description attribute a defined in SDP is as follows:
  • the target stitching parameter can be added to the text line corresponding to the media description attribute a in the SDP.
  • the text line also includes multiple correspondingly.
  • the description of the multiple text lines can be as follows:
  • the minimum value of the ⁇ flag> may be 0. At this time, it indicates that there is one video image corresponding to the same time point, that is, the image data to be spliced is 1, not 0.
  • the attribute value corresponding to the media description attribute may be set according to a preset calculation strategy and floating-point precision.
  • a intrinsic camera parameters: ⁇ fx0, fy0, Cx0, Cy0, K10, K20, P10, P20> are used to identify the internal parameters of the camera equipment.
  • a extrinsic camera parameters: ⁇ RotateMatrix0 Tx0 T90 Tz0> is used to identify the external parameters of the camera device.
  • the actual value needs to be determined based on the above-mentioned preset calculation strategy and floating-point precision.
  • the target splicing parameters carried by the SDP can be expressed as follows:
  • a camera_id:0 0x12345678//0and 0x12345678 is a pair
  • a intrinsic camera parameters: 123, 5, 124, 6, 127, 8, 129, 9, 0, 10, 0, 11, 0, 12, 0, 13
  • a camera_id:1 0x2233445566//1and 0x2233445566is a pair
  • a intrinsic camera parameters: 123, 5, 124, 6, 127, 8, 129, 9, 0, 10, 0, 11, 0, 12, 0, 13
  • a camera_id: 2 0x3344556677//2and 0x3344556677 is a pair
  • a intrinsic camera parameters: 123, 5, 124, 6, 127, 8, 129, 9, 0, 10, 0, 11, 0, 12, 0, 13
  • the terminal extracts the target splicing parameter from the above SDP, and thereafter, can store the target splicing parameter.
  • the session connection protocol may also be UDP (User Datagram Protocol) or TCP. (Transmission Control Protocol) and other protocols, which are not limited in the embodiments of the present application.
  • UDP User Datagram Protocol
  • TCP Transmission Control Protocol
  • Step 204 Based on the preset data transmission protocol, through the session connection established with the terminal, send the video images captured by the multiple cameras to the terminal.
  • the preset data transmission protocol can be set in advance according to actual needs.
  • the preset data transmission protocol may be an RTP protocol, etc., which is not limited in the embodiments of the present application.
  • the camera device After the camera device sends the target splicing parameters to the terminal, it sends a video image to the terminal through the session connection established with the terminal.
  • the camera device synchronizes the video images captured by the multiple cameras at the same time point, and based on the preset data transmission protocol, through the session connection established with the terminal, the synchronized multiple pictures The video image is sent to the terminal.
  • the synchronization processing of the video image by the camera device described herein can be understood as a virtual source defined in the camera device, the virtual source can store multiple data streams, and the multiple data streams are the multiple cameras
  • the virtual source can manage the data stream of video images generated by the multiple cameras, for example, synchronizing the video images captured by multiple cameras at the same time point.
  • the parameters related to the multiple cameras can be independently set, for example, different resolutions, different frame rates, and different encoding methods can be set.
  • the specific implementation of sending the synchronized video image to the terminal through the session connection established with the terminal may include: The synchronously processed video image is added to the RTP data packet payload (also called payload), and the added RTP data packet is sent to the terminal through the session connection established with the terminal.
  • RTP data packet payload also called payload
  • Video playback includes real-time streaming playback and file playback.
  • the terminal may perform stitching processing on the video image based on the stored target stitching parameter and display the stitched image after stitching when the video needs to be played in real time.
  • the video image may be stored locally for later playback.
  • different file formats may be used to store the video image, for example, Use ISO (International Organization for Standardization) Base Format or MPEG-PS (Moving Pictures Experts Group-Program Stream) and MPEG-TS (Moving Picture Experts Group-Transport Stream, Moving Picture Experts Group-Transport Stream) format for storage.
  • the file format of the stored video image different storage methods may be used to reasonably store the target splicing parameters.
  • the file header of the file used to store video images can be extended, or a track can be added separately to store the target splicing parameters.
  • a preset ID (Identification) can be used to store the target splicing parameters.
  • the preset ID is used to indicate the target splicing parameters. Further, the preset ID can be based on actual needs Set in advance.
  • the terminal when the video image needs to be played back, the terminal performs stitching processing on the video image based on the stored target stitching parameters, and then displays the video image obtained by the stitching processing.
  • a data request from a terminal is received, and a target stitching parameter is obtained based on the data request, and the target stitching parameter is used for stitching video images captured by multiple cameras at the same time point.
  • the target stitching parameters and the video images captured by multiple cameras are sent to the terminal, so that the terminal performs stitching processing on multiple video images corresponding to each same time point based on the target stitching parameters.
  • it avoids the need for the camera device to perform the stitching process, and solves the problems that the hardware requirements of the camera device are relatively high, and some hardware cannot even support the high-resolution video image stitching process.
  • the multiple camera devices can set different parameters, which solves the problem of limited video image splicing processing in the related art.
  • the camera device before sending the video images captured by multiple cameras to the terminal, the camera device first synchronizes the obtained multiple video images, and sends the synchronized video images to the terminal through the session connection established with the terminal
  • the terminal that is, the embodiment of the present application transmits multiple video images through one session connection.
  • the terminal can directly perform splicing on the received synchronized video image based on the target splicing parameter, avoiding the need to establish multiple data transmission channels during the transmission process, and eliminating the need for the terminal to transmit video images on multiple data transmission channels Perform synchronization processing, so as to avoid the problem of synchronization disorder caused by the loss of transmission data of a certain data transmission channel, and thereby ensure the accuracy of video stitching.
  • Fig. 5 is a flowchart illustrating a data transmission method according to another exemplary embodiment. This embodiment is illustrated by applying the data transmission method to the implementation environment shown in Fig. 1.
  • the data transmission method may include the following Implementation steps:
  • Step 501 Receive a data request from the terminal.
  • step 201 in the embodiment shown in FIG. 2 above.
  • Step 502 Obtain a target stitching parameter based on the data, and the target stitching parameter is used for stitching video images captured by the multiple cameras at the same time point.
  • step 202 refers to step 202 in the embodiment shown in FIG. 2 above.
  • Step 503 Establish a session connection with the terminal.
  • the camera device may establish a session connection with the terminal based on the session connection protocol.
  • the session connection protocol may be the RTSP protocol, or may also be the TCP or UDP protocol, which is not limited in the embodiments of the present application.
  • Step 504 Based on the preset data transmission protocol, through the session connection established with the terminal, send the target splicing parameter and the video images captured by the multiple cameras to the terminal.
  • the target splicing parameters and the video images captured by the multiple cameras may be sent to the terminal through a session connection with the terminal, to The terminal performs stitching processing on the video image based on the target stitching parameters.
  • the target splicing parameter may be carried in the data packet transmitting the video image, and the target splicing parameter and the video image are sent to the terminal together through the established session connection with the terminal.
  • the target splicing parameter is added to the target field of the header of the RTP data packet, and the video images captured by the multiple cameras are added to the RTP In the payload of the data packet, the RTP data packet after the addition process is sent to the terminal through the session connection established with the terminal.
  • the camera device may add the target splicing parameter in the target field of the header of the first RTP data packet sent to the terminal.
  • the target splicing parameter since the target splicing parameter generally does not change, the target splicing parameter may be carried only in the header of the first RTP data packet sent to the terminal. Further, when the camera device detects that the target splicing parameter has changed, it may re-carry the changed target splicing parameter through the header of the RTP data packet.
  • the video images captured by the multiple cameras at the same time point can be synchronized, and then, The synchronized video image is added to the payload of the RTP packet.
  • the target splicing parameter is added to the padding field of the header of the RTP data packet. Further, a field in the header of the RTP data packet used to indicate whether the padding field is empty is set to a first value, and the first value is used for the padding field to be not empty.
  • the padding field is a padding field, which is used to indicate whether the padding field is empty or not.
  • the first value is "1", that is, when the P field is 1, it means
  • the padding field of the header of the RTP data packet has a padding part, where the last byte of the padding part represents the length of the part, and of course, the length includes the byte itself.
  • the target splicing parameter is added to the extension field of the header of the RTP data packet. Further, a field in the header of the RTP data packet used to indicate whether the extended field is empty is set to a second value, and the second value is used to indicate that the extended field is not empty.
  • the second numerical value may be the same as the first numerical value.
  • the second numerical value may also be "1".
  • the second numerical value may also be different from the first numerical value.
  • the extension field is an extension field, which is used to indicate whether the extension field is empty.
  • the field is the x field, and the second value is "1", that is, when the x field is 1, it means
  • the header of the RTP data packet includes an extension field.
  • CC indicates the number of CSRC fields.
  • M (marker bit): When the M field is set to 1, it indicates that the current RTP data packet is the last data packet of the transmitted unit.
  • PT pra9load t9pe
  • SN (sequence) number 16 bits, used to identify the order in which RTP data packets are sent, that is, the order that the receiving end sends to the decoder after receiving it.
  • Timestamp used to identify the collection time of the content contained in the RTP data packet.
  • Video playback includes real-time streaming playback and file playback.
  • the terminal After receiving the RTP data packet, the terminal obtains the target splicing parameters and the synchronously processed video image.
  • the video image can be spliced based on the carried target splicing parameters, and The stitched image after stitching is displayed.
  • the video image may be stored locally for later playback.
  • the target splicing parameters and the video image may be stored.
  • video files are stored in different file formats, for example, ISO Base Format or MPEG-PS and MPEG-TS formats can be used for storage.
  • the file format of the stored video image different storage methods may be used to reasonably store the target splicing parameters.
  • the file header of the file used to store video images can be extended, or a track can be added separately to store the target splicing parameters.
  • a preset ID may be used to store the target splicing parameter, and the preset ID is used to indicate the target splicing parameter. Further, the preset ID may be set in advance according to actual needs.
  • the terminal when the video image needs to be played back, the terminal performs stitching processing on the video image based on the stored target stitching parameters, and then displays the video image obtained by the stitching processing.
  • a data request from a terminal is received, and a target stitching parameter is obtained based on the data request, and the target stitching parameter is used for stitching video images captured by multiple cameras at the same time point.
  • the target stitching parameters and the video images captured by multiple cameras are sent to the terminal, so that the terminal performs stitching processing on multiple video images corresponding to each same time point based on the target stitching parameters.
  • it avoids the need for the camera device to perform the stitching process, and solves the problems of high hardware requirements for the camera device, and some hardware cannot even support the high-resolution video image stitching process.
  • the multiple camera devices can set different parameters, which solves the problem of limited video image splicing processing in the related art.
  • the camera device before sending the video images captured by multiple cameras to the terminal, the camera device first synchronizes the obtained multiple video images, and sends the synchronized video images to the terminal through the session connection established with the terminal
  • the terminal that is, the embodiment of the present application transmits multiple video images through one session connection.
  • the terminal can directly perform splicing on the received synchronized video image based on the target splicing parameter, avoiding the need to establish multiple data transmission channels during the transmission process, and eliminating the need for the terminal to transmit video images on multiple data transmission channels Perform synchronization processing, so as to avoid the problem of synchronization disorder caused by the loss of transmission data of a certain data transmission channel, and thereby ensure the accuracy of video stitching.
  • Fig. 8 is a schematic structural diagram of a data transmission device according to an exemplary embodiment.
  • the data transmission device may be implemented by software, hardware, or a combination of both.
  • the data transmission device may include:
  • the receiving module 810 is used to receive data requests from the terminal;
  • the obtaining module 820 is used to obtain a target splicing parameter based on the data request, and the target splicing parameter is used for splicing video images captured by the multiple cameras at the same time point;
  • the sending module 830 is configured to send the target splicing parameters and video images captured by the multiple cameras to the terminal through a session connection with the terminal.
  • the sending module 830 is used to:
  • Establishing a session connection with the terminal in establishing a session connection with the terminal, by establishing a session connection protocol of the session connection, sending the target splicing parameter to the terminal, and based on A preset data transmission protocol is used to send video images captured by the multiple cameras to the terminal through a session connection established with the terminal.
  • the sending module 830 is used to:
  • the session connection protocol includes the session description protocol SDP
  • a media description attribute is defined in the SDP
  • the sending module 830 is used to:
  • the synchronously processed video image is sent to the terminal through the session connection established with the terminal.
  • the sending module 830 is also used to:
  • the sending module 830 is used to:
  • the preset data transmission protocol is the RTP protocol
  • the RTP data packet after the addition process is sent to the terminal through the session connection established with the terminal.
  • the sending module 830 is used to:
  • the sending module 830 is used to:
  • the field in the header of the RTP data packet used to indicate whether the padding field is empty is set to a first value, and the first value is used to indicate that the padding field is not empty.
  • the sending module 830 is used to:
  • the field in the header of the RTP data packet used to indicate whether the extended field is empty is set to a second value, and the second value is used to indicate that the extended field is not empty.
  • a data request from a terminal is received, and a target stitching parameter is obtained based on the data request, and the target stitching parameter is used for stitching video images captured by multiple cameras at the same time point.
  • the target stitching parameters and the video images captured by multiple cameras are sent to the terminal, so that the terminal performs stitching processing on multiple video images corresponding to each same time point based on the target stitching parameters.
  • it avoids the need for the camera device to perform the stitching process, and solves the problems that the hardware requirements of the camera device are relatively high, and some hardware cannot even support the high-resolution video image stitching process.
  • the data transmission device provided in the above embodiments is only exemplified by the division of the above functional modules.
  • the above functions can be allocated by different functional modules as needed That is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the data transmission device and the data transmission method embodiment provided in the above embodiments belong to the same concept. For the specific implementation process, refer to the method embodiments, and details are not described here.
  • Fig. 9 is a schematic structural diagram of an imaging device according to an exemplary embodiment. Specifically:
  • the imaging apparatus 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901.
  • the camera device 900 also includes a basic input/output system (I/O system) 906 that helps transfer information between various devices in the computer, and a mass storage device for storing the operating system 913, application programs 914, and other program modules 915 907.
  • I/O system basic input/output system
  • the basic input/output system 906 includes a display 908 for displaying information and an input device 909 for a user to input information, such as a mouse and a keyboard.
  • the display 908 and the input device 909 are both connected to the central processing unit 901 through the input and output controller 910 connected to the system bus 905.
  • the basic input/output system 906 may also include an input-output controller 910 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus.
  • the input output controller 910 also provides output to a display screen, printer, or other type of output device.
  • the mass storage device 907 is connected to the central processing unit 901 through a mass storage controller (not shown) connected to the system bus 905.
  • the mass storage device 907 and its associated computer-readable medium provide non-volatile storage for the camera device 900. That is, the mass storage device 907 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
  • Computer-readable media may include computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory, or other solid-state storage technologies, CD-ROM, DVD, or other optical storage, tape cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices.
  • RAM random access memory
  • ROM read-only memory
  • EPROM Erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • flash memory or other solid-state storage technologies
  • CD-ROM, DVD or other optical storage
  • tape cassettes magnetic tape
  • magnetic disk storage or other magnetic storage devices.
  • computer storage medium is not limited to the above types.
  • the above-mentioned system memory 904 and mass storage device 907 may be collectively referred to as a memory.
  • the camera device 900 may also be operated by a remote computer connected to the network through a network such as the Internet. That is, the camera device 900 can be connected to the network 912 through the network interface unit 911 connected to the system bus 905, or the network interface unit 911 can also be used to connect to other types of networks or remote computer systems (not shown).
  • the above memory also includes one or more programs.
  • One or more programs are stored in the memory and configured to be executed by the CPU.
  • the one or more programs include a method for performing the data transmission provided by the embodiments of the present application.
  • An embodiment of the present application further provides a non-transitory computer-readable storage medium, and when the instructions in the storage medium are executed by the processor of the imaging device, the imaging device can perform the data transmission method provided in the foregoing embodiment.
  • An embodiment of the present application also provides a computer program product containing instructions, which when executed on a camera device, causes the camera device to execute the data transmission method provided by the above embodiment.
  • the program may be stored in a computer-readable storage medium.
  • the mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Studio Devices (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本申请公开了一种数据传输方法、装置、设备及存储介质,所述方法包括:接收来自终端的数据请求,基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接,通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。本申请通过一个会话连接向终端传输目标拼接参数和多张视频图像,避免需要摄像设备进行拼接处理,解决了对摄像设备的硬件要求较高、以及一些硬件甚至无法支持高分辨率视频图像的拼接处理的问题。

Description

数据传输方法、装置、设备及存储介质
本申请要求于2018年12月18日提交的申请号为201811547562.2、发明名称为“数据传输方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及网络技术领域,特别涉及一种数据传输方法、装置、设备及存储介质。
背景技术
随着智能电子设备的快速发展,有的摄像设备可能会配置有多个摄像头,通过该多个摄像头可以在同一时间点对某场景的不同角度进行拍摄,得到多张不同角度的视频图像。利用同一时间点对应的多张视频图像进行拼接可以得到该时间点对应的一张多角度的拼接视频图像,譬如,360度全景图,如此,随着拍摄时间的增加,即可得到包括多角度的拼接视频图像的视频。
在相关技术中,当需要将配置有多个摄像头的摄像设备拍摄的视频发送至终端进行显示时,一般由该摄像设备基于拼接参数,对该多个摄像头在每个时间点拍摄得到的多张视频图像进行拼接处理,得到每个时间点对应的拼接视频图像。之后,将每个时间点对应的拼接视频图像发送至终端,由终端进行显示。
然而,由于摄像设备对多张视频图像进行拼接处理时需要硬件支持,因此,对摄像设备配置的硬件要求较高,硬件成本较高,甚至当前一些硬件可能无法支持对较高分辨率的视频图像的拼接处理。
发明内容
本申请实施例提供了一种数据传输方法、装置、设备及存储介质,可以解决由摄像设备对视频图像进行拼接处理导致硬件成本较高,以及甚至一些硬件无法支持的问题。所述技术方案如下:
第一方面,提供了一种数据传输方法,应用于摄像设备中,所述摄像设备配置有多个摄像头,用于对不同拍摄角度进行拍摄所述方法包括:
接收来自终端的数据请求;
基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接;
通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
建立与所述终端之间的会话连接,在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议,将所述目标拼接参数发送至所述终端,以及基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议将所述目标拼接参数发送至所述终端,包括:
当所述会话连接协议包括会话描述协议SDP时,在建立与所述终端之间的会话连接过程中,在所述SDP中定义媒体描述属性;
将所述目标拼接参数添加至所述SDP中所述媒体描述属性对应的文本行。
可选地,所述基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
将所述多个摄像头在相同时间点拍摄得到的视频图像进行同步处理;
基于所述预设数据传输协议,通过与所述终端之间建立的会话连接将同步处理后的视频图像发送至所述终端。
可选地,建立与所述终端之间的会话连接,基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
当所述预设数据传输协议为RTP协议时,将所述目标拼接参数添加至RTP数据包的包头的目标字段中,以及将所述多个摄像头拍摄得到的视频图像添加至所述RTP数据包的负载中;
通过与所述终端之间建立的会话连接,将经过添加处理后的RTP数据包发 送至所述终端。
可选地,所述将所述目标拼接参数添加至RTP数据包的包头的目标字段中,包括:
将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中;
或者,
将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中。
可选地,所述将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中之后,还包括:
将所述RTP数据包的包头中用于指示所述填充字段是否为空的字段置为第一数值,所述第一数值用于指示所述填充字段不为空。
可选地,所述将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中之后,还包括:
将所述RTP数据包的包头中用于指示所述扩展字段是否为空的字段置为第二数值,所述第二数值用于指示所述扩展字段不为空。
第二方面,提供了一种数据传输装置,配置于摄像设备中,所述摄像设备配置有多个摄像头,用于对不同拍摄角度进行拍摄,所述装置包括:
接收模块,用于接收来自终端的数据请求;
获取模块,用于基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接;
发送模块,用于通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述发送模块用于:
建立与所述终端之间的会话连接,在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议,将所述目标拼接参数发送至所述终端,以及基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述发送模块用于:
当所述会话连接协议包括会话描述协议SDP时,在建立与所述终端之间的会话连接过程中,在所述SDP中定义媒体描述属性;
将所述目标拼接参数添加至所述SDP中所述媒体描述属性对应的文本行。
可选地,所述发送模块用于:
将所述多个摄像头在相同时间点拍摄得到的视频图像进行同步处理;
基于所述预设数据传输协议,通过与所述终端之间建立的会话连接将同步处理后的视频图像发送至所述终端。
可选地,所述发送模块还用于:
建立与所述终端之间的会话连接,基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述发送模块用于:
当所述预设数据传输协议为RTP协议时,将所述目标拼接参数添加至RTP数据包的包头的目标字段中,以及将所述多个摄像头拍摄得到的视频图像添加至所述RTP数据包的负载中;
通过与所述终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至所述终端。
可选地,所述发送模块用于:
将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中;
或者,
将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中。
可选地,所述发送模块用于:
将所述RTP数据包的包头中用于指示所述填充字段是否为空的字段置为第一数值,所述第一数值用于指示所述填充字段不为空。
可选地,所述发送模块用于:
将所述RTP数据包的包头中用于指示所述扩展字段是否为空的字段置为第二数值,所述第二数值用于指示所述扩展字段不为空。
第三方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述第一方面所述的数据传输方法。
第四方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的数据传输方法。
第五方面,提供了一种设备,所述设备包括处理器、通信接口、存储器和通信总线,所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信,所述存储器用于存放计算机程序,所述处理器用于执行所述存储器上所存放的程序,以实现上述第一方面所述的数据传输方法。
本申请实施例提供的技术方案带来的有益效果是:
接收来自终端的数据请求,基于数据请求获取目标拼接参数,该目标拼接参数用于多个摄像头在相同时间点拍摄得到的视频图像的拼接。通过与终端之间的会话连接,将目标拼接参数和多个摄像头拍摄得到的视频图像发送至终端,以便于终端基于该目标拼接参数对每个相同时间点对应的多张视频图像进行拼接处理。如此,避免需要摄像设备进行拼接处理,解决了对摄像设备的硬件要求较高、以及一些硬件甚至无法支持高分辨率视频图像的拼接处理的问题。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是根据一示例性实施例示出的一种实施环境的示意图;
图2是根据一示例性实施例示出的一种数据传输方法的流程图;
图3是根据一示例性实施例示出的一种视频图像的拼接显示示意图;
图4是根据一示例性实施例示出的一种数据传输方法的框架图;
图5是根据另一示例性实施例示出的一种数据传输方法的流程图;
图6是根据一示例性实施例示出的一种RTP数据包的包头的示意图;
图7是根据另一示例性实施例示出的一种RTP数据包的包头的示意图;
图8是根据一示例性实施例示出的一种数据传输装置的结构示意图;
图9是根据另一示例性实施例示出的一种数据传输装置的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例提供的数据传输方法进行详细介绍之前,先对本申请实施例涉及的应用场景和实施环境进行简单介绍。
首先,对本申请实施例涉及的应用场景进行简单介绍。
目前,为了得到诸如全景图之类的多角度的视频图像,一般可以采用多摄 像头一体的摄像设备进行多角度拍摄,然后,可以对通过该多个摄像头在相同时间点拍摄得到的多张视频图像进行拼接处理,从而得到每个时间点对应的多角度的视频图像,进而可以对拼接处理后的视频图像进行显示,譬如发送给终端进行显示。在实施中,当前一般是由摄像设备进行视频图像的拼接处理,得到拼接视频图像,之后再编码传输给终端来显示。然而,由于拼接处理需要硬件支持,也就是需要特定的显卡支持,因此,对摄像设备的硬件要求较高,甚至当前一些硬件无法支持高分辨率的视频图像的拼接处理,譬如,诸如Nvidia显卡或者AMD显卡不支持分辨率大于8K*8K的视频图像的拼接处理。
此外,由于经过拼接处理后得到的拼接视频图像较大,因此,将拼接视频图像发送给终端的传输延迟较长。在一些实施例中,为了减小传输时延,摄像设备对拼接视频图像进行切割、分段编码处理,之后合成一个复合流传输给终端。然而,在切割处理过程中通常要求拼接处理所采用的多张视频图像的参数一致,譬如,该参数包括分辨率、帧率等信息,如此,导致视频图像的拼接处理受限。
在另一些实施例,摄像设备还可能与终端之间建立多条数据传输通道,以分别通过该多条数据传输通道将多个摄像头拍摄得到的视频图像发送给终端,之后,需要由终端对该多条数据传输通道所传输的视频流进行同步管理,并可以按照一定的策略将同步后得到的多张视频图像进行拼接处理,以得到每个时间点对应的拼接视频图像,如此,增加了终端的管理负担。并且,一旦在视频图像传输过程中出现某数据传输通道的数据丢失现象,将可能导致终端同步出错。
为此,本申请实施例提供了一种数据传输方法,该数据传输方法能够解决上述存在的问题,其具体实现请参见如下图2和图5所示的实施例。
接下来,对本申请实施例涉及的实施环境进行简单介绍。
请参考图1,该图1是根据一示例性实施例示出的一种实施环境的示意图。该实施环境中包括摄像设备110和终端120,该摄像设备110与终端120之间可以通过有线网络或者无线网络建立连接。
其中,该摄像设备110可以用于实现本申请实施例提供的数据传输方法。该摄像设备110配置有多个摄像头,通过该多个摄像头可以对某场景的不同拍摄角度进行拍摄。在一些实施例中,该摄像设备110为多摄像头一体的摄像设备。
其中,该终端120可以用于显示视频图像,进一步地,该终端120还可以用于存储摄像设备110发送的视频图像,譬如,可以将视频图像以文件的格式进行存储。在一些实施例中,该终端120可以为手机、平板电脑、台式计算机、笔记本电脑、便携式计算机等等,本申请实施例对此不做限定。
在介绍完本申请实施例涉及的应用场景和实施环境后,接下来将结合附图对本申请实施例提供的数据传输方法进行详细介绍。在实施中,可以采用不同的方式将用于视频图像拼接处理的目标拼接参数传输给终端,在这里,根据目标拼接参数的传输方式不同,将通过如下图2和图5所示实施例分别对数据传输方法进行详细介绍。
图2是根据一示例性实施例示出的一种数据传输方法的流程图,该数据传输方法可以应用于上述图1所示的实施环境中,该数据传输方法可以包括如下几个实现步骤:
步骤201:接收来自终端的数据请求。
摄像设备可以分别通过配置的多个摄像头对不同的拍摄角度进行拍摄,得到不同角度的视频图像。并且,在实施中,该多个摄像头同时执行拍摄操作,也就是说,该多个摄像头在相同时间点对不同拍摄角度进行拍摄,得到每个时间点对应的多张视频图像。进一步地,摄像设备可以存储该多个摄像头在每个时间点拍摄得到的视频图像,并且,存储每张视频图像对应的拍摄时间戳。
如果需要在终端上显示拍摄的视频图像,终端可以向摄像设备发送数据请求,该数据请求用于指示摄像设备向终端发送视频图像。在一种可能的实现方式中,该终端可以在接收到数据请求指令后,向摄像设备发送该数据请求。
其中,该数据请求指令可以由用户触发,该用户可以通过预设操作触发。该预设操作可以包括点击操作、滑动操作、摇一摇操作等等,本申请实施例对此不作限定。
譬如,该终端可以提供视频显示界面,该视频显示界面中可以提供数据请求选项和地址输入框。用户可以在该地址输入框中输入所要获取的视频所在摄像设备的地址信息,譬如,该地址信息可以为摄像设备的URL(Uniform Resource Locator,统一资源定位符)信息。之后,用户可以点击该数据请求选项以触发数据请求指令,此时,该数据请求指令携带该地址信息。该终端接收到该数据请求指令后,基于该地址信息,向对应的摄像设备发送数据请求。
步骤202:基于该数据请求获取目标拼接参数,该目标拼接参数用于该多个摄像头在相同时间点拍摄得到的视频图像的拼接。
也即是,摄像设备接收数据请求后,获取目标拼接参数。在一些实施例中,该目标拼接参数包括但不限于待拼接图像数量、视频图像轨道信息、每张视频图像的位置信息、摄像设备的内参和外参。当该多个摄像头的数量和拍摄方位不变时,该目标拼接参数也不会发生变化。
其中,该待拼接图像数量用于指示在每个相同时间点对应有多少张视频图像待拼接。换句话说,该待拼接图像数量可以理解为该摄像设备配置的多个摄像头的数量。
其中,上述视频图像轨道信息包括每个相同时间点对应的多张视频图像中每张视频图像在数据包中对应的轨道信息,也就是说,基于该视频图像轨道信息可以从数据包中确定每个摄像头拍摄的视频图像,其中,该数据包至少可以用于传输每个相同时间点对应的多张视频图像。
其中,基于每张视频图像的位置信息可以确定每个相同时间点对应的多张视频图像之间的拼接顺序,也就是说,在每个相同时间点对应的多张视频图像中,该每张视频图像的位置信息可以用于指示其在该多张视频图像中的拼接位置。在一些实施例中,每张视频图像的位置信息可以包括每张视频图像的左上顶点像素坐标和右下顶点像素坐标。
譬如,某视频图像A的左上顶点像素坐标为(0,0),以及右下顶点像素坐标为(0.300,1.000),与该视频图像在相同时间点拍摄的视频图像还包括视频图像B和视频图像C,该视频图像B的左上顶点像素坐标为(0.300,0.000),右下顶点像素坐标为(0.600,1.000),该视频图像C的左上顶点像素坐标为(0.600,0.000),右下顶点像素坐标为(1.000,1.000)。如此,可以确定视频图像A的拼接位置位于视频图像B之前,视频图像B的拼接位置位于视频图像C之前,譬如,拼接顺序如图3所示。
需要说明的是,由于摄像设备拍摄得到的视频图像均包括3D像素坐标,为了实现视频图像的拼接处理,在拼接处理之前可以将3D像素坐标变换为2D像素坐标。在一种可能的实现方式中,可以基于摄像设备的内参和外参,采用透视变换公式将3D像素坐标变换为2D像素坐标,如,使得转换后的2D像素坐标可以包括顶点像素坐标。
其中,上述摄像设备的内参是指摄像设备的多个摄像头的描述信息,譬如 该描述信息包括焦距等。该摄像设备的外参是指多个摄像头的方位信息,也即是,可以用于指示每个摄像头在该多个摄像头中的拍摄方位。
步骤203:建立与该终端之间的会话连接,在建立与该终端之间的会话连接过程中,通过建立该会话连接的会话连接协议,将该目标拼接参数发送至该终端。
请参考图4,在实施中,为了减小摄像设备的运行负担,可以通过与该终端之间的会话连接,将该目标拼接参数和该多个摄像头拍摄得到的视频图像发送至该终端,以由终端基于目标拼接参数对视频图像进行拼接处理。
在本实施例中,可以在建立与终端之间的会话连接过程中,通过建立该会话连接的会话连接协议,将目标拼接参数发送给终端,也就是说,在向终端发送视频图像之前,先将该目标拼接参数发送给终端。
在一种可能的实现方式中,在建立与该终端之间的会话连接过程中,通过建立该会话连接的会话连接协议,将该目标拼接参数发送至该终端的具体实现可以包括:当该会话连接协议包括SDP(Session Description Protocol,会话描述协议)时,在建立与该终端之间的会话连接过程中,在该SDP中定义媒体描述属性,将该目标拼接参数添加至该SDP中该媒体描述属性对应的文本行。
譬如,当该会话连接协议为RTSP(Real Time Streaming Protocol,实时流传输协议)时,该RTSP协议包括SDP,此时,可以通过该SDP来携带该目标拼接参数,以在会话建立过程中,将该目标拼接参数发送给终端。
譬如,在SDP中定义媒体描述属性a的描述如下:
a=*(zero or more session attribute lines)
a=<attribute>
a=<attribute>:<value>
如此,可以将目标拼接参数添加至SDP中媒体描述属性a对应的文本行,当该目标拼接参数的数量为多个时,该文本行也相应地包括多个。譬如,该多个文本行的描述方式可以采用如下方式:
a=camera_flag:<flag>
a=camera_id:<0SSRC0>i∈(0,N)
a=fnp:<value>value∈(0,5)
a=position:<left-top,right-bottom>
a=intrinsic camera parameters:<fx0 fy0 Cx0 Cy0 K10 K20 P10 P20>
a=extrinsic camera parameters:<RotateMatrix0 Tx0 T90 Tz0>
其中,a=camera_flag:<flag>用于标识在相同时间点对应的多张视频图像的数量,即为待拼接图像数量。在这里,该<flag>的最小取值可以为0,此时说明在相同时间点对应有1张视频图像,即待拼接图像数据为1,而不是0。再如,假设该a=camera_flag:2,说明在相同时间点对应有三张视频图像,即该摄像设备配置有三个摄像头,此时待拼接图像数量为3。
其中,a=camera_id:<0SSRC0>i用于标识某个视频图像轨道信息,譬如,该媒体描述属性可以描述为a=camera_id:0 0x12345678,其中,“0”标识第一张视频图像,“0x12345678”为轨道标识,此时说明该轨道0x12345678对应的是第一张视频图像。
其中,a=fnp:<value>value用于标识目标拼接参数的浮点数精度,其取值范围可以为(0,5)。譬如,该浮点数精度可以设置为3,此时,该文本行可以描述为a=fnp:3。
其中,a=position:<left-top,right-bottom>用于标识每张视频图像的位置信息,具体可以包括左上顶点像素坐标和右下顶点像素坐标。在实施中,可以根据预设计算策略和浮点数精度来设置该媒体描述属性对应的属性值。
其中,该预设计算策略可以根据实际需求预先进行设置。假设该预设计算策略可以是指对应文本行中基于每相邻两个数值之间的比值,确定一个像素坐标值。譬如,该媒体描述属性对应的文本行为a=position:0 10 0 10 3 10 10 10,此时确定每相邻两个数值之间的比值,并基于上述浮点数精度进行转换后,可以得到该视频图像的左上顶点像素坐标为(0.000,0.000),右下顶点像素坐标为(0.300,1.000)。当然,这里所携带的数据一般是经过归一化处理后得到的。
其中,a=intrinsic camera parameters:<fx0 fy0 Cx0 Cy0 K10 K20 P10 P20>用于标识摄像设备的内参。a=extrinsic camera parameters:<RotateMatrix0 Tx0 T90 Tz0>用于标识摄像设备的外参。同理,在运算过程中需要基于上述预设计算策略和浮点数精度来确定实际值。
为了便于理解,接下来对SDP携带目标拼接参数进行举例说明。假设该摄像设备配置有三个摄像头,此时,SDP中携带的目标拼接参数可以表示为如下形式:
a=camera_flag:2//three cameras need to stitch
a=camera_id:0 0x12345678//0and 0x12345678 is a pair
a=fnp:3//float number precision is 3
a=position:0 10 0 10 3 10 10 10
a=intrinsic camera parameters:123 5 124 6 127 8 129 9 0 10 0 11 0 12 0 13
Figure PCTCN2019125848-appb-000001
a=camera_id:1 0x2233445566//1and 0x2233445566is a pair
a=position:3 10 0 10 6 10 10 10
a=intrinsic camera parameters:123 5 124 6 127 8 129 9 0 10 0 11 0 12 0 13
Figure PCTCN2019125848-appb-000002
a=camera_id:2 0x3344556677//2and 0x3344556677 is a pair
a=position:6 10 0 10 10 10 10 10
a=intrinsic camera parameters:123 5 124 6 127 8 129 9 0 10 0 11 0 12 0 13
Figure PCTCN2019125848-appb-000003
终端从上述SDP中提取该目标拼接参数,之后,可以存储该目标拼接参数。
当然,需要说明的是,上述仅是以该会话连接协议为RTSP协议为例进行说明,在另一实施例中,该会话连接协议还可能为UDP(User Datagram Protocol,用户数据报协议)、TCP(Transmission Control Protocol,传输控制协议)等协议,本申请实施例对此不作限定。
步骤204:基于预设数据传输协议,通过与该终端之间建立的会话连接,将该多个摄像头拍摄得到的视频图像发送至该终端。
其中,该预设数据传输协议可以根据实际需求预先进行设置。譬如,该预设数据传输协议可以为RTP协议等,本申请实施例对此不做限定。
摄像设备将目标拼接参数发送给终端后,通过与终端之间建立的会话连接向终端发送视频图像。在实施中,摄像设备将该多个摄像头在相同时间点拍摄得到的视频图像进行同步处理,基于该预设数据传输协议,通过与该终端之间建立的会话连接,将同步处理后的多张视频图像发送至该终端。
需要说明的是,这里所述的摄像设备对视频图像进行同步处理可以理解为,摄像设备中定义有一个虚拟源,该虚拟源可以保存多条数据流,该多条数据流为该多个摄像头拍摄得到的视频图像的数据流,该虚拟源可以管理该多个摄像头产生的视频图像的数据流,譬如将多个摄像头在相同时间点拍摄的视频图像进行同步处理。另外,在实施中,与该多个摄像头相关的参数可以独立设置,如可以设置不同分辨率、不同帧率、不同的编码方式等。
进一步地,当该预设数据传输协议为RTP协议时,基于该预设数据传输协议,通过与该终端之间建立的会话连接将同步处理后的视频图像发送至该终端的具体实现可以包括:将同步处理后的视频图像添加至RTP数据包的负载(又可称为有效载荷(payload))中,通过与终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至终端。
视频的播放包括实时流的播放和文件的播放。终端接收到同步处理后的视频图像后,当需要对视频进行实时播放时,可以基于存储的该目标拼接参数,对该视频图像进行拼接处理,并显示拼接处理后的拼接图像。
进一步地,若不需要终端实时显示视频图像,譬如,可能要将视频图像存储至本地以便于日后再进行回放,在该种情况下,可以采用不同的文件格式对视频图像进行存储,譬如,可以采用ISO(International Organization for Standardization,国际标准化组织)Base Format(基本格式)或者MPEG-PS(Moving Picture Experts Group-Program Stream,动态图像专家组-程序流)以及MPEG-TS(Moving Picture Experts Group-Transport Stream,动态图像专家组-传输流)格式进行存储。
进一步地,当将视频图像存储至本地时,根据存储视频图像的文件格式不同,可以采用不同的存储方式对目标拼接参数进行合理存储。譬如,针对ISO Base Format这种格式可以扩展用于存储视频图像的文件的文件头,或者单独增加一条轨道来存储该目标拼接参数。而针对MPEG-PS以及MPEG-TS格式可以采用预设ID(Identification,身份标志)来存储目标拼接参数,该预设ID用于指示该目标拼接参数,进一步地,该预设ID可以根据实际需求预先进行设置。
进一步地,当需要对视频图像进行回放时,终端基于存储的目标拼接参数,对视频图像进行拼接处理,之后,对拼接处理得到的视频图像进行显示。
在本申请实施例中,接收来自终端的数据请求,基于数据请求获取目标拼接参数,该目标拼接参数用于多个摄像头在相同时间点拍摄得到的视频图像的 拼接。通过与终端之间的会话连接,将目标拼接参数和多个摄像头拍摄得到的视频图像发送至终端,以便于终端基于该目标拼接参数对每个相同时间点对应的多张视频图像进行拼接处理。如此,避免需要摄像设备进行拼接处理,解决了对摄像设备的硬件要求较高、以及一些硬件甚至无法支持高分辨率视频图像的拼接处理的问题。
并且,在上述实现方式中,由于不需要切割处理,所以该多个摄像设备可以设置不同的参数,解决了相关技术中视频图像的拼接处理受限的问题。
另外,在将多个摄像头拍摄得到的视频图像发送给终端之前,摄像设备先将得到的多张视频图像进行同步处理,并将同步处理后的视频图像通过与终端之间建立的会话连接发送给终端,也即是,本申请实施例通过一个会话连接传输多张视频图像。如此,终端即可直接基于目标拼接参数对所接收的同步处理后的视频图像进行拼接处理,避免在传输过程中需要建立多个数据传输通道,也无需终端对多个数据传输通道传输的视频图像进行同步处理,从而可以避免由于某路数据传输通道传输数据丢失导致同步错乱的问题,进而可以保证视频拼接的准确性。
图5是根据另一示例性实施例示出的一种数据传输方法的流程图,本实施例以该数据传输方法应用于图1所示实施环境中进行举例说明,该数据传输方法可以包括如下几个实现步骤:
步骤501:接收来自终端的数据请求。
其具体实现可以参见上述图2所示实施例中的步骤201。
步骤502:基于该数据请求获取目标拼接参数,该目标拼接参数用于该多个摄像头在相同时间点拍摄得到的视频图像的拼接。
其具体实现可以参见上述图2所示实施例中的步骤202。
步骤503:建立与该终端之间的会话连接。
在实施中,摄像设备可以基于会话连接协议,与终端之间建立会话连接。譬如,该会话连接协议可以为RTSP协议,或者,还可以为TCP或UDP协议等,本申请实施例对此不做限定。
步骤504:基于该预设数据传输协议,通过与该终端之间建立的会话连接,将该目标拼接参数和该多个摄像头拍摄得到的视频图像发送至该终端。
请参考图4,在实施中,为了减小摄像设备的运行负担,可以通过与该终端 之间的会话连接,将该目标拼接参数和该多个摄像头拍摄得到的视频图像发送至该终端,以由终端基于目标拼接参数对视频图像进行拼接处理。
在本实施例中,可以在传输视频图像的数据包中携带目标拼接参数,并通过与终端之间已建立的会话连接将目标拼接参数和视频图像一起发送给终端。
在一些实施例中,当该预设数据传输协议为RTP协议时,将该目标拼接参数添加至RTP数据包的包头的目标字段中,以及将该多个摄像头拍摄得到的视频图像添加至该RTP数据包的负载中,通过与该终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至该终端。
进一步地,该摄像设备可以在发送给终端的第一个RTP数据包的包头的目标字段中添加该目标拼接参数。也就是说,由于该目标拼接参数一般不会发生变化,因此,可以只在发送给终端的第一个RTP数据包的包头中携带该目标拼接参数。进一步地,当摄像设备检测到目标拼接参数发生变化时,可以再重新通过RTP数据包的包头携带变化后的目标拼接参数。
另外,在实施中,将该多个摄像头拍摄得到的视频图像添加至该RTP数据包的负载中之前,可以对该多个摄像头拍摄在相同时间点拍摄得到的视频图像进行同步处理,之后,将同步处理后的视频图像添加至该RTP数据包的负载中。
在一种可能的实现方式中,将该目标拼接参数添加至该RTP数据包的包头的填充字段中。进一步地,将该RTP数据包的包头中用于指示该填充字段是否为空的字段置为第一数值,该第一数值用于该填充字段不为空。
譬如,如图6所示,该填充字段为padding字段,用于指示该padding字段是否为空的字段为P字段,第一数值为“1”,也即是,当P字段为1时,表示该RTP数据包的包头的padding字段有填充部分,其中,该填充部分的最后一个字节表示该部分的长度,当然,该长度包括该字节本身。
在另一种可能的实现方式中,将该目标拼接参数添加至该RTP数据包的包头的扩展字段中。进一步地,将该RTP数据包的包头中用于指示该扩展字段是否为空的字段置为第二数值,该第二数值用于指示该扩展字段不为空。
其中,该第二数值可以与该第一数值相同,譬如,该第二数值也可以为“1”,当然,在另一实施例中,该第二数值也可以与该第一数值不同。
譬如,如图6所示,该扩展字段为extension字段,用于指示extension字段是否为空的字段为x字段,该第二数值为“1”,也即是,当x字段为1时,表示该RTP数据包的包头包括extension字段。
为了便于理解,这里对RTP数据包的其它部分做简单介绍,请参考图7:
P(version):版本号。
CC(CSRC count):表示CSRC字段的个数。
M(marker bit):当M字段置为1时,表示当前RTP数据包是所传输单元的最后一个数据包。
PT(pa9load t9pe):用于标识传输内容的类型。
SN(sequence number):16bits,用于标识RTP数据包发送的顺序,也即接收端收到后送到解码器里的顺序。
timestamp:用于标识该RTP数据包所包含内容的采集时刻。
视频的播放包括实时流的播放和文件的播放。终端接收到RTP数据包后,获取其中的目标拼接参数和同步处理后的视频图像,当需要对视频进行实时播放时,可以基于所携带的该目标拼接参数,对该视频图像进行拼接处理,并显示拼接处理后的拼接图像。
进一步地,若不需要终端实时显示视频图像,譬如,可能要将视频图像存储至本地以便于日后再进行回放,在该种情况下,可以将目标拼接参数和视频图像进行存储。进一步地,采用不同的文件格式对视频图像进行存储,譬如,可以采用ISO Base Format或者MPEG-PS以及MPEG-TS格式进行存储。
进一步地,当将视频图像存储至本地时,根据存储视频图像的文件格式不同,可以采用不同的存储方式对目标拼接参数进行合理存储。譬如,针对ISO Base Format这种格式可以扩展用于存储视频图像的文件的文件头,或者单独增加一条轨道来存储该目标拼接参数。而针对MPEG-PS以及MPEG-TS格式可以采用预设ID来存储目标拼接参数,该预设ID用于指示该目标拼接参数,进一步地,该预设ID可以根据实际需求预先进行设置。
进一步地,当需要对视频图像进行回放时,终端基于存储的目标拼接参数,对视频图像进行拼接处理,之后,对拼接处理得到的视频图像进行显示。
在本申请实施例中,接收来自终端的数据请求,基于数据请求获取目标拼接参数,该目标拼接参数用于多个摄像头在相同时间点拍摄得到的视频图像的拼接。通过与终端之间的会话连接,将目标拼接参数和多个摄像头拍摄得到的视频图像发送至终端,以便于终端基于该目标拼接参数对每个相同时间点对应的多张视频图像进行拼接处理。如此,避免需要摄像设备进行拼接处理,解决了对摄像设备的硬件要求较高、以及一些硬件甚至无法支持高分辨率视频图像 的拼接处理的问题。
并且,在上述实现方式中,由于不需要切割处理,所以该多个摄像设备可以设置不同的参数,解决了相关技术中视频图像的拼接处理受限的问题。
另外,在将多个摄像头拍摄得到的视频图像发送给终端之前,摄像设备先将得到的多张视频图像进行同步处理,并将同步处理后的视频图像通过与终端之间建立的会话连接发送给终端,也即是,本申请实施例通过一个会话连接传输多张视频图像。如此,终端即可直接基于目标拼接参数对所接收的同步处理后的视频图像进行拼接处理,避免在传输过程中需要建立多个数据传输通道,也无需终端对多个数据传输通道传输的视频图像进行同步处理,从而可以避免由于某路数据传输通道传输数据丢失导致同步错乱的问题,进而可以保证视频拼接的准确性。
并且,值得一提的是,本申请实施例利用已有的标准协议来实现数据传输,无需额外定义其它协议,提高方案的可实施性。
图8是根据一示例性实施例示出的一种数据传输装置的结构示意图,该数据传输装置可以由软件、硬件或者两者的结合实现。该数据传输装置可以包括:
接收模块810,用于接收来自终端的数据请求;
获取模块820,用于基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接;
发送模块830,用于通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述发送模块830用于:
建立与所述终端之间的会话连接,在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议,将所述目标拼接参数发送至所述终端,以及基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端。
可选地,所述发送模块830用于:
当所述会话连接协议包括会话描述协议SDP时,在建立与所述终端之间的会话连接过程中,在所述SDP中定义媒体描述属性;
将所述目标拼接参数添加至所述SDP中所述媒体描述属性对应的文本行。
可选地,所述发送模块830用于:
将所述多个摄像头在相同时间点拍摄得到的视频图像进行同步处理;
基于所述预设数据传输协议,通过与所述终端之间建立的会话连接将同步处理后的视频图像发送至所述终端。
可选地,所述发送模块还830用于:
建立与所述终端之间的会话连接,基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端
可选地,所述发送模块830用于:
当所述预设数据传输协议为RTP协议时,将所述目标拼接参数添加至RTP数据包的包头的目标字段中,以及将所述多个摄像头拍摄得到的视频图像添加至所述RTP数据包的负载中;
通过与所述终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至所述终端。
可选地,所述发送模块830用于:
将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中;
或者,
将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中。
可选地,所述发送模块830用于:
将所述RTP数据包的包头中用于指示所述填充字段是否为空的字段置为第一数值,所述第一数值用于指示所述填充字段不为空。
可选地,所述发送模块830用于:
将所述RTP数据包的包头中用于指示所述扩展字段是否为空的字段置为第二数值,所述第二数值用于指示所述扩展字段不为空。
在本申请实施例中,接收来自终端的数据请求,基于数据请求获取目标拼接参数,该目标拼接参数用于多个摄像头在相同时间点拍摄得到的视频图像的拼接。通过与终端之间的会话连接,将目标拼接参数和多个摄像头拍摄得到的视频图像发送至终端,以便于终端基于该目标拼接参数对每个相同时间点对应的多张视频图像进行拼接处理。如此,避免需要摄像设备进行拼接处理,解决了对摄像设备的硬件要求较高、以及一些硬件甚至无法支持高分辨率视频图像的拼接处理的问题。
需要说明的是:上述实施例提供的数据传输装置在实现数据传输方法时, 仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据传输装置与数据传输方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图9是根据一示例性实施例示出的一种摄像设备的结构示意图。具体来讲:
摄像设备900包括中央处理单元(CPU)901、包括随机存取存储器(RAM)902和只读存储器(ROM)903的系统存储器904,以及连接系统存储器904和中央处理单元901的系统总线905。摄像设备900还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)906,和用于存储操作系统913、应用程序914和其他程序模块915的大容量存储设备907。
基本输入/输出系统906包括有用于显示信息的显示器908和用于用户输入信息的诸如鼠标、键盘之类的输入设备909。其中显示器908和输入设备909都通过连接到系统总线905的输入输出控制器910连接到中央处理单元901。基本输入/输出系统906还可以包括输入输出控制器910以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器910还提供输出到显示屏、打印机或其他类型的输出设备。
大容量存储设备907通过连接到系统总线905的大容量存储控制器(未示出)连接到中央处理单元901。大容量存储设备907及其相关联的计算机可读介质为摄像设备900提供非易失性存储。也就是说,大容量存储设备907可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。
不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器904和大容量存储设备907可以统称为存储器。
根据本申请的各种实施例,摄像设备900还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即摄像设备900可以通过连接在系统总线905 上的网络接口单元911连接到网络912,或者说,也可以使用网络接口单元911来连接到其他类型的网络或远程计算机系统(未示出)。
上述存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,被配置由CPU执行。所述一个或者一个以上程序包含用于进行本申请实施例提供的数据传输方法。
本申请实施例还提供了一种非临时性计算机可读存储介质,当所述存储介质中的指令由摄像设备的处理器执行时,使得摄像设备能够执行上述实施例提供的数据传输方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在摄像设备上运行时,使得摄像设备执行上述实施例提供的数据传输方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种数据传输方法,其特征在于,应用于摄像设备中,所述摄像设备配置有多个摄像头,所述多个摄像头分别用于对不同拍摄角度进行拍摄,所述方法包括:
    接收来自终端的数据请求;
    基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接;
    通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
  2. 如权利要求1所述的方法,其特征在于,所述通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
    建立与所述终端之间的会话连接,在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议,将所述目标拼接参数发送至所述终端,以及基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端。
  3. 如权利要求2所述的方法,其特征在于,所述在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议将所述目标拼接参数发送至所述终端,包括:
    当所述会话连接协议包括会话描述协议SDP时,在建立与所述终端之间的会话连接过程中,在所述SDP中定义媒体描述属性;
    将所述目标拼接参数添加至所述SDP中所述媒体描述属性对应的文本行。
  4. 如权利要求2或3所述的方法,其特征在于,所述基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
    将所述多个摄像头在相同时间点拍摄得到的视频图像进行同步处理;
    基于所述预设数据传输协议,通过与所述终端之间建立的会话连接将同步 处理后的视频图像发送至所述终端。
  5. 如权利要求1所述的方法,其特征在于,所述通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
    建立与所述终端之间的会话连接,基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
  6. 如权利要求5所述的方法,其特征在于,所述基于所述预设数据传输协议,通过与所述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端,包括:
    当所述预设数据传输协议为RTP协议时,将所述目标拼接参数添加至RTP数据包的包头的目标字段中,以及将所述多个摄像头拍摄得到的视频图像添加至所述RTP数据包的负载中;
    通过与所述终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至所述终端。
  7. 如权利要求6所述的方法,其特征在于,所述将所述目标拼接参数添加至RTP数据包的包头的目标字段中,包括:
    将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中;
    或者,
    将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中。
  8. 如权利要求7所述的方法,其特征在于,所述将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中之后,还包括:
    将所述RTP数据包的包头中用于指示所述填充字段是否为空的字段置为第一数值,所述第一数值用于指示所述填充字段不为空。
  9. 如权利要求7所述的方法,其特征在于,所述将所述目标拼接参数添加 至所述RTP数据包的包头的扩展字段中之后,还包括:
    将所述RTP数据包的包头中用于指示所述扩展字段是否为空的字段置为第二数值,所述第二数值用于指示所述扩展字段不为空。
  10. 一种数据传输装置,其特征在于,配置于摄像设备中,所述摄像设备配置有多个摄像头,用于对不同拍摄角度进行拍摄,所述装置包括:
    接收模块,用于接收来自终端的数据请求;
    获取模块,用于基于所述数据请求获取目标拼接参数,所述目标拼接参数用于所述多个摄像头在相同时间点拍摄得到的视频图像的拼接;
    发送模块,用于通过与所述终端之间的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
  11. 如权利要求10所述的装置,其特征在于,所述发送模块用于:
    建立与所述终端之间的会话连接,在建立与所述终端之间的会话连接过程中,通过建立所述会话连接的会话连接协议,将所述目标拼接参数发送至所述终端,以及基于预设数据传输协议,通过与所述终端之间建立的会话连接,将所述多个摄像头拍摄得到的视频图像发送至所述终端。
  12. 如权利要求11所述的装置,其特征在于,所述发送模块用于:
    当所述会话连接协议包括会话描述协议SDP时,在建立与所述终端之间的会话连接过程中,在所述SDP中定义媒体描述属性;
    将所述目标拼接参数添加至所述SDP中所述媒体描述属性对应的文本行。
  13. 如权利要求11或12所述的装置,其特征在于,所述发送模块用于:
    将所述多个摄像头在相同时间点拍摄得到的视频图像进行同步处理;
    基于所述预设数据传输协议,通过与所述终端之间建立的会话连接将同步处理后的视频图像发送至所述终端。
  14. 如权利要求10所述的装置,其特征在于,所述发送模块还用于:
    建立与所述终端之间的会话连接,基于所述预设数据传输协议,通过与所 述终端之间建立的会话连接,将所述目标拼接参数和所述多个摄像头拍摄得到的视频图像发送至所述终端。
  15. 如权利要求14所述的装置,其特征在于,所述发送模块用于:
    当所述预设数据传输协议为RTP协议时,将所述目标拼接参数添加至RTP数据包的包头的目标字段中,以及将所述多个摄像头拍摄得到的视频图像添加至所述RTP数据包的负载中;
    通过与所述终端之间建立的会话连接,将经过添加处理后的RTP数据包发送至所述终端。
  16. 如权利要求15所述的装置,其特征在于,所述发送模块用于:
    将所述目标拼接参数添加至所述RTP数据包的包头的填充字段中;
    或者,
    将所述目标拼接参数添加至所述RTP数据包的包头的扩展字段中。
  17. 如权利要求16所述的装置,其特征在于,所述发送模块用于:
    将所述RTP数据包的包头中用于指示所述填充字段是否为空的字段置为第一数值,所述第一数值用于指示所述填充字段不为空。
  18. 如权利要求16所述的装置,其特征在于,所述发送模块用于:
    将所述RTP数据包的包头中用于指示所述扩展字段是否为空的字段置为第二数值,所述第二数值用于指示所述扩展字段不为空。
  19. 一种设备,其特征在于,所述设备包括处理器、通信接口、存储器和通信总线,所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信,所述存储器用于存放计算机程序,所述处理器用于执行所述存储器上所存放的程序,以实现权利要求1-9任一所述方法的步骤。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现权利要求1-9中任一项所述的数据传 输方法。
PCT/CN2019/125848 2018-12-18 2019-12-17 数据传输方法、装置、设备及存储介质 Ceased WO2020125604A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811547562.2 2018-12-18
CN201811547562.2A CN111343415A (zh) 2018-12-18 2018-12-18 数据传输方法及装置

Publications (1)

Publication Number Publication Date
WO2020125604A1 true WO2020125604A1 (zh) 2020-06-25

Family

ID=71102042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/125848 Ceased WO2020125604A1 (zh) 2018-12-18 2019-12-17 数据传输方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111343415A (zh)
WO (1) WO2020125604A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113489791A (zh) * 2021-07-07 2021-10-08 佳都科技集团股份有限公司 图像上传方法、图像处理方法及相关装置
EP4250691A1 (en) * 2022-03-25 2023-09-27 Beijing Xiaomi Mobile Software Co., Ltd. Image processing method and apparatus, device and storage medium
CN116886856A (zh) * 2023-09-08 2023-10-13 湖北华中电力科技开发有限责任公司 基于视频通讯的电力应急会商方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112351251A (zh) * 2020-10-21 2021-02-09 深圳迈瑞生物医疗电子股份有限公司 图像处理系统和终端设备
CN112929694B (zh) * 2021-01-22 2024-01-19 广州方硅信息技术有限公司 视频拼接方法、装置、存储介质、计算机设备
CN117201955B (zh) * 2022-05-30 2024-09-13 荣耀终端有限公司 视频拍摄方法、装置、设备和存储介质
CN115484320B (zh) * 2022-10-27 2024-10-15 陕西思极科技有限公司 应用于智能识别终端群的数据传输方法及监控设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090182836A1 (en) * 2008-01-16 2009-07-16 Aviles Joaquin J System and method for populating a cache using behavioral adaptive policies
CN101562706A (zh) * 2009-05-22 2009-10-21 杭州华三通信技术有限公司 一种图像拼接方法和设备
CN102457768A (zh) * 2010-10-21 2012-05-16 华为技术有限公司 广告拼接处理方法和系统以及拼接器和头端设备
CN105847851A (zh) * 2016-04-19 2016-08-10 北京金山安全软件有限公司 全景视频直播方法、装置和系统以及视频源控制设备
CN107529017A (zh) * 2017-10-12 2017-12-29 长沙全度影像科技有限公司 一种全景相机的多拼接模式的系统及方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011149558A2 (en) * 2010-05-28 2011-12-01 Abelow Daniel H Reality alternate
CN102244680A (zh) * 2011-07-04 2011-11-16 东华大学 一种基于体域传感阵列的全景视频码流生成方法
CN103096018B (zh) * 2011-11-08 2016-11-23 华为技术有限公司 传输信息的方法和终端
CN104301677B (zh) * 2014-10-16 2018-06-15 北京十方慧通科技有限公司 面向大场景的全景视频监控的方法及装置
CN107872422B (zh) * 2016-09-23 2020-01-10 杭州海康威视数字技术股份有限公司 一种数据传输方法、装置及电子设备
CN108600616A (zh) * 2018-04-04 2018-09-28 深圳市极酷威视科技有限公司 一种基于rtp帧同步的视频防抖系统和视频获取器材
CN108616722B (zh) * 2018-04-18 2021-02-26 中南大学 一种嵌入式高清视频采集与数据流传输系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090182836A1 (en) * 2008-01-16 2009-07-16 Aviles Joaquin J System and method for populating a cache using behavioral adaptive policies
CN101562706A (zh) * 2009-05-22 2009-10-21 杭州华三通信技术有限公司 一种图像拼接方法和设备
CN102457768A (zh) * 2010-10-21 2012-05-16 华为技术有限公司 广告拼接处理方法和系统以及拼接器和头端设备
CN105847851A (zh) * 2016-04-19 2016-08-10 北京金山安全软件有限公司 全景视频直播方法、装置和系统以及视频源控制设备
CN107529017A (zh) * 2017-10-12 2017-12-29 长沙全度影像科技有限公司 一种全景相机的多拼接模式的系统及方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113489791A (zh) * 2021-07-07 2021-10-08 佳都科技集团股份有限公司 图像上传方法、图像处理方法及相关装置
CN113489791B (zh) * 2021-07-07 2024-05-14 佳都科技集团股份有限公司 图像上传方法、图像处理方法及相关装置
EP4250691A1 (en) * 2022-03-25 2023-09-27 Beijing Xiaomi Mobile Software Co., Ltd. Image processing method and apparatus, device and storage medium
US12335358B2 (en) 2022-03-25 2025-06-17 Beijing Xiaomi Mobile Software Co., Ltd. Image processing method and apparatus, device and storage medium
CN116886856A (zh) * 2023-09-08 2023-10-13 湖北华中电力科技开发有限责任公司 基于视频通讯的电力应急会商方法及系统
CN116886856B (zh) * 2023-09-08 2023-12-15 湖北华中电力科技开发有限责任公司 基于视频通讯的电力应急会商方法及系统

Also Published As

Publication number Publication date
CN111343415A (zh) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2020125604A1 (zh) 数据传输方法、装置、设备及存储介质
US11388453B2 (en) Method for processing live-streaming interaction video and server
KR102375307B1 (ko) 가상 현실 뷰포트를 공유하기 위한 방법, 장치, 및 시스템
CN113741837B (zh) 信息处理方法、设备、系统及存储介质
CN102595239B (zh) 一种终端系统的多屏互动方法、装置及智能电视机
US8803991B2 (en) Snapshot capture in video stream
WO2021147702A1 (zh) 一种视频处理方法及其装置
CN104918105B (zh) 媒体文件的多屏播放方法、设备及系统
TW201642942A (zh) 針對輸出裝置及網路品質的雲遊戲資料流動態調整
US12321658B2 (en) Method for displaying conference shared screen content, apparatus, and system
CN106303651A (zh) 显示系统及显示系统的显示方法
CN109756744B (zh) 数据处理方法、电子设备及计算机存储介质
CN110737638A (zh) 一种数据共享方法、装置、电子设备及存储介质
US10666351B2 (en) Methods and systems for live video broadcasting from a remote location based on an overlay of audio
EP4202611A1 (en) Rendering a virtual object in spatial alignment with a pose of an electronic device
CN110944140A (zh) 远程展示方法、远程展示系统、电子装置、存储介质
CN104038741A (zh) 一种视频数据的投影方法
GB2567136A (en) Moving between spatially limited video content and omnidirectional video content
WO2016177257A1 (zh) 一种数据分享的方法和装置
WO2017086355A1 (ja) 送信装置、送信方法、受信装置、受信方法および送受信システム
RU2648982C2 (ru) Система беспроводной стыковки для аудио-видео
CN116193182A (zh) Ar内容的投屏方法、系统、电子设备和存储介质
CN103701686B (zh) 一种远程图像实时共享方法
CN110536143A (zh) 推流方法与电子设备
CN115861524A (zh) 一种实现3d模型协作的视频会议系统及相关产品

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19900850

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.08.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19900850

Country of ref document: EP

Kind code of ref document: A1