WO2019007370A1 - 用于在全景视频中融合对象的方法和装置 - Google Patents

用于在全景视频中融合对象的方法和装置 Download PDF

Info

Publication number
WO2019007370A1
WO2019007370A1 PCT/CN2018/094519 CN2018094519W WO2019007370A1 WO 2019007370 A1 WO2019007370 A1 WO 2019007370A1 CN 2018094519 W CN2018094519 W CN 2018094519W WO 2019007370 A1 WO2019007370 A1 WO 2019007370A1
Authority
WO
WIPO (PCT)
Prior art keywords
target object
panoramic video
pixel
reflection coefficient
coordinate
Prior art date
Application number
PCT/CN2018/094519
Other languages
English (en)
French (fr)
Inventor
何进萍
赵刚
李文博
彭碧
Original Assignee
北京京东尚科信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京京东尚科信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京京东尚科信息技术有限公司
Priority to RU2019144488A priority Critical patent/RU2730877C1/ru
Priority to US16/628,132 priority patent/US11188801B2/en
Publication of WO2019007370A1 publication Critical patent/WO2019007370A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/08Projecting images onto non-planar surfaces, e.g. geodetic screens
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering

Definitions

  • the present application relates to the field of video playback, and in particular to the field of panoramic video playback, and in particular, to a method and apparatus for merging objects in a panoramic video.
  • Panoramic video refers to a playable video resource that can have multiple playback viewing angles and provide an immersive experience similar to a real stereoscopic scene. It can be specifically formed in a variety of different ways, such as a video or image formed by splicing a plurality of consecutive angle pictures. When viewing a panoramic video through the panoramic video player, the user can adjust the viewing of the video from up, down, left, and right for different viewing angles. With the development of panoramic video playback technology, more and more fields have begun to use panoramic video, including live broadcast field, film and television special effects field, virtual game field and so on.
  • the existing panoramic video playback technology can restore the 720-degree panoramic effect of the panoramic video very well, but it can only play the content of the panoramic video, and cannot integrate other content while playing the panoramic video.
  • the purpose of the present application is to propose a method and apparatus for merging objects in panoramic video to solve the technical problems mentioned in the background section above.
  • an embodiment of the present application provides a method for merging an object in a panoramic video, where the method includes: playing a panoramic video in a panoramic video player; acquiring a target object; and parsing the target object to obtain the target object.
  • the coordinate parameter and the material parameter according to the coordinate parameter and the material parameter, setting the color of each pixel when the target object is merged in the panoramic video, and obtaining the colored target object; and merging the colored target object into the panoramic video .
  • the playing the panoramic video in the panoramic video player includes: acquiring a sequence frame of the panoramic video; mapping each sequence frame to an inner surface of a preset panoramic video playing model; and using the panoramic video playing model A portion of the corresponding viewing interface is projected onto the projection surface to play the above panoramic video.
  • the color of each pixel of the target object is set according to the coordinate parameter and the material parameter, and the colored target object is obtained, including: determining, according to the coordinate parameter, that the target object is projected to the projection face. The two-dimensional coordinates; determining the reflection coefficient of the target object to the light according to the material parameter; determining the fusion in the panoramic video according to the two-dimensional coordinates, the reflection coefficient, and the preset ambient light intensity and the direction light intensity The color of each pixel when the target object.
  • determining, according to the material parameter, the reflection coefficient of the target object to the light comprising: determining a reflection coefficient of the target object to the light according to a preset list of the material parameter and the reflection coefficient and the material parameter.
  • determining the color of each pixel when the target object is merged in the panoramic video according to the two-dimensional coordinates, the reflection coefficient, and the preset ambient light intensity and the direction light intensity including: according to the two-dimensional Coordinates, determining coordinates of each pixel when the target object is fused in the panoramic video; determining, according to coordinates of each pixel, the reflection coefficient, and preset ambient light intensity and direction light intensity, each pixel of the target object fused in the panoramic video Light intensity; determine the color of each pixel based on the light intensity of each pixel.
  • the merging the colored target object in the panoramic video includes: acquiring location coordinates of the target object in the panoramic video; and processing the colored target object, where the processing includes at least one of the following Item: Zoom, Pan, Rotate; locate the processed target object according to the above position coordinates.
  • the method further includes: acquiring sensor data of the panoramic video player; determining, according to the sensor data, whether the orientation of the panoramic video player intersects with the position coordinate; in response to the orientation of the panoramic video player The above position coordinates intersect, and the duration of the intersection of the two is counted; when the duration is greater than the preset threshold, the preset interaction interface is displayed.
  • an embodiment of the present application provides an apparatus for merging an object in a panoramic video, where the apparatus includes: a panoramic video playing unit, configured to play a panoramic video in a panoramic video player; and a target object acquiring unit, Obtaining a target object; the target object parsing unit is configured to parse the target object to obtain a coordinate parameter and a material parameter of the target object; and the target object coloring unit is configured to set the target object fusion according to the coordinate parameter and the material parameter The color of each pixel in the panoramic video is obtained as a target object after coloring; the target object fusion unit is configured to fuse the colored target object into the above-mentioned panoramic video.
  • the panoramic video playback unit includes: an acquisition module, configured to acquire a sequence frame of the panoramic video, and a mapping module, configured to map each sequence frame on an inner surface of the preset panoramic video playback model; And for projecting a portion of the corresponding viewing interface of the panoramic video playing model to the projection surface to play the panoramic video.
  • the target object coloring unit includes: a two-dimensional coordinate determining module, configured to determine, according to the coordinate parameter, that the target object is projected to the two-dimensional coordinates corresponding to the projection surface; and a reflection coefficient determining module, configured to The material parameter determines the reflection coefficient of the target object to the light; the pixel color determining module is configured to determine the fusion in the panoramic video according to the two-dimensional coordinates, the reflection coefficient, and the preset ambient light intensity and the direction light intensity The color of each pixel when the target object.
  • the reflection coefficient determining module is further configured to: determine a reflection coefficient of the target object to the light according to a preset list of the material parameter and the reflection coefficient and the material parameter.
  • the pixel color determining module is further configured to: determine, according to the two-dimensional coordinates, coordinates of each pixel when the target object is fused in the panoramic video; according to coordinates of each pixel, the reflection coefficient, and a preset environment The light intensity and the direction light intensity determine the illumination intensity of each pixel when the target object is fused to the panoramic video; and the color of each pixel is determined according to the illumination intensity of each pixel.
  • the target object fusion unit includes: a position coordinate acquisition module, configured to acquire position coordinates of the target object in the panoramic video; and a target object processing module, configured to process the colored target object,
  • the processing includes at least one of the following: zooming, panning, and rotating; and a target object positioning module, configured to locate the processed target object according to the position coordinates.
  • the apparatus further includes an interaction unit, where the interaction unit includes: a sensor data acquisition module, configured to acquire sensor data of the panoramic video player; and an intersection state determination module, configured to determine a panoramic video according to the sensor data. Whether the orientation of the player intersects with the position coordinate; the intersection time determining module is configured to: in response to the orientation of the panoramic video player intersecting with the position coordinate, calculate a duration of intersection of the two; an interface display module for When the duration is greater than the preset threshold, the preset interactive interface is displayed.
  • the interaction unit includes: a sensor data acquisition module, configured to acquire sensor data of the panoramic video player; and an intersection state determination module, configured to determine a panoramic video according to the sensor data. Whether the orientation of the player intersects with the position coordinate; the intersection time determining module is configured to: in response to the orientation of the panoramic video player intersecting with the position coordinate, calculate a duration of intersection of the two; an interface display module for When the duration is greater than the preset threshold, the preset interactive interface is displayed.
  • an embodiment of the present application provides an electronic device, including: one or more processors; and a storage device, configured to store one or more programs, when the one or more programs are processed by the one or more The apparatus is executed such that the one or more processors described above implement the method described in any of the above embodiments.
  • an embodiment of the present application provides a computer readable storage medium, where a computer program is stored, and when the program is executed by a processor, the method described in any one of the foregoing embodiments is implemented.
  • the method and apparatus for merging an object in a panoramic video provided by the above embodiment of the present application, when playing a panoramic video in a panoramic video player, acquiring a target object, and then parsing the acquired target object to obtain coordinates of the target object Parameters and material parameters, and then according to the above coordinate parameters and material parameters, set the color of each pixel of the target object fused in the panoramic video, get the colored target object, and finally merge the colored target object into the panoramic video.
  • the method and device of the embodiment can not only play the content of the panoramic video, but also integrate the target object well in the played panoramic video, thereby increasing the special effect of the panoramic video.
  • FIG. 1 is a flow diagram of one embodiment of a method for fusing an object in a panoramic video in accordance with the present application
  • FIG. 2 is a schematic diagram of an application scenario of a method for fusing an object in a panoramic video according to the present application
  • FIG. 3 is a flow diagram of one embodiment of coloring a target object in a method for fusing an object in a panoramic video in accordance with the present application;
  • FIG. 4 is a block diagram showing an embodiment of an apparatus for fusing an object in a panoramic video according to the present application
  • FIG. 5 is a schematic structural diagram of a computer system suitable for implementing the terminal device of the embodiment of the present application.
  • FIG. 1 illustrates a flow 200 of one embodiment of a method for fusing an object in a panoramic video in accordance with the present application.
  • the method for merging objects in a panoramic video in this embodiment includes the following steps:
  • step 101 the panoramic video is played in the panoramic video player.
  • the panoramic video can be played on an electronic device (for example, a terminal device) on which the method for merging objects in the panoramic video runs.
  • the terminal device may be installed with an application for playing panoramic video, such as various panoramic video players.
  • step 101 may be implemented by the following steps not shown in FIG. 1:
  • Each frame of the panoramic video is a 360-degree panoramic image
  • the panoramic video includes multiple 360-degree panoramic images.
  • Each sequence frame is mapped on an inner surface of a preset panoramic video playing model
  • the panoramic video playing model may be a model that is established according to characteristics of the panoramic video, and is a virtual model, such as a sphere model, a cube model, Pyramid model, etc.
  • the sphere model includes a 360-degree full space centered on the center of the sphere, and the above-mentioned panoramic image is projected on the inner surface of the sphere model, which is equivalent to observing the panoramic image of the human eye at the center of the sphere.
  • a portion of the viewing interface corresponding to the panoramic video playback model is then projected onto the projection surface to play the panoramic video.
  • the panoramic image mapped on the surface of the panoramic video playback model located on the surface within the projection area is projected onto the imaging projection surface, the projection surface The video/image is finally displayed on the screen of the panoramic video player.
  • Step 102 Acquire a target object.
  • the target object may be various objects to be integrated into the panoramic video, such as an animated expression, a text symbol, or various items for promotion.
  • the format of the target object may be various formats that can be incorporated into the panoramic video, such as the obj format.
  • the terminal device can acquire the target object by using various wired or wireless connections. For example, the terminal device can acquire the target object stored locally, and can also acquire the target device input by the user in various manners.
  • wireless connection manner may include but is not limited to 3G/4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods that are now known or developed in the future. .
  • step 103 the target object is parsed, and coordinate parameters and material parameters of the target object are obtained.
  • the terminal device may parse the target object to determine a coordinate parameter and a material parameter of the target object.
  • the coordinate parameter may include a vertex coordinate of the target object, a normal coordinate of each vertex, and the like
  • the material parameter may include a parameter of each face of the target object and a parameter of a material of each face.
  • Step 104 according to the coordinate parameter and the material parameter, set the color of each pixel when the target object is fused in the panoramic video, and obtain the colored target object.
  • the terminal device After determining the coordinate parameters and material parameters of the target object, the terminal device can color the target object, that is, set the color of each pixel when the target object is fused in the panoramic video, and obtain the colored target object.
  • step 105 the colored target object is merged into the panoramic video.
  • the colored target object After coloring the target object, the colored target object can be fused in the panoramic video, so that other objects are merged when the panoramic video is played.
  • FIG. 2 is a schematic diagram of an application scenario of a method for fusing an object in a panoramic video according to the present embodiment.
  • the panoramic video player 21 plays the panoramic video 21, and during the playback process, the target object is acquired, and after parsing, the color of the target object 21 is set, the colored target object is obtained, and then the colored object is colored.
  • the target object 22 is fused in the panoramic video 21.
  • the method for merging an object in a panoramic video provided by the above embodiment of the present application, when playing a panoramic video in a panoramic video player, acquiring a target object, and then parsing the acquired target object to obtain coordinate parameters of the target object and The material parameters are then set according to the above coordinate parameters and material parameters, the color of each pixel of the target object is merged in the panoramic video, the colored target object is obtained, and finally the colored target object is merged into the panoramic video.
  • the method of the embodiment can not only play the content of the panoramic video, but also integrate the target object well in the played panoramic video, thereby increasing the special effect of the panoramic video.
  • the foregoing step 105 may be specifically implemented by using the following steps not shown in FIG. 1: acquiring location coordinates of the target object in the panoramic video; and processing the colored target object.
  • the above processing includes at least one of: zooming, panning, and rotating; and positioning the processed target object according to the position coordinates.
  • the terminal device may first acquire the position coordinates of the target object in the panoramic video, and then process the colored target object, such as zooming, panning, or rotating, and then positioning the processed target object at the position coordinate. . In this way, the observer can observe the target object from any angle.
  • the foregoing method may further include the following steps not shown in FIG. 1:
  • Acquiring sensor data of the panoramic video player determining, according to the sensor data, whether a orientation of the panoramic video player intersects the position coordinate; in response to the orientation of the panoramic video player intersecting the position coordinate, counting The duration of the intersection of the two; when the duration is greater than the preset threshold, the preset interaction interface is displayed
  • the orientation of the panoramic video player can be determined according to the sensor data of the panoramic video player. Then, it is determined whether the orientation is intersected with the position coordinate of the target object, and if intersected, the duration of the intersection of the orientation of the panoramic video player and the position coordinate of the target object is counted, and when the duration is greater than the preset threshold, the preset interaction is displayed. interface.
  • the interactive interface may include information of the item, a button to delete the target object, or a button to add the target object to the shopping cart to implement interaction between the observer and the target object.
  • the orientation of the panoramic video player can be understood as the direction observed by the observer's eyes, that is, the observer can realize the interaction with the target object by long-eyeing through the present implementation.
  • FIG. 3 a flow 300 of one embodiment of coloring a target object in a method for fusing an object in a panoramic video in accordance with the present application is illustrated.
  • the target object can be colored by the following steps:
  • Step 301 Determine, according to the coordinate parameter, the two-dimensional coordinates corresponding to the projection of the target object to the projection surface.
  • the two-dimensional coordinates corresponding to the portion covered by the target object projected onto the projection surface can be determined.
  • the above two-dimensional coordinates may include a plurality of coordinates, and the plurality of coordinates are used to represent a portion of the target object covered on the projection surface.
  • Step 302 Determine, according to the material parameter, a reflection coefficient of the target object to the light.
  • the reflection of light by an object includes specular and diffuse reflections, and the coefficient of specular reflection is greater than the reflection coefficient of diffuse reflection.
  • Diffuse reflection is usually caused by light shining on the surface of a rough object, and different materials have different reflection coefficients when diffuse reflection occurs.
  • the terminal device may determine the reflection coefficient of the target object to the light according to the material parameter.
  • the terminal device may determine the reflection coefficient of the target object to the light according to the preset correspondence between the material parameter and the reflection coefficient and the material parameter of the target object.
  • the terminal device may first obtain a list including the correspondence between the material parameters and the reflection coefficient, and then determine the reflection coefficient of the target object to the light according to the list and the material parameters of the target object.
  • Step 303 Determine, according to the two-dimensional coordinates, the reflection coefficient, and the preset ambient light intensity and the direction light intensity, the color of each pixel when the target object is merged in the panoramic video.
  • the color of each pixel when the target object is merged in the panoramic video may be determined according to the preset ambient light intensity and the direction light intensity.
  • Ambient light refers to the light in the environment in which the target object is located.
  • Directional light refers to parallel light from a certain direction. Since the intensity of the ambient light and the intensity of the directional light are preset, it is possible to determine the color of each pixel when the target object is fused in the panoramic video.
  • the foregoing step 303 may be implemented by using the following steps not shown in FIG. 3: determining coordinates of each pixel when the target object is fused in the panoramic video according to the two-dimensional coordinates; The coordinates of each pixel, the above-mentioned reflection coefficient, and the preset ambient light intensity and direction light intensity determine the illumination intensity of each pixel when the target object is fused in the panoramic video; the color of each pixel is determined according to the illumination intensity of each pixel.
  • the coordinates of each pixel of the target object fused in the panoramic video may be determined according to the two-dimensional coordinates, and then the ambient light is determined according to the coordinates of each pixel, the reflection coefficient, and the preset ambient light intensity and direction light intensity. And the illuminance of the directional light at each pixel, and finally the color of each pixel is determined according to the illumination intensity of each pixel.
  • the method for merging an object in a panoramic video provided by the above embodiment of the present application may color the target object such that the panoramic video after the merging of the target object is not abrupt, and the viewing experience of the observer is improved.
  • the present application provides an embodiment of an apparatus for fusing an object in a panoramic video
  • the device embodiment and the method embodiment shown in FIG. can be specifically applied to various electronic devices.
  • the apparatus 400 for fusing an object in a panoramic video of the present embodiment includes: a panoramic video playing unit 401, a target object acquiring unit 402, a target object analyzing unit 403, a target object coloring unit 404, and a target object fusion.
  • the panoramic video playing unit 401 is configured to play the panoramic video in the panoramic video player.
  • the target object obtaining unit 402 is configured to acquire the target object.
  • the target object analysis unit 403 is configured to parse the target object, and obtain coordinate parameters and material parameters of the target object.
  • the target object coloring unit 404 is configured to set a color of each pixel when the target object is merged in the panoramic video according to the coordinate parameter and the material parameter, and obtain the colored target object.
  • the target object fusion unit 405 is configured to fuse the colored target object into the panoramic video.
  • the panoramic video playback unit 401 may further include an acquisition module, a mapping module, and a projection module, which are not shown in FIG. 4 .
  • the acquiring module is configured to acquire a sequence frame of the panoramic video.
  • a mapping module is configured to map each sequence frame on an inner surface of a preset panoramic video playing model.
  • the projection module is configured to project a portion of the corresponding viewing interface of the panoramic video playing model to the projection surface to play the panoramic video.
  • the target object coloring unit 404 may further include a two-dimensional coordinate determining module, a reflection coefficient determining module, and a pixel color determining module, which are not illustrated in FIG. 4 .
  • the two-dimensional coordinate determining module is configured to determine, according to the coordinate parameter, a two-dimensional coordinate corresponding to the target object projected to the projection surface.
  • the reflection coefficient determining module is configured to determine a reflection coefficient of the target object to the light according to the material parameter.
  • the pixel color determining module is configured to determine a color of each pixel when the target object is merged in the panoramic video according to the two-dimensional coordinates, the reflection coefficient, and the preset ambient light intensity and the direction light intensity.
  • the reflection coefficient determining module may be further configured to: determine a reflection coefficient of the target object to the light according to the preset correspondence between the material parameter and the reflection coefficient and the material parameter.
  • the pixel color determining module is further configured to: determine, according to the two-dimensional coordinates, coordinates of each pixel when the target object is fused in the panoramic video; according to the coordinates of each pixel, the reflection coefficient And the preset ambient light intensity and the direction light intensity, determining the illumination intensity of each pixel when the target object is fused in the panoramic video; determining the color of each pixel according to the illumination intensity of each pixel.
  • the target object fusion unit 405 may further include a position coordinate acquisition module, a target object processing module, and a target object positioning module, which are not illustrated in FIG. 4 .
  • the position coordinate acquiring module is configured to acquire position coordinates of the target object in the panoramic video.
  • the target object processing module is configured to process the colored target object, and the foregoing processing includes at least one of the following: zooming, panning, and rotating.
  • the target object positioning module is configured to locate the processed target object according to the position coordinates.
  • the foregoing apparatus further includes an interaction unit not shown in FIG. 4, where the interaction unit may include a sensor data acquisition module, an intersection state determination module, an intersection time determination module, and an interaction interface display. Module.
  • the sensor data acquisition module is configured to acquire sensor data of the panoramic video player.
  • the intersection state determining module is configured to determine, according to the sensor data, whether the orientation of the panoramic video player intersects the position coordinate.
  • the intersecting time determining module is configured to count the duration of the intersection of the two sides in response to the orientation of the panoramic video player intersecting the position coordinates.
  • the interactive interface display module is configured to display a preset interaction interface when the duration is greater than a preset threshold.
  • the device for merging an object in a panoramic video acquires a target object when playing a panoramic video in a panoramic video player, and then parses the acquired target object to obtain coordinate parameters of the target object and The material parameters are then set according to the above coordinate parameters and material parameters, the color of each pixel of the target object is merged in the panoramic video, the colored target object is obtained, and finally the colored target object is merged into the panoramic video.
  • the device of the embodiment can not only play the content of the panoramic video, but also integrate the target object well in the played panoramic video, thereby increasing the special effect of the panoramic video.
  • the units 401 to 405 described in the apparatus 400 for merging objects in a panoramic video respectively correspond to respective steps in the method described with reference to FIG.
  • the operations and features described above for the method for merging objects in panoramic video are equally applicable to apparatus 400 and the units contained therein, and are not described herein.
  • the respective units of the device 400 can cooperate with the units in the terminal device to implement the solution of the embodiments of the present application.
  • FIG. 5 there is shown a block diagram of a computer system 500 suitable for use in implementing the terminal device of the embodiments of the present application.
  • the terminal device shown in FIG. 5 is merely an example, and should not impose any limitation on the function and scope of use of the embodiments of the present application.
  • computer system 500 includes a central processing unit (CPU) 501 that can be loaded into a program in random access memory (RAM) 503 according to a program stored in read only memory (ROM) 502 or from storage portion 508. And perform various appropriate actions and processes.
  • RAM random access memory
  • ROM read only memory
  • RAM 503 various programs and data required for the operation of the system 500 are also stored.
  • the CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An input/output (I/O) interface 505 is also coupled to bus 504.
  • the following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a storage portion 508 including a hard disk or the like. And a communication portion 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the Internet.
  • Driver 510 is also coupled to I/O interface 505 as needed.
  • a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory or the like is mounted on the drive 510 as needed so that a computer program read therefrom is installed into the storage portion 508 as needed.
  • an embodiment of the present disclosure includes a computer program product comprising a computer program carried on a machine readable medium, the computer program comprising program code for executing the method illustrated in the flowchart.
  • the computer program can be downloaded and installed from the network via the communication portion 509, and/or installed from the removable medium 511.
  • CPU central processing unit
  • the computer readable medium described herein may be a computer readable signal medium or a computer readable storage medium or any combination of the two.
  • the computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • a computer readable storage medium may be any tangible medium that can contain or store a program, which can be used by or in connection with an instruction execution system, apparatus or device.
  • a computer readable signal medium may include a data signal that is propagated in the baseband or as part of a carrier, carrying computer readable program code. Such propagated data signals can take a variety of forms including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer readable signal medium can also be any computer readable medium other than a computer readable storage medium, which can transmit, propagate, or transport a program for use by or in connection with the instruction execution system, apparatus, or device.
  • Program code embodied on a computer readable medium can be transmitted by any suitable medium, including but not limited to wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the logic functions for implementing the specified.
  • Executable instructions can also occur in a different order than that illustrated in the drawings. For example, two successively represented blocks may in fact be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or operation. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present application may be implemented by software or by hardware.
  • the described unit may also be disposed in the processor, for example, as a processor including a panoramic video playback unit, a target object acquisition unit, a target object resolution unit, a target object coloring unit, and a target object fusion unit.
  • the name of these units does not constitute a limitation on the unit itself in some cases.
  • the target object acquisition unit may also be described as “a unit that acquires a target object”.
  • the present application also provides a computer readable medium, which may be included in the apparatus described in the above embodiments, or may be separately present and not incorporated into the apparatus.
  • the computer readable medium carries one or more programs, when the one or more programs are executed by the device, causing the device to: play a panoramic video in a panoramic video player; acquire a target object; parse the target object, and obtain The coordinate parameter and the material parameter of the target object; according to the above coordinate parameter and the material parameter, setting the color of each pixel when the target object is merged in the panoramic video, and obtaining the colored target object; and merging the colored target object into the panoramic video .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)
  • Processing Or Creating Images (AREA)
  • Image Generation (AREA)

