A kind of 3D method for processing video frequency and device of in player, carrying out
Technical field
The invention belongs to the 3 D video processing technology field, relate in particular to a kind of 3 D video processing method and device of player of the standard based on interactive polar plot and Web animation.
Background technology
In recent years, along with the progressively rise of 3 D video, the Display Technique of three-dimensional stereo effect becomes one of at present burning hot technology.
The 3D effect of realizing in video utilizes the binocular stereo vision principle exactly, by the image difference that allows eyes see, makes the user obtain the visual effect of three dimensions image from display, thereby produces sensation on the spot in person.At present, the 3D technology of comparative maturity comprises following three kinds:
1. aberration formula 3D technology (that is: Anaglyphic3D) refers to: be printed in the same secondary picture with two kinds of different colors respectively with the image of two video cameras with the different visual angles shooting.Aberration formula 3D tells spectral information by the filter wheel of rotation earlier, use the filter of different colours to carry out the picture optical filtering, make a picture can produce two width of cloth images, every eyes of people are all seen different images, such method makes the picture edge produce colour cast easily, needs to be equipped with modal red blue 3D glasses.
2. polarization type 3D technology (that is: Polarization3D), refer to: utilize light to have the principle of " direction of vibration " to decompose original image, earlier by image being divided into vertically to polarised light and level to polarised light two a series of paintings faces, adopt the polarized lenses of different polarization direction then about the 3D glasses respectively, people's right and left eyes just can receive two a series of paintings faces like this, pass through brain compound stereoscopic image again, what be used is the passive type polaroid glasses.
3. initiatively fast gate-type 3D technology (refers to: ActiveShutter3D), refer to: according to people's eyes the seizure susceptibility of image frequency is realized, by improving the refresh rate (120Hz at least) of picture, for left eye and right eye are exported the image that 60Hz refreshes fast respectively, can realize three-dimensional visual experience at people's brain like this, what be used is initiatively fast gate-type 3D glasses.
At present, the application of 3 D video Display Technique on legacy equipments such as television set is more extensive, for video website, the fewer of 3 D video broadcast can be provided, perhaps both allowed to provide 3 D video, the 3 D video technical functionality of its realization is also more single, generally all only realized aberration formula 3D technology, therefore, with regard to the video that video website provides, be that its 3D video quality that provides is not good on the one hand, on the other hand, existing player can't carry out multi-mode according to the difference of user or equipment to be provided, and it is not very good causing user's viewing experience thus.
Summary of the invention
In view of problems of the prior art, (for example the object of the present invention is to provide a kind of player of the standard based on interactive polar plot and Web animation, the flash player) 3 D video processing method and device, it well combines 3D technology and Internet technology, and the 3D video that can watch by the Internet easy and flexible is provided for the user.
In order to achieve the above object, the invention provides a kind of 3 D video processing method of player of the standard based on interactive polar plot and Web animation, it is characterized in that comprising the steps:
S1, player loads original video, and utilize metamessage to judge the 3D form of original video, wherein the metamessage of 3D video refers to the label that binds together with the 3D video, the array format that is used for this video of identification, the label of the corresponding left and right sides of the film source of gauche form form, the film source correspondence of last following formula is the label of form up and down;
S2 according to different 3D forms, carries out aberration processing or polarisation processing or shutter processing according to the processing method that the user selects to the 3D video;
S3 is to synthesizing through aberration is handled or polarisation is handled or shutter is handled top video and below video;
S4 is to synthesizing through aberration is handled or polarisation is handled or shutter is handled left video and right-hand video;
S5, the synthetic video of the video that upper and lower is synthetic and right and left synthesizes again;
S6 carries out stretch processing to the video size after synthetic, at the 3D film source of some unconventional wide high proportion, by regulating video stretching option, changes video aspect ratio thereby image is carried out stretch processing, and video is shown with correct proportions;
S7, the processing procedure through above-mentioned obtains a 3D picture, by redrawing subsequent pictures continuously, finally forms dynamic 3D video again.
Further, the 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention is characterized in that carrying out among the step S3 detailed process that aberration handles and is:
The aberration mode computation of selecting according to the user goes out corresponding visual spectrum information, and the filter by different colours carries out picture and filters, and finally forms 3D rendering.
Further, the 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention is characterized in that carrying out among the step S3 detailed process that polarisation handles and is:
Video processing is divided into vertically to polarised light and level to polarised light two a series of paintings faces.
Further, the 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention is characterized in that carrying out among the step S3 detailed process that shutter handles and is:
Video image is divided into two frame by frame, forms two a series of paintings faces of corresponding left eye and right eye.
In addition, the present invention also provides a kind of 3 D video processing unit of player of the standard based on interactive polar plot and Web animation, it is characterized in that comprising as lower module: the video format judge module, be used for after player loads original video, utilize metamessage to judge the 3D form of original video, wherein the metamessage of 3D video refers to the label that binds together with the 3D video, the array format that is used for this video of identification, the label of the corresponding left and right sides of the film source of gauche form form, the film source correspondence of last following formula is the label of form up and down; Video processing module is used for according to different 3D forms, according to the processing method that the user selects the 3D video is carried out aberration processing or polarisation processing or shutter processing; The video synthesis module is used for synthesizing through aberration is handled or polarisation is handled or shutter is handled top video and below video up and down; Left and right sides video synthesis module is used for synthesizing through aberration is handled or polarisation is handled or shutter is handled left video and right-hand video; The video synthesis module is used for the synthetic video of the video that upper and lower is synthetic and right and left and synthesizes again; The stretch processing module is used for the video size after synthetic is carried out stretch processing, at the 3D film source of some unconventional wide high proportion, by regulating video stretching option, changes video aspect ratio thereby image is carried out stretch processing, and video is shown with correct proportions; The 3D video forms module, is used to form the 3D picture, and by redrawing subsequent pictures continuously, finally forms dynamic 3D video.
Further, the 3 D video processing unit of the player of the standard based on interactive polar plot and Web animation of the present invention, it is characterized in that video processing module comprises: the aberration processing module, be used for going out corresponding visual spectrum information according to the aberration mode computation that the user selects, filter by different colours carries out the picture optical filtering, finally forms 3D rendering.
Further, the 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention, it is characterized in that video processing module comprises: the polarisation processing module is used for Video processing is divided into vertically to polarised light and level to polarised light two a series of paintings faces.
Further, the 3 D video processing unit of the player of the standard based on interactive polar plot and Web animation of the present invention, it is characterized in that video processing module comprises: the shutter processing module, be used for video image is divided into two frame by frame, form two a series of paintings faces of corresponding left eye and right eye.
The 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention and device allow the user to carry out the setting of 3D preference, under the situation of Switch Video film source not, current film source is carried out computing, and the film source with the 3D form constantly directly is output into the 3D pattern that the user selects.Need not switch film source can present the 3D video of multiple form according to user's requirement, and this method can be saved a large amount of network bandwidths, has strengthened user's experience simultaneously.
Description of drawings
Fig. 1 is the flow chart of 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention;
Fig. 2 is the functional block diagram of 3 D video processing unit of the player of the standard based on interactive polar plot and Web animation of the present invention;
Fig. 3 is the detailed process figure that video is handled according to the method for the invention.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage are become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments:
Fig. 1 is the flow chart of 3 D video processing method of the player of the standard based on interactive polar plot and Web animation of the present invention; As shown in the figure, it comprises the steps:
Step S1, player loads original video, and utilizes metamessage to judge the 3D form of original video;
The metamessage of 3D video refers to the label that binds together with the 3D video, is used for the array format of this video of identification, the label (V) of the corresponding left and right sides of the film source of gauche form form, and the film source correspondence of last following formula is the label (H) of form up and down.
Step S2 carries out aberration processing, polarisation processing, shutter processing respectively according to different 3D forms;
Which kind of processing mode no matter all needs to determine the coordinate that redraws of its video, and the corresponding different videos of different 3D forms redraw coordinate.Last following formula correspondence up and down redraw coordinate, redraw coordinate about the gauche form correspondence.
Specifically, aberration is handled, and namely the aberration pattern of selecting according to the user (redness-cyan, green-aubergine, blueness-yellow) calculates corresponding visual spectrum information, and the filter by different colours carries out picture and filters, and finally forms 3D rendering; Polarisation is handled, and namely earlier Video processing is divided into vertically to polarised light and level to polarised light two a series of paintings faces, cooperates polarisation 3D glasses simultaneously by the 3D display device, synthetic 3D image; Shutter is handled, namely video image is divided into two frame by frame, form two a series of paintings faces of corresponding left eye and right eye, interlock continuously and show, cooperate Infrared Projector with the left and right sides eyeglass switch of the fast gate-type 3D glasses of Synchronization Control simultaneously, make left and right eyes see respective picture in the correct moment, form the 3D image.
Step S3 is to synthesizing through aberration is handled, polarisation is handled, shutter is handled top video and below video;
Set the size of synthetic video earlier, according to the processing method of selecting, respectively video up and down being carried out corresponding picture level handles, two pictures that to handle well more afterwards are superimposed, play up a pictures, be specifically: earlier two pictures are processed into left-eye image and the eye image of alignment processing method, by the colour filter function that player provides two pictures are synthesized one again.
Step S4 is to synthesizing through aberration is handled, polarisation is handled, shutter is handled left video and right-hand video;
Set the size of synthetic video earlier, according to the processing method of selecting, respectively to about video carry out corresponding picture level and handle, two pictures that to handle well more afterwards are superimposed, play up a pictures, be specifically: earlier two pictures are processed into left-eye image and the eye image of alignment processing method, by the colour filter function that player provides two pictures are synthesized one again.
Step S5, the synthetic video of the video that upper and lower is synthetic and right and left synthesizes again;
In some processing method, as " cross-mode ", when namely not having 3D equipment, need add the vision aid mark by the video after synthetic, it is synthetic that the guiding user finishes the 3D video.Method is: by calculating, 2 white markings are placed on suitable position, video top, the user only needs by parallax these two marks to be overlapped, and namely presents the 3D image.
Step S6 carries out stretch processing to the video size after synthetic;
At the 3D film source of some unconventional wide high proportion, by regulating video stretching option, thereby being carried out stretch processing, image changes video aspect ratio, and video is shown with correct proportions.
Step S7, the processing procedure through above-mentioned obtains a 3D picture, by redrawing subsequent pictures continuously, finally forms dynamic 3D video again.
Because human eye has the persistence of vision effect, so can utilize people's this vision physiological characteristic, by redrawing subsequent pictures continuously, just can form dynamic 3D image.
Fig. 2 is the block diagram of 3 D video processing unit of the player of the standard based on interactive polar plot and Web animation of the present invention.As shown in the figure, the 3 D video processing unit 1 of the player of the standard based on interactive polar plot and Web animation of the present invention, comprise as lower module: video format judge module 2, be used for after player loads original video, utilize metamessage to judge the 3D form of original video; Video processing module 3 is used for carrying out aberration processing, polarisation processing, shutter processing respectively according to different 3D forms; The video synthesis module 4 up and down, are used for synthetic through aberration is handled, polarisation is handled, shutter is handled top video and below video; Left and right sides video synthesis module 5 is used for synthetic through aberration is handled, polarisation is handled, shutter is handled left video and right-hand video; Video synthesis module 6 is used for the synthetic video of the video that upper and lower is synthetic and right and left and synthesizes again; Stretch processing module 7 is used for the video size after synthetic is carried out stretch processing; The 3D video forms module 8, is used to form the 3D picture, and redraws subsequent pictures continuously, finally forms dynamic 3D video.Wherein video processing module 3 comprises: aberration processing module 31, be used for going out corresponding visual spectrum information according to the aberration mode computation that the user selects, and the filter by different colours carries out picture and filters, and finally forms 3D rendering; Polarisation processing module 32 is used for Video processing is divided into vertically to polarised light and level to polarised light two a series of paintings faces; Shutter processing module 33 is used for video image is divided into two frame by frame, forms two a series of paintings faces of corresponding left eye and right eye.
Fig. 3 is the detailed process figure that video is handled according to the method for the invention; As shown in Figure 3, at first player loads one section 3D video, and determine video format (gauche form or go up following formula) by the metamessage of video, the processing method of selecting according to the user (aberration or polarisation or shutter) and begin to handle and synthetic 3D image in conjunction with the form of video (gauche form or go up following formula) then, if the video displaying ratio that present in this moment is incorrect, can also reset aspect ratio by the mode that stretches, finally present correct 3D video.
It more than is the detailed description that the preferred embodiments of the present invention are carried out, but those of ordinary skill in the art is to be appreciated that, within the scope of the present invention, and guided by the spirit, various improvement, interpolation and replacement all are possible, for example adjust interface interchange order, change message format and content, the different programming language (as C, C++, Java etc.) of use and realize etc.These are all in the protection range that claim of the present invention limits.