Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case of not conflicting, in embodiment in the application and embodiment
Feature can mutual combination in any.
Can be in middle execution such as such as CPU, special image processing chips etc. in the step shown in the flow chart of accompanying drawing.Further,
Although showing logical order in flow charts, but in some cases, can perform shown with the order being different from herein
The step gone out or describe.
In existing panoramic video joining method, after needing video panorama camera shot by mobile phone or PC to carry out
The splicing fusion treatment of phase, the splicing poor real of this mode, splicing cost are high and operate complicated.For this problem, this Shen
Please provide a solution, cardinal principle is: is shot external image by multiple image acquisition units of camera terminal, obtains
Multichannel wide-angle video data, camera terminal receives each road wide-angle video data, carries out multichannel wide-angle video data at synchronization
Reason, after completing synchronization process, each road wide-angle video data write memorizer after synchronizing, and carry out launching to realize distortion school
Just, finally, the overlapping region to the multichannel wide-angle video data after launching carries out splicing fusion treatment.
Owing to the application completing in camera terminal the splicing fusion treatment of panoramic video, therefore, obtain many in shooting
After the wide-angle video data of road, it is not necessary to re-use mobile phone or PC carries out later stage splicing fusion treatment, improve panoramic video splicing
Real-time.Further, use an equipment complete from wide-angle video photograph image mosaic merge whole work, due to without
Later stage puts into other hardware costs again, greatly reduces the cost of image procossing, and simplifies the operation of user, simpler
Easy-to-use.
The technical scheme that each embodiment of the application provides is described in detail below in conjunction with accompanying drawing.
The real-time joining method of panoramic video of the application is applied in camera terminal.In actual applications, complete in order to obtain
Scape image, panoramic video, occur in that pan-shot terminal, such as panorama camera, panoramic camera etc..These pan-shot terminals
Including at least two image acquisition units, image acquisition units includes a wide-angle lens (such as fish eye lens) and a picked-up
The imageing sensor of the image formed by this wide-angle lens.At least two image acquisition units is arranged dorsad, it is ensured that collect water
The panoramic picture of gentle the most each 360 °.Camera terminal is by the acquisition that combined by the image that each image acquisition units is absorbed
Solid angle radian is the image of 4 π.
The flow chart of the real-time joining method of panoramic video that Fig. 1 provides for the application one embodiment.As it is shown in figure 1, the party
Method includes:
Step 101: receive multiple image acquisition units and shoot the multichannel wide-angle video data obtained;
Step 102: multichannel wide-angle video data are carried out synchronization process;
Step 103: each road wide-angle video data write memorizer after synchronizing, and launch the realization of wide-angle video data
Distortion correction;
Step 104: carry out splicing fusion treatment to the overlapping region of the multichannel wide-angle video data after launching.
In actual applications, for obtaining panorama content, need respectively to be clapped by the camera terminal comprising multiple image acquisition units
Take the photograph the image more than 180 degree of scopes, then carry out splicing fusion and obtain panorama content.The method that the present embodiment provides can be used for clapping
Take the photograph terminal Zhong Jiangge road and be fused to panoramic picture, panoramic video more than the image mosaic of 180 degree of scopes.Preferably, this method can
For comprising the camera terminal of two image acquisition units, two-way is fused to panorama sketch more than the image mosaic of 180 degree of scopes
Picture, panoramic video.
What deserves to be explained is, the method for the present embodiment also is not only limited to merge the image mosaic more than 180 degree of scopes
For panoramic picture, panoramic video, optionally, the image for the shooting of several non-wide-angle lens can also use the present embodiment to provide
Method be spliced into panoramic picture, panoramic video, but be not limited to this.
In order to obtain panoramic picture or panoramic video, camera terminal needs first by image acquisition units shooting external world figure
Picture, obtains multichannel wide-angle video data, and the image of two image acquisition units shootings need to ensure the region that overlaps.Camera terminal
Receive multichannel wide-angle video data, to carry out multichannel wide-angle video data splicing fusion treatment, obtain panoramic picture, aphorama
Frequently.
Owing to multiplex image acquisition unit is separate, the image collected has successively time difference, synchronizes even if using
Control circuit is controlled, and also cannot ensure to shoot the multichannel wide-angle video data precise synchronization obtained.Therefore, multichannel is being obtained
After wide-angle video data, need these multichannel wide-angle video data are first carried out synchronization process.
Concrete, these multichannel wide-angle video data are first carried out synchronization process, including: by multichannel wide-angle video data respectively
Write caching, at synchronization by the wide-angle video data read-out in multiple cachings after a delay specifying time threshold,
Multichannel wide-angle video data Complete Synchronization after synchronization process.
Multichannel wide-angle video data after synchronization ensure in time domain the most consistent, it is to avoid shake and time occurs in video
The phenomenon such as inconsistent.
Wide-angle lens, especially fish eye lens, the scope reaching or seeing beyond human eye is made every effort at its visual angle.Therefore,
There is bigger distortion in wide-angle lens in imaging process, fault image does not meets the viewing custom of human eye, so fault image
Needs are corrected.
Based on this, after multichannel wide-angle video data are carried out synchronization process, need each road wide-angle video data are entered
Line distortion corrects, in the method that the present embodiment provides, by launching to realize wide-angle video data to each road wide-angle video data
Distortion correction.In the present embodiment, in each road wide-angle video data write memorizer after synchronizing, and complete to launch, with
Continuous overlapping region to the multichannel wide-angle video data after launching further carries out splicing fusion treatment after an action of the bowels.
The above-mentioned expansion to wide-angle video data refers to according to imaging model, multiple image acquisition units are shot several
Different visual angles image unification is in the same coordinate system.The wide-angle lens of camera terminal is marked by the method for the present embodiment in advance
Fixed, obtain each self-corresponding image coordinate information for distortion correction of each wide-angle lens.During image spread, sit according to image
Mark information carries out coordinate addressing, reads out the pixel in wide-angle video data, is equivalent to each road wide-angle video data unified
In same coordinate system, completing the expansion of image, it is achieved that the distortion correction of image, this mode greatly simplify reality
Time process complexity.
In the method for the present embodiment, in each road wide-angle video data write memorizer after synchronizing, can be for
Each road wide-angle video data are respectively configured a memorizer one to one, for starting to shoot Radix Rumicis in image acquisition units
After video data, the wide-angle video data obtained are write corresponding memorizer, and, in advance by corresponding wide-angle lens
Image coordinate information stores in the memorizer of correspondence, in order to according to the image coordinate information of storage in memorizer, to write, this is deposited
The wide-angle video data of reservoir are launched.
Optionally, it is also possible to a memorizer is marked off multiple subregion, each zone configuration gives the Radix Rumicis that a road is corresponding
The wide-angle video data obtained, after image acquisition units starts to shoot wide-angle video data, are written to correspondence by video data
Subregion in, and, in advance corresponding image coordinate information is stored in respective partition.
Image coordinate information can represent in the way of using look-up table, when unfolded image, by reading the side of look-up table
Formula obtains coordinate, reads out the pixel in wide-angle video data further according to coordinate.
Based on above-mentioned, think that each road wide-angle video data are respectively configured one one to one as a example by memorizer, will be with
Each road wide-angle video data write memorizer after step, and launch wide-angle video data and realize distortion correction, including:
Will synchronize after each road wide-angle video data frame by frame be written as the relative of this road wide-angle video data configuration
In the memorizer answered, wherein, corresponding memorizer prestores corresponding image coordinate information, for writing this image
The wide-angle video data of coordinate information place memorizer carry out distortion correction;
While frame by frame by memorizer corresponding for the write of wide-angle video data, from corresponding memorizer, read image sit
Coordinate in mark information, and open up from written into the wide-angle video data of this memorizer read out pixel corresponding to coordinate
Open wide-angle video data, it is achieved the distortion correction of wide-angle video data.
The wide-angle video data on each road are all to be written to frame by frame in the memorizer of correspondence, during write image,
The coordinate in the image coordinate information of storage can be read in this memorizer simultaneously, according to coordinate read written into memorizer wide
The pixel of angle video data, thus launch written into the wide-angle video data in this memorizer, it is achieved distortion correction.
After wide-angle video data after being launched, it is possible to carry out the splicing fusion treatment of overlapping region, obtain complete
Scape image, i.e. can get panoramic video for video capture.But, need to carry out memorizer behaviour during image spread
Make, which limits the efficiency that image launches in real time, the frame per second of the panoramic picture obtained after may causing splicing and image acquisition
The frame per second of the video that unit gathers is different, causes the problem that image frame per second declines, cannot ensure to splice in real time.
In the method that the present embodiment provides, for avoiding the frame per second before and after splicing different, adopt with the following method: after synchronizing
Each road wide-angle video data write frame by frame with in the wide-angle video data memorizer one to one of each road, and frame by frame will
While the memorizer that the write of wide-angle video data is corresponding, read in image coordinate information from the memorizer that wide-angle video is corresponding
Coordinate, and from written into the wide-angle video data of this memorizer read out the pixel that coordinate is corresponding, including:
For each road wide-angle video data after synchronizing, in the row field effective time of presently written frame, perform frame
The operation of the memorizer that data write is corresponding, in the row field blanking interval of presently written frame, reads coordinate, and reads according to coordinate
Take written into the pixel in the previous frame of the presently written frame of described memorizer, complete at the same time presently written frame write and
After the reading of described previous frame, next frame is write corresponding memorizer as presently written frame and substitutes the frame number being read
According to, and circulated the expansion of wide-angle video data successively.
The present embodiment provide method in, for synchronize after each road wide-angle video data be all write frame by frame the most right
The memorizer answered, therefore, is referred to as presently written frame by the picture frame of memorizer to be written to.Picture frame comprises capable field have
Effect signal and row field invalid signals, row field useful signal marks the row field effective time of picture frame, row field invalid signals labelling
The row field blanking that goes out picture frame interval (or claim row field ineffective time).In the embodiment of the present application, have in the row field of presently written frame
In the effect time, perform the write of frame data, within row field ineffective time of presently written frame, perform the reading of the pixel of previous frame
Take, it is possible to efficiently utilize bandwidth of memory, it is ensured that the frame per second before and after splicing is consistent, i.e. ensure that the real-time of splicing.
In other words, the write operation namely making presently written frame write memorizer enables signal and presently written frame line field
Useful signal keeps consistent, makes the row field invalid signals reading to enable signal with presently written frame that reading previous frame pixel operates
Keep consistent.
In the method that the present embodiment provides, after the row field effective time of presently written frame arrives, write in memorizer
The effective image data of present frame, after completing the write of effective image data, row field effective time terminates, then row field blanking district
Between arrive, within this period, read coordinate, and according to coordinate read written in the previous frame of the presently written frame of memorizer
Pixel, so far complete a read-write cycle, and reciprocal with this, complete the write of presently written frame and presently written frame
Previous frame expansion after, using the next frame of presently written frame as next presently written frame write memorizer, refresh substitute
The previous frame being read, the picture frame being the most just written into memorizer will be unfolded as previous frame.
Based on above-mentioned, owing to the present embodiment being write memorizer frame by frame, therefore, when writing the first frame to memorizer,
When namely writing each road wide-angle video data the first frame after synchronizing, memorizer also there is no data, therefore, for same
First frame of each road wide-angle video data after step, in the row field effective time of the first frame, performs to write this first frame
The operation of corresponding memorizer;In the row field blanking interval of the first frame, do not perform read operation.In the write completing the first frame
After, during using the second frame as presently written frame, according in the row field effective time of presently written frame, perform writing of frame data
Enter, within row field ineffective time of presently written frame, perform the reading of the pixel of previous frame.
In the method that the present embodiment provides, after each road wide-angle video data are launched, to the multichannel Radix Rumicis after launching
The overlapping region of video data carries out splicing fusion treatment, obtains panoramic picture or panoramic video.
The method merged such as uses Wavelet Fusion, weighted average fusion etc..Such as, the photo terminal to twin-lens shoots
Two-way wide-angle video data, the video image after launching two carries out the fusion treatment of overlapping region, two video image warps
Unite two into one after fusion, form the full-view video image spliced.
Further, in the method that the present embodiment provides, melt the overlapping region of multichannel wide-angle video data is carried out splicing
Conjunction processes after obtaining panoramic picture or panoramic video, is also standard by spliced panoramic video or panoramic picture compression coding
Data form, and the panoramic video after compression or panoramic picture are transferred to rear end equipment and store or show.For example, it is possible to
By the panoramic video after the data transmission interface transmission compressions such as USB interface, wifi interface or panoramic picture.
As in figure 2 it is shown, present invention also provides a kind of real-time splicing apparatus of panoramic video, it is applied in camera terminal, should
Camera terminal comprises multiple image acquisition units, and described device includes:
One input block, for receiving the multichannel wide-angle video data that multiplex image acquisition unit photographs obtains;
One lock unit, carries out synchronization process for the multichannel wide-angle video data receiving described input block;
One storage control unit, each road wide-angle video data write storage after described lock unit is synchronized
Device;
One panoramic mosaic unit, is used for launching wide-angle video data and realizes distortion correction, and to the multichannel Radix Rumicis after launching
Video data carries out the anastomosing and splicing of overlapping region and processes.
Further, store control unit, specifically for will synchronize after each road wide-angle video data write frame by frame with often
In one road wide-angle video data memorizer one to one, the memorizer of described correspondence is previously stored with for corresponding Radix Rumicis
Video data carries out the image coordinate information of distortion correction;
Described panoramic mosaic unit, specifically for writing correspondence by wide-angle video data frame by frame in described storage control unit
Memorizer while, from corresponding memorizer, read the coordinate in image coordinate information, and from written into this memorizer
Wide-angle video data read out pixel corresponding to coordinate thus launches wide-angle video data, it is achieved wide-angle video data abnormal
Become correction.
Further, described storage control unit, specifically for for each road wide-angle video data after synchronizing, currently
In the row field effective time of write frame, perform the operation of memorizer corresponding for frame data write;
Described panoramic mosaic unit, specifically in the row field blanking interval of presently written frame, reads coordinate, and according to
Coordinate reads written into the pixel in the previous frame of the described presently written frame of described memorizer;
After the reading of the write and described previous frame that complete presently written frame, next frame is write as presently written frame
Corresponding memorizer substitutes the frame data being read, and has circulated the expansion of wide-angle video data successively.
Further, described storage control unit, specifically for the first frame to each road wide-angle video data after synchronizing,
In the row field effective time of the first frame, perform the operation of memorizer corresponding for the write of this first frame;
Described panoramic mosaic unit, specifically for, in the row field blanking interval of the first frame, not performing read operation.
Further, described lock unit carries out synchronization process to described multichannel wide-angle video data, including:
Described multichannel wide-angle video data are respectively written into caching, after postponing an appointment time threshold, at synchronization
By multichannel wide-angle video data read-out, it is achieved the synchronization of described multichannel wide-angle video data.
It addition, in an alternative embodiment of the application, the real-time splicing apparatus of this panoramic video, also include a video compress
Unit, for by the video data that full-view video image compression coding is standard after described panoramic mosaic unit spliced.
In another alternative embodiment of the application, the real-time splicing apparatus of this panoramic video, also include an output unit, use
Video data transmission after being compressed by described video compressing unit stores to rear end equipment or shows.
Although the embodiment that disclosed herein is as above, but described content only readily appreciates that the present invention uses
Embodiment, is not limited to the present invention.Technical staff in any art of the present invention, is being taken off without departing from the present invention
On the premise of the spirit and scope of dew, any amendment and change can be carried out in the form implemented and details, but the present invention
Scope of patent protection, still must be defined in the range of standard with appending claims.