Abstract

本申请公开了用于在全景视频中融合对象的方法和装置。所述方法的一具体实施方式包括:在全景视频播放器中播放全景视频;获取目标对象;解析目标对象,得到目标对象的坐标参数以及材质参数;根据上述坐标参数以及上述材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;将着色后的目标对象融合在所述全景视频中。该实施方式不仅能够播放全景视频的内容,还可以在播放的全景视频中很好的融合目标对象,增加了全景视频的特效性。

Description

用于在全景视频中融合对象的方法和装置
相关申请的交叉引用
本专利申请要求于2017年7月4日提交的、申请号为201710537524.8、申请人为北京京东尚科信息技术有限公司和北京京东世纪贸易有限公司、发明名称为“用于在全景视频中融合对象的方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。
技术领域
本申请涉及视频播放领域,具体涉及全景视频播放领域,尤其涉及一种用于在全景视频中融合对象的方法和装置。
背景技术
全景视频是指能够具有多个播放视角,提供与现实立体场景相类似的、令用户具有沉浸式体验的可播放视频资源。其具体可以通过多种不同的方式制作形成,例如连续的多个角度画面拼接形成的视频或图像。用户在通过全景视频播放器观看全景视频时,可调节视频的上下左右进行不同视角的观看。随着全景视频播放技术的发展,越来越多的领域开始运用全景视频,包括直播领域、影视特效领域、虚拟游戏领域等。
现有的全景视频播放技术可以很好的还原全景视频的720度全景效果,但其只能播放全景视频的内容,不能在播放全景视频的同时融合其它的内容。
发明内容
本申请的目的在于提出一种用于在全景视频中融合对象的方法和装置,来解决以上背景技术部分提到的技术问题。
第一方面,本申请实施例提供了一种用于在全景视频中融合对象的方法,上述方法包括:在全景视频播放器中播放全景视频;获取目标对象;解析上述目标对象,得到上述目标对象的坐标参数以及材质参数;根据上述坐标参数以及上述材质参数,设置上述目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;将着色后的目标对象融合在上述全景视频中。
在一些实施例中,上述在全景视频播放器中播放全景视频,包括:获取上述全景视频的序列帧;将各序列帧映射在预设的全景视频播放模型的内表面;将上述全景视频播放模型的对应观察界面的部分投影到投影面,以播放上述全景视频。
在一些实施例中,上述根据上述坐标参数以及上述材质参数,设置上述目标对象每个像素的颜色,得到着色后的目标对象,包括:根据上述坐标参数,确定上述目标对象投影到上述投影面对应的二维坐标;根据上述材质参数,确定上述目标对象对光线的反射系数;根据上述二维坐标、上述反射系数以及预设的环境光强度和方向光强度,确定在上述全景视频中融合上述目标对象时各像素的颜色。
在一些实施例中,上述根据上述材质参数,确定上述目标对象对光线的反射系数,包括:根据预设的材质参数与反射系数的对应列表以及上述材质参数,确定上述目标对象对光线的反射系数。
在一些实施例中,上述根据上述二维坐标、上述反射系数以及预设的环境光强度和方向光强度,确定在上述全景视频中融合上述目标对象时各像素的颜色,包括:根据上述二维坐标,确定上述目标对象融合在上述全景视频时各像素的坐标;根据各像素的坐标、上述反射系数以及预设的环境光强度和方向光强度,确定上述目标对象融合在上述全景视频时各像素的光照强度;根据各像素的光照强度,确定各像素的颜色。
在一些实施例中,上述将着色后的目标对象融合在上述全景视频中,包括:获取上述目标对象在上述全景视频中的位置坐标;对着色后的目标对象进行处理,上述处理包括以下至少一项:缩放、平移、旋转;根据上述位置坐标,定位处理后的目标对象。
在一些实施例中,上述方法还包括:获取上述全景视频播放器的传感器数据;根据上述传感器数据,确定全景视频播放器的朝向是否与上述位置坐标相交;响应于上述全景视频播放器的朝向与上述位置坐标相交,统计二者相交的持续时间;当上述持续时间大于预设阈值时,显示预设的交互界面。
第二方面,本申请实施例提供了一种用于在全景视频中融合对象的装置,上述装置包括:全景视频播放单元,用于在全景视频播放器中播放全景视频;目标对象获取单元,用于获取目标对象;目标对象解析单元,用于解析上述目标对象,得到上述目标对象的坐标参数以及材质参数;目标对象着色单元,用于根据上述坐标参数以及上述材质参数,设置上述目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;目标对象融合单元,用于将着色后的目标对象融合在上述全景视频中。
在一些实施例中,上述全景视频播放单元包括:获取模块,用于获取上述全景视频的序列帧;映射模块,用于将各序列帧映射在预设的全景视频播放模型的内表面;投影模块,用于将上述全景视频播放模型的对应观察界面的部分投影到投影面,以播放上述全景视频。
在一些实施例中,上述目标对象着色单元包括:二维坐标确定模块,用于根据上述坐标参数,确定上述目标对象投影到上述投影面对应的二维坐标;反射系数确定模块,用于根据上述材质参数,确定上述目标对象对光线的反射系数;像素颜色确定模块,用于根据上述二维坐标、上述反射系数以及预设的环境光强度和方向光强度,确定在上述全景视频中融合上述目标对象时各像素的颜色。
在一些实施例中,上述反射系数确定模块进一步用于:根据预设的材质参数与反射系数的对应列表以及上述材质参数,确定上述目标对象对光线的反射系数。
在一些实施例中,上述像素颜色确定模块进一步用于:根据上述二维坐标,确定上述目标对象融合在上述全景视频时各像素的坐标;根据各像素的坐标、上述反射系数以及预设的环境光强度和方向光强度,确定上述目标对象融合在上述全景视频时各像素的光照强度;根 据各像素的光照强度,确定各像素的颜色。
在一些实施例中,上述目标对象融合单元包括:位置坐标获取模块,用于获取上述目标对象在上述全景视频中的位置坐标;目标对象处理模块,用于对着色后的目标对象进行处理,上述处理包括以下至少一项:缩放、平移、旋转;目标对象定位模块,用于根据上述位置坐标,定位处理后的目标对象。
在一些实施例中,上述装置还包括交互单元,上述交互单元包括:传感器数据获取模块,用于获取上述全景视频播放器的传感器数据;相交状态判断模块,用于根据上述传感器数据,确定全景视频播放器的朝向是否与上述位置坐标相交;相交时间确定模块,用于响应于上述全景视频播放器的朝向与上述位置坐标相交,统计二者相交的持续时间;交互界面显示模块,用于当上述持续时间大于预设阈值时,显示预设的交互界面。
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当上述一个或多个程序被上述一个或多个处理器执行,使得上述一个或多个处理器实现上述任一实施例所描述的方法。
第四方面,本申请实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述任一实施例所描述的方法。
本申请的上述实施例提供的用于在全景视频中融合对象的方法和装置,在全景视频播放器中播放全景视频时,获取目标对象,然后对获取的目标对象进行解析,得到目标对象的坐标参数以及材质参数,然后根据上述坐标参数和材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象,最后将着色后的目标对象融合在全景视频中。本实施例的方法和装置,不仅能够播放全景视频的内容,还可以在播放的全景视频中很好的融合目标对象,增加了全景视频的特效性。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1是根据本申请的用于在全景视频中融合对象的方法的一个实施例的流程图;
图2是根据本申请的用于在全景视频中融合对象的方法的一个应用场景的示意图;
图3是根据本申请的用于在全景视频中融合对象的方法中为目标对象着色的一个实施例的流程图;
图4是根据本申请的用于在全景视频中融合对象的装置的一个实施例的结构示意图;
图5是适于用来实现本申请实施例的终端设备的计算机系统的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1示出了根据本申请的用于在全景视频中融合对象的方法的一个实施例的流程200。本实施例的用于在全景视频中融合对象的方法,包括以下步骤:
步骤101,在全景视频播放器中播放全景视频。
在本实施例中,用于在全景视频中融合对象的方法运行于其上的电子设备(例如终端设备)上可以播放全景视频。具体的,上述终端设备上可以安装有用于播放全景视频的应用,如各种全景视频播放器。
在本实施例的一些可选的实现方式中,上述步骤101可以通过图1中未示出的以下步骤来实现:
获取全景视频的序列帧;将各序列帧映射在预设的全景视频播放模型的内表面;将全景视频播放模型的对应观察界面的部分投影到投影面,以播放全景视频。
全景视频的每帧是一张360度全景图像,全景视频包括多张360度全景图像。将各序列帧映射在预设的全景视频播放模型的内表面,上述全景视频播放模型可以是根据全景视频的特点认为建立的模型,其是一种虚拟模型,比如可以是球体模型、立方体模型、棱锥模型等。以球体模型为例,其包括以球心为中心的360度全空间,将上述全景图像投影在球体模型的内表面,相当于人眼在球心位置观测全景图像。然后将全景视频播放模型对应的观察界面的部分投影到投影面,以播放全景视频。以观察者的眼睛为全景视频播放模型的中心,利用透视投影的规则,该全景视频播放模型的表面中位于投影区域内的表面上映射的全景图像会投影到成像投影面上,该投影面上的视频/图像最终显示到全景视频播放器的屏幕上。
步骤102,获取目标对象。
本实施例中,目标对象可以是各种待融合入全景视频中的对象,例如动画表情,文字符号或各种用于推广的物品等等。目标对象的格式可以是各种可以融合到全景视频中的格式,例如可以是obj格式。上述终端设备可以通过各种有线或无线连接的方式获取目标对象,例如,终端设备可以获取本地存储的目标对象,也可以获取用户通过各种方式输入的目标设备。
需要指出的是,上述无线连接方式可以包括但不限于3G/4G连接、WiFi连接、蓝牙连接、WiMAX连接、Zigbee连接、UWB(ultra wideband)连接、以及其他现在已知或将来开发的无线连接方式。
步骤103,解析目标对象,得到目标对象的坐标参数以及材质参数。
在获取到上述目标对象后,终端设备可以对上述目标对象进行解析,确定目标对象的坐标参数以及材质参数。上述坐标参数可以包括目标对象的顶点坐标、每个顶点的法线坐标等,上述材质参数可以包括目标对象各个面的参数以及每个面的材质的参数。
步骤104,根据坐标参数以及材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象。
终端设备在确定了目标对象的坐标参数以及材质参数后,可以为目标对象着色,即设置目标对象在融合在全景视频时每个像素的颜色,得到着色后的目标对象。
步骤105,将着色后的目标对象融合在全景视频中。
在为目标对象着色后,可以将着色后的目标对象融合在全景视频中,则实现了在播放全景视频时融合其它对象。
继续参见图2,图2是根据本实施例的用于在全景视频中融合对象的方法的应用场景的一个示意图。在图2的应用场景中,全景视频播放器中播放全景视频21,在播放过程中,获取目标对象,经解析后并设置目标对象21的颜色,得到着色后的目标对象,然后将着色后的目标对象22融合在全景视频21中。
本申请的上述实施例提供的用于在全景视频中融合对象的方法,在全景视频播放器中播放全景视频时,获取目标对象,然后对获取的目标对象进行解析,得到目标对象的坐标参数以及材质参数,然后根据上述坐标参数和材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象,最后将着色后的目标对象融合在全景视频中。本实施例的方法,不仅能够播放全景视频的内容,还可以在播放的全景视频中很好的融合目标对象,增加了全景视频的特效性。
在本实施例的一些可选的实现方式中,上述步骤105具体可以通过图1中未示出的以下步骤来实现:获取目标对象在全景视频中的位置坐标;对着色后的目标对象进行处理,上述处理包括以下至少一项:缩放、平移、旋转;根据上述位置坐标,定位处理后的目标对象。
本实现方式中,终端设备可以首先获取目标对象在全景视频中的位置坐标,然后对着色后的目标对象进行处理,例如缩放、平移或旋转,然后将处理后的目标对象定位在上述位置坐标处。这样,可以使得观察者可以从任意角度观察目标对象。
在本实施例的一些可选的实现方式中,上述方法还可以包括图1 中未示出的以下步骤:
获取所述全景视频播放器的传感器数据;根据所述传感器数据,确定全景视频播放器的朝向是否与所述位置坐标相交;响应于所述全景视频播放器的朝向与所述位置坐标相交,统计二者相交的持续时间;当所述持续时间大于预设阈值时,显示预设的交互界面
本实现方式中,可以根据全景视频播放器的传感器数据,确定全景视频播放器的朝向。然后判断上述朝向是否与目标对象的位置坐标相交,如果相交,则统计全景视频播放器的朝向与目标对象的位置坐标相交的持续时间,当上述持续时间大于预设阈值时,显示预设的交互界面。当目标对象为待推广的物品时,上述交互界面可以包括物品的信息、删除目标对象按钮或将目标对象加入购物车等按钮,以实现观察者与目标对象的交互。本实现方式中,全景视频播放器的朝向可以理解为观察者的眼睛所观察的方向,也就是说,观察者可以通过本实现方式通过长盯来实现与目标对象的交互。
继续参见图3,其示出了根据本申请的用于在全景视频中融合对象的方法中为目标对象着色的一个实施例的流程300。如图3所示,本实施例中可以通过以下步骤实现为目标对象着色:
步骤301,根据坐标参数,确定所述目标对象投影到投影面对应的二维坐标。
本实施例中,根据目标对象的坐标参数(例如顶点坐标以及法线坐标)可以确定目标对象投影到投影面上其所覆盖的部分对应的二维坐标。可以理解的是,上述二维坐标可以包括多个坐标,上述多个坐标用于表示目标对象在投影面上覆盖的部分。
步骤302,根据上述材质参数,确定目标对象对光线的反射系数。
物体对光线的反射包括镜面反射和漫反射,镜面反射的系数要大于漫反射的反射系数。漫反射通常是光线照射在粗糙的物体表面发生,且不同的材质在发生漫反射时的反射系数也不同。本实施例中,终端设备可以根据上述材质参数,确定目标对象对光线的反射系数。
在本实施例的一些可选的实现方式中,终端设备可以根据预设的材质参数与反射系数的对应列表以及上述目标对象的材质参数,确定 目标对象对光线的反射系数。
本实现方式中,终端设备可以首先获取包含材质参数与反射系数的对应关系的列表,然后根据该列表以及目标对象的材质参数,确定目标对象对光线的反射系数。
步骤303,根据上述二维坐标、上述反射系数以及预设的环境光强度和方向光强度,确定在全景视频中融合目标对象时各像素的颜色。
在确定了目标对象在投影面上的二维坐标以及目标对象对光线的反射系数后,可以根据预设的环境光强度和方向光强度,确定在全景视频中融合目标对象时各像素的颜色。环境光是指目标对象所处的环境中的光线,方向光是指来自某一方向的平行光。由于环境光的强度和方向光的强度为预设的,所以可以确定在全景视频中融合目标对象时各像素的颜色。
在本实施例的一些可选的实现方式中,上述步骤303可以通过图3中未示出的以下步骤来实现:根据上述二维坐标,确定目标对象融合在全景视频时各像素的坐标;根据各像素的坐标、上述反射系数以及预设的环境光强度和方向光强度,确定目标对象融合在全景视频时各像素的光照强度;根据各像素的光照强度,确定各像素的颜色。
本实现方式中,可以根据上述二维坐标,确定目标对象融合在全景视频中各像素的坐标,然后根据各像素的坐标、上述反射系数以及预设的环境光强度和方向光强度,确定环境光和方向光在各像素的光照强度,最后根据各像素的光照强度,确定各像素的颜色。
本申请的上述实施例提供的用于在全景视频中融合对象的方法,可以为目标对象着色,使得融合目标对象后的全景视频不突兀,提升观察者的观看体验。
进一步参考图4,作为对上述各图所示方法的实现,本申请提供了一种用于在全景视频中融合对象的装置的一个实施例,该装置实施例与图1所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图4所示,本实施例的用于在全景视频中融合对象的装置400包括:全景视频播放单元401、目标对象获取单元402、目标对象解析 单元403、目标对象着色单元404以及目标对象融合单元405。
全景视频播放单元401,用于在全景视频播放器中播放全景视频。
目标对象获取单元402,用于获取目标对象。
目标对象解析单元403,用于解析目标对象,得到目标对象的坐标参数以及材质参数。
目标对象着色单元404,用于根据坐标参数以及材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象。
目标对象融合单元405,用于将着色后的目标对象融合在全景视频中。
在本实施例的一些可选的实现方式中,上述全景视频播放单元401可以进一步包括图4中未示出的获取模块、映射模块以及投影模块。
其中,获取模块,用于获取全景视频的序列帧。
映射模块,用于将各序列帧映射在预设的全景视频播放模型的内表面。
投影模块,用于将全景视频播放模型的对应观察界面的部分投影到投影面,以播放全景视频。
在本实施例的一些可选的实现方式中,上述目标对象着色单元404可以进一步包括图4中未示出的二维坐标确定模块、反射系数确定模块以及像素颜色确定模块。
二维坐标确定模块,用于根据坐标参数,确定目标对象投影到所述投影面对应的二维坐标。
反射系数确定模块,用于根据材质参数,确定目标对象对光线的反射系数。
像素颜色确定模块,用于根据二维坐标、反射系数以及预设的环境光强度和方向光强度,确定在全景视频中融合目标对象时各像素的颜色。
在本实施例的一些可选的实现方式中,上述反射系数确定模块可以进一步用于:根据预设的材质参数与反射系数的对应列表以及上述材质参数,确定目标对象对光线的反射系数。
在本实施例的一些可选的实现方式中,上述像素颜色确定模块进一步用于:根据上述二维坐标,确定目标对象融合在全景视频时各像素的坐标;根据各像素的坐标、上述反射系数以及预设的环境光强度和方向光强度,确定目标对象融合在全景视频时各像素的光照强度;根据各像素的光照强度,确定各像素的颜色。
在本实施例的一些可选的实现方式中,上述目标对象融合单元405可以进一步包括图4中未示出的位置坐标获取模块、目标对象处理模块以及目标对象定位模块。
其中,位置坐标获取模块,用于获取目标对象在全景视频中的位置坐标。
目标对象处理模块,用于对着色后的目标对象进行处理,上述处理包括以下至少一项:缩放、平移、旋转。
目标对象定位模块,用于根据上述位置坐标,定位处理后的目标对象。
在本实施例的一些可选的实现方式中,上述装置还包括图4中未示出的交互单元,上述交互单元可以包括传感器数据获取模块、相交状态判断模块、相交时间确定模块以及交互界面显示模块。
其中,传感器数据获取模块,用于获取全景视频播放器的传感器数据。
相交状态判断模块,用于根据上述传感器数据,确定全景视频播放器的朝向是否与上述位置坐标相交。
相交时间确定模块,用于响应于全景视频播放器的朝向与位置坐标相交,统计二者相交的持续时间。
交互界面显示模块,用于当上述持续时间大于预设阈值时,显示预设的交互界面。
本申请的上述实施例提供的用于在全景视频中融合对象的装置,在全景视频播放器中播放全景视频时,获取目标对象,然后对获取的目标对象进行解析,得到目标对象的坐标参数以及材质参数,然后根据上述坐标参数和材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象,最后将着色后的目标对象融合在 全景视频中。本实施例的装置,不仅能够播放全景视频的内容,还可以在播放的全景视频中很好的融合目标对象,增加了全景视频的特效性。
应当理解,用于在全景视频中融合对象的装置400中记载的单元401至单元405分别与参考图1中描述的方法中的各个步骤相对应。由此,上文针对用于在全景视频中融合对象的方法描述的操作和特征同样适用于装置400及其中包含的单元,在此不再赘述。装置400的相应单元可以与终端设备中的单元相互配合以实现本申请实施例的方案。
下面参考图5,其示出了适于用来实现本申请实施例的终端设备的计算机系统500的结构示意图。图5示出的终端设备仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图5所示,计算机系统500包括中央处理单元(CPU)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有系统500操作所需的各种程序和数据。CPU 501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在机器可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该 计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本申请的方法中限定的上述功能。
需要说明的是,本申请所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是, 框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器包括全景视频播放单元、目标对象获取单元、目标对象解析单元、目标对象着色单元和目标对象融合单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,目标对象获取单元还可以被描述为“获取目标对象的单元”。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的装置中所包含的;也可以是单独存在,而未装配入该装置中。上述计算机可读介质承载有一个或者多个程序,当所述一个或者多个程序被该装置执行时,使得该装置:在全景视频播放器中播放全景视频;获取目标对象;解析目标对象,得到目标对象的坐标参数以及材质参数;根据上述坐标参数以及上述材质参数,设置目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;将着色后的目标对象融合在全景视频中。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (16)

  1. 一种用于在全景视频中融合对象的方法,其特征在于,所述方法包括:
    在全景视频播放器中播放全景视频;
    获取目标对象;
    解析所述目标对象,得到所述目标对象的坐标参数以及材质参数;
    根据所述坐标参数以及所述材质参数,设置所述目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;
    将着色后的目标对象融合在所述全景视频中。
  2. 根据权利要求1所述的方法,其特征在于,所述在全景视频播放器中播放全景视频,包括:
    获取所述全景视频的序列帧;
    将各序列帧映射在预设的全景视频播放模型的内表面;
    将所述全景视频播放模型的对应观察界面的部分投影到投影面,以播放所述全景视频。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述坐标参数以及所述材质参数,设置所述目标对象每个像素的颜色,得到着色后的目标对象,包括:
    根据所述坐标参数,确定所述目标对象投影到所述投影面对应的二维坐标;
    根据所述材质参数,确定所述目标对象对光线的反射系数;
    根据所述二维坐标、所述反射系数以及预设的环境光强度和方向光强度,确定在所述全景视频中融合所述目标对象时各像素的颜色。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述材质参数,确定所述目标对象对光线的反射系数,包括:
    根据预设的材质参数与反射系数的对应列表以及所述材质参数, 确定所述目标对象对光线的反射系数。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述二维坐标、所述反射系数以及预设的环境光强度和方向光强度,确定在所述全景视频中融合所述目标对象时各像素的颜色,包括:
    根据所述二维坐标,确定所述目标对象融合在所述全景视频时各像素的坐标;
    根据各像素的坐标、所述反射系数以及预设的环境光强度和方向光强度,确定所述目标对象融合在所述全景视频时各像素的光照强度;
    根据各像素的光照强度,确定各像素的颜色。
  6. 根据权利要求1所述的方法,其特征在于,所述将着色后的目标对象融合在所述全景视频中,包括:
    获取所述目标对象在所述全景视频中的位置坐标;
    对着色后的目标对象进行处理,所述处理包括以下至少一项:缩放、平移、旋转;
    根据所述位置坐标,定位处理后的目标对象。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    获取所述全景视频播放器的传感器数据;
    根据所述传感器数据,确定全景视频播放器的朝向是否与所述位置坐标相交;
    响应于所述全景视频播放器的朝向与所述位置坐标相交,统计二者相交的持续时间;
    当所述持续时间大于预设阈值时,显示预设的交互界面。
  8. 一种用于在全景视频中融合对象的装置,其特征在于,所述装置包括:
    全景视频播放单元,用于在全景视频播放器中播放全景视频;
    目标对象获取单元,用于获取目标对象;
    目标对象解析单元,用于解析所述目标对象,得到所述目标对象的坐标参数以及材质参数;
    目标对象着色单元,用于根据所述坐标参数以及所述材质参数,设置所述目标对象融合在全景视频时每个像素的颜色,得到着色后的目标对象;
    目标对象融合单元,用于将着色后的目标对象融合在所述全景视频中。
  9. 根据权利要求8所述的装置,其特征在于,所述全景视频播放单元包括:
    获取模块,用于获取所述全景视频的序列帧;
    映射模块,用于将各序列帧映射在预设的全景视频播放模型的内表面;
    投影模块,用于将所述全景视频播放模型的对应观察界面的部分投影到投影面,以播放所述全景视频。
  10. 根据权利要求9所述的装置,其特征在于,所述目标对象着色单元包括:
    二维坐标确定模块,用于根据所述坐标参数,确定所述目标对象投影到所述投影面对应的二维坐标;
    反射系数确定模块,用于根据所述材质参数,确定所述目标对象对光线的反射系数;
    像素颜色确定模块,用于根据所述二维坐标、所述反射系数以及预设的环境光强度和方向光强度,确定在所述全景视频中融合所述目标对象时各像素的颜色。
  11. 根据权利要求10所述的装置,其特征在于,所述反射系数确定模块进一步用于:
    根据预设的材质参数与反射系数的对应列表以及所述材质参数,确定所述目标对象对光线的反射系数。
  12. 根据权利要求10所述的装置,其特征在于,所述像素颜色确定模块进一步用于:
    根据所述二维坐标,确定所述目标对象融合在所述全景视频时各像素的坐标;
    根据各像素的坐标、所述反射系数以及预设的环境光强度和方向光强度,确定所述目标对象融合在所述全景视频时各像素的光照强度;
    根据各像素的光照强度,确定各像素的颜色。
  13. 根据权利要求8所述的装置,其特征在于,所述目标对象融合单元包括:
    位置坐标获取模块,用于获取所述目标对象在所述全景视频中的位置坐标;
    目标对象处理模块,用于对着色后的目标对象进行处理,所述处理包括以下至少一项:缩放、平移、旋转;
    目标对象定位模块,用于根据所述位置坐标,定位处理后的目标对象。
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括交互单元,所述交互单元包括:
    传感器数据获取模块,用于获取所述全景视频播放器的传感器数据;
    相交状态判断模块,用于根据所述传感器数据,确定全景视频播放器的朝向是否与所述位置坐标相交;
    相交时间确定模块,用于响应于所述全景视频播放器的朝向与所述位置坐标相交,统计二者相交的持续时间;
    交互界面显示模块,用于当所述持续时间大于预设阈值时,显示预设的交互界面。
  15. 一种终端设备,其特征在于,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一所述的方法。
  16. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-7中任一所述的方法。
