Summary of the invention
In order to solve above-mentioned technical problem, the invention provides the method and device of a kind of content that pans,
The shooting ability of intelligent terminal, shooting can be utilized to generate panorama content.
In order to reach the application purpose, a kind of method that the invention provides content that pans, it is applied to
On intelligent terminal, described intelligent terminal arranges front-facing camera and post-positioned pick-up head, described front-facing camera
On install preposition fish eye lens additional, described post-positioned pick-up head installs additional rearmounted fish eye lens, described method includes:
Described intelligent terminal coordinates front-facing camera Real-time Collection prospect to be more than by described preposition fish eye lens
The extraneous scene of 180 degree of scopes, generates foreground video stream;Rearmounted shooting is coordinated by rearmounted fish eye lens
Head Real-time Collection background, more than the extraneous scene of 180 degree of scopes, generates background video flowing;
Described intelligent terminal carries out anastomosing and splicing to described foreground video stream and background video flowing in real time, generates
Panoramic video stream.
Present invention also provides the device of a kind of content that pans, be applied on intelligent terminal, described intelligence
Front-facing camera and post-positioned pick-up head can be set terminal, described front-facing camera installs additional preposition fish eye lens,
Installing rearmounted fish eye lens on described post-positioned pick-up head additional, described device includes: video flowing signal generating unit and melting
Close concatenation unit, wherein:
Described video flowing signal generating unit, for coordinating front-facing camera real-time by described preposition fish eye lens
Collection prospect, more than the extraneous scene of 180 degree of scopes, generates foreground video stream;By rearmounted fish eye lens
Coordinate the post-positioned pick-up head Real-time Collection background extraneous scene more than 180 degree of scopes, generate background video flowing;
Described anastomosing and splicing unit, for merging described foreground video stream and background video flowing in real time
Splicing, generates panoramic video stream.
Compared with prior art, the present invention includes that the method is applied on intelligent terminal, described intelligent terminal
Built-in front-facing camera and post-positioned pick-up head, described front-facing camera installs additional preposition fish eye lens, described
Installing rearmounted fish eye lens on post-positioned pick-up head additional, described method includes: described intelligent terminal is by before described
Put fish eye lens and coordinate the front-facing camera Real-time Collection prospect extraneous scene more than 180 degree of scopes, generate
Foreground video stream;Coordinate post-positioned pick-up head Real-time Collection background more than 180 degree of models by rearmounted fish eye lens
The extraneous scene enclosed, generates background video flowing;Described intelligent terminal in real time to described foreground video stream and after
Scape video flowing carries out anastomosing and splicing, generates panoramic video stream.The present invention when carrying out panorama content imaging,
Utilizing the shooting ability of intelligent terminal, shooting to generate panorama content, not only operation is succinct, efficiency is high, and
And without the panorama camera of purchasing price costliness, reduce the cost of panorama content production, for panorama content
Making reduces threshold, and VR content can be made more universal in life.
Other features and advantages of the present invention will illustrate in the following description, and, partly from froming the perspective of
Bright book becomes apparent, or understands by implementing the present invention.The purpose of the present invention is excellent with other
Point can be realized by structure specifically noted in description, claims and accompanying drawing and be obtained.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing
Embodiments of the invention are described in detail.It should be noted that in the case of not conflicting, this Shen
Embodiment in please and the feature in embodiment can mutual combination in any.
Can be at the computer of such as one group of computer executable instructions in the step shown in the flow chart of accompanying drawing
System performs.And, although show logical order in flow charts, but in some cases,
Can be to be different from the step shown or described by order execution herein.
The method of the content that pans of the application is applied on intelligent terminal, and intelligent terminal is built-in preposition to be taken the photograph
As head and post-positioned pick-up head, front-facing camera installs preposition fish eye lens, after post-positioned pick-up head installs additional additional
Put fish eye lens.The effect of fish eye lens maximum is to expand angular field of view greatly, the fish eye lens requirement of selection
Visual angle is more than 180 degree.The front-facing camera of intelligent terminal installs preposition fish eye lens additional, and post-positioned pick-up head adds
After filling rearmounted fish eye lens, the scenery in the range of 360 ° centered by intelligent terminal can be photographed.
Intelligent terminal in the application can be smart mobile phone, panel computer etc. any be built-in with front-facing camera and
The terminal unit of post-positioned pick-up head.
As it is shown in figure 1, the method for the content that pans of the application, including:
Step 101: intelligent terminal coordinates front-facing camera Real-time Collection prospect big by preposition fish eye lens
In the extraneous scene of 180 degree of scopes, generate foreground video stream;Rearmounted taking the photograph is coordinated by rearmounted fish eye lens
As head Real-time Collection background is more than the extraneous scene of 180 degree of scopes, generate background video flowing;
In order to make fish eye lens coordinate the photographic head of intelligent terminal itself to obtain foreground video stream and background
Video flowing, when installing fish eye lens additional, need to according to the profile of intelligent terminal, the position of front-facing camera,
The position of post-positioned pick-up head makes fish-eye fixing device, for fish eye lens is fixed to this intelligence
The relevant position of terminal, makes preposition fish-eye emergent pupil cover the entrance pupil of intelligent terminal's front-facing camera,
Rearmounted fish-eye emergent pupil covers the entrance pupil of intelligent terminal's post-positioned pick-up head.
Intelligent terminal carries out optical signal to the signal of telecommunication by the sensor of front-facing camera and post-positioned pick-up head
Conversion, it is possible to obtain prospect and the live video stream of two Radix Rumiciss of background, this utilizes two videos for us
Stream is spliced into panorama content and provides possibility.
Step 102: intelligent terminal carries out anastomosing and splicing to foreground video stream and background video flowing in real time, raw
Become panoramic video stream.
The application can carry out foreground video stream and background video by the application being installed on intelligent terminal
The anastomosing and splicing of stream.After application on intelligent terminal receives foreground video stream and background video flowing, to front
Scape video flowing and background video flowing carry out anastomosing and splicing, generate panoramic video stream.
In specific implementation process, application can being to be arranged on intelligent terminal with independent APP form,
Can also be to be built in modular form in the camera applications of intelligent terminal itself.
In the application use the algorithm that two-way wide-angle video stream anastomosing and splicing is panoramic video stream is contained but
It is not limited to existing panoramic mosaic algorithm, does not enumerates.
Further, intelligent terminal, after generating panoramic video stream, presents panoramic video the most in real time
Stream, for user's live preview panoramic video stream.
Further, intelligent terminal's (application being installed on intelligent terminal) is generating the same of panoramic video stream
Time detection user operation, the selection for user carries out corresponding panoramic video stream process.
If user selects to shoot photo, then from panoramic video stream, extract user take pictures the frame in moment
Video data, and it is compressed storage.One-frame video data boil down to png or jpg that can will extract
Store Deng form.
If user selects recorded video, then the panoramic video stream in user's recording time section is encoded
Compression generates video file, and is named according to set naming rule, storage to assigned catalogue.Can
With by the video file of the panoramic video stream compression coding form such as mp4 and store, user can use and appoint
Meaning panorama player plays and check content of shooting, it is possible to this content is shared to panorama content platform.
If user selects panorama live, then panoramic video stream is carried out real-time coding, call push function
Panoramic video stream after coding is pushed to background server, it is achieved panorama is live.
Further, intelligent terminal is more than 180 degree of models in Real-time Collection prospect more than 180 degree of scopes and background
During the extraneous scene enclosed, also gather external sound, generate real-time audio stream, as adopted by audio sensor
The audio stream that collection external sound generates;
Applying of the upper installation of intelligent terminal is receiving front-facing camera and the foreground video of post-positioned pick-up head generation
While stream and background video flowing, also receive audio sensor and gather the audio stream that external sound generates.
Above-mentioned panoramic video stream in user's recording time section is carried out compression coding, including: according to the time
Real-time audio stream is alignd, by panoramic video stream and the real-time audio stream encryption alignd by stamp with panoramic video stream
Compression is stored as video file;
Above-mentioned panoramic video stream is carried out real-time coding, call push function by the panoramic video stream after coding
It is pushed to background server, including: real-time panoramic video stream and real-time audio stream are carried out real-time coding,
Call push function and the real-time panoramic video stream after coding and real-time audio stream are pushed to background server.
As in figure 2 it is shown, present invention also provides the device of a kind of content that pans, it is applied to intelligence eventually
On end, intelligent terminal arranges front-facing camera and post-positioned pick-up head, and front-facing camera installs additional preposition flake
Camera lens, post-positioned pick-up head installs additional rearmounted fish eye lens, and device includes: video flowing signal generating unit and fusion
Concatenation unit, wherein:
Video flowing signal generating unit, for coordinating front-facing camera Real-time Collection prospect by preposition fish eye lens
More than the extraneous scene of 180 degree of scopes, generate foreground video stream;Coordinate rearmounted by rearmounted fish eye lens
Photographic head Real-time Collection background, more than the extraneous scene of 180 degree of scopes, generates background video flowing;
Anastomosing and splicing unit, in real time foreground video stream and background video flowing being carried out anastomosing and splicing, raw
Become panoramic video stream.
Further, this device also includes display unit, wherein:
Display unit, for generating after panoramic video stream at anastomosing and splicing unit, on a display screen in real time in
Existing panoramic video stream, for user's live preview.
Further, this device also includes detector unit and photographing unit, wherein:
Detector unit, detects the operation of user while generating panoramic video stream at anastomosing and splicing unit;
In detector unit, photographing unit, for detecting that user selects to shoot photo, from panoramic video stream
Extract user to take pictures the one-frame video data in moment, and be compressed storage.
Further, this device also includes panoramic video recording elements and/or live unit, and detector unit,
Wherein:
Detector unit, detects the operation of user while generating panoramic video stream at anastomosing and splicing unit;
Panoramic video recording elements, for when detector unit detects that user selects recorded video, to
Panoramic video stream in the recording time section of family carries out coding and generates video file;
Live unit, for when detector unit detects that user selects panorama live, to panoramic video stream
Carry out real-time coding, call push function and the panoramic video stream after coding is pushed to background server, real
Existing panorama is live.
Further, this device also includes audio collection unit, wherein:
Audio collection unit, for video flowing signal generating unit Real-time Collection prospect more than 180 degree scopes with
When background is more than the extraneous scene of 180 degree of scopes, gather external sound, generate real-time audio stream;
Panoramic video recording elements carries out coding and generates video the panoramic video stream in user's recording time section
File, including: according to timestamp by the real-time audio stream in user's recording time section and panoramic video stream pair
Together, panoramic video stream is stored as video file with the real-time audio stream encryption alignd;
Live unit carries out real-time coding to panoramic video stream, calls push function by the aphorama after coding
Frequently stream is pushed to background server, including: panoramic video stream and real-time audio stream are carried out real-time coding,
Call push function and the panoramic video stream after coding and real-time audio stream are pushed to background server.
Although the embodiment that disclosed herein is as above, but described content only readily appreciates the present invention
And the embodiment used, it is not limited to the present invention.Technology people in any art of the present invention
Member, on the premise of without departing from the spirit and scope that disclosed herein, can be in the form implemented and thin
Any amendment and change is carried out on joint, but the scope of patent protection of the present invention, still must be with appended right
Claim is defined in the range of standard.