PCT/CN2018/094519 2017-07-04 2018-07-04 用于在全景视频中融合对象的方法和装置 WO2019007370A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
RU2019144488A RU2730877C1 (ru) 2017-07-04 2018-07-04 Способ и устройство для интеграции объекта в панорамное видео
US16/628,132 US11188801B2 (en) 2017-07-04 2018-07-04 Method and apparatus for fusing object into panoramic video

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710537524.8 2017-07-04
CN201710537524.8A CN109214979B (zh) 2017-07-04 2017-07-04 用于在全景视频中融合对象的方法和装置

Publications (1)

Publication Number Publication Date
WO2019007370A1 true WO2019007370A1 (zh) 2019-01-10

Family

ID=64949739

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094519 WO2019007370A1 (zh) 2017-07-04 2018-07-04 用于在全景视频中融合对象的方法和装置

Country Status (4)

Country Link
US (1) US11188801B2 (zh)
CN (1) CN109214979B (zh)
RU (1) RU2730877C1 (zh)
WO (1) WO2019007370A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866489A (zh) * 2019-04-29 2020-10-30 浙江开奇科技有限公司 一种实现沉浸式全景教学的方法
US11416774B2 (en) * 2019-10-23 2022-08-16 Samsung Electronica Da Amazonia Ltda. Method for video recognition capable of encoding spatial and temporal relationships of concepts using contextual features
CN112712487A (zh) * 2020-12-23 2021-04-27 北京软通智慧城市科技有限公司 一种场景视频融合方法、系统、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101588482A (zh) * 2009-06-02 2009-11-25 石黎 一种车载虚拟全景电子系统
US7693702B1 (en) * 2002-11-01 2010-04-06 Lockheed Martin Corporation Visualizing space systems modeling using augmented reality
CN105844256A (zh) * 2016-04-07 2016-08-10 广州盈可视电子科技有限公司 一种全景视频帧图像处理方法和装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2238743A4 (en) * 2007-12-17 2011-03-30 Stein Gausereide REAL-TIME VIDEO INCLUSION SYSTEM
CN105023260A (zh) * 2014-04-22 2015-11-04 Tcl集团股份有限公司 一种全景图像融合方法及融合装置
KR101946019B1 (ko) * 2014-08-18 2019-04-22 삼성전자주식회사 파노라믹 동영상을 생성하는 동영상 처리 장치 및 그 방법
CN104506828B (zh) * 2015-01-13 2017-10-17 中南大学 一种无有效重叠变结构的定点定向视频实时拼接方法
CN104867175A (zh) * 2015-06-02 2015-08-26 孟君乐 一种虚拟效果图实景展示装置及其实现方法
US9699380B2 (en) * 2015-11-03 2017-07-04 Intel Corporation Fusion of panoramic background images using color and depth data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7693702B1 (en) * 2002-11-01 2010-04-06 Lockheed Martin Corporation Visualizing space systems modeling using augmented reality
CN101588482A (zh) * 2009-06-02 2009-11-25 石黎 一种车载虚拟全景电子系统
CN105844256A (zh) * 2016-04-07 2016-08-10 广州盈可视电子科技有限公司 一种全景视频帧图像处理方法和装置

Also Published As

Publication number Publication date
US11188801B2 (en) 2021-11-30
CN109214979A (zh) 2019-01-15
US20200387740A1 (en) 2020-12-10
RU2730877C1 (ru) 2020-08-26
CN109214979B (zh) 2020-09-29

Similar Documents

Publication Publication Date Title
US9654734B1 (en) Virtual conference room
US20130321396A1 (en) Multi-input free viewpoint video processing pipeline
WO2017152803A1 (zh) 图像处理方法和设备
US20130141434A1 (en) Virtual light in augmented reality
US20140176591A1 (en) Low-latency fusing of color image data
KR101713875B1 (ko) 프로젝터 투사 환경하에서의 사용자 시점을 고려한 가상공간 구현 방법 및 시스템
CN112312111A (zh) 虚拟图像的显示方法、装置、电子设备及存储介质
CN113223130B (zh) 一种路径漫游方法、终端设备以及计算机存储介质
WO2019007370A1 (zh) 用于在全景视频中融合对象的方法和装置
US20160371885A1 (en) Sharing of markup to image data
CN107005689B (zh) 数字视频渲染
US10803652B2 (en) Image generating apparatus, image generating method, and program for displaying fixation point objects in a virtual space
US20230394701A1 (en) Information processing apparatus, information processing method, and storage medium
Ponto et al. Effective replays and summarization of virtual experiences
JP7447266B2 (ja) ボリュメトリック画像データに関するビューの符号化及び復号
WO2022089061A1 (zh) 物体标注信息呈现方法、装置、电子设备及存储介质
US20220129062A1 (en) Projection Method, Medium and System for Immersive Contents
CN112286355B (zh) 一种用于沉浸式内容的交互方法和系统
Guefrech et al. Revealable volume displays: 3D exploration of mixed-reality public exhibitions
CN117197319B (zh) 图像生成方法、装置、电子设备及存储介质
TWM563614U (zh) 混合實境社區生活圈找房裝置
WO2023174209A1 (zh) 一种虚拟拍摄方法、装置及设备
You et al. [POSTER] SelfieWall: A Mixed Reality Advertising Platform
CN118262044A (zh) 图像显示方法、装置、服务器及计算机可读存储介质
PATTI Reducing motion sickness on mobile phone based VR applications using 6DoF tracking

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

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

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 03.04.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18828480

Country of ref document: EP

Kind code of ref document: A1