CN101702132B - 2D and 3D software switching method based on DirectShow technology - Google Patents
2D and 3D software switching method based on DirectShow technology Download PDFInfo
- Publication number
- CN101702132B CN101702132B CN200910182817A CN200910182817A CN101702132B CN 101702132 B CN101702132 B CN 101702132B CN 200910182817 A CN200910182817 A CN 200910182817A CN 200910182817 A CN200910182817 A CN 200910182817A CN 101702132 B CN101702132 B CN 101702132B
- Authority
- CN
- China
- Prior art keywords
- filter
- display mode
- graph
- image
- picture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Abstract
The invention relates to a 2D and 3D software switching method based on DirectShow technology, comprising the following steps of: constructing 2D Filter and 3D Filter, establishing a link capable of playing back common video files by DirectShow technology in order to construct a complete broadcast link that is adaptive to the current display mode, processing content of each frame got through decoding a resource file before submitting an image to display according the display mode of a display device, submitting the generated data to the display device to display, and switching 2D and 3D in software corresponding to the switching in hardware. The method has the advantages that plane images or stereo images can be adjusted in real time in software according to the display mode, 2D and 3D can be switched quickly and in real time without being re-broadcast, and effects of 2D and 3D can be conveniently compared.
Description
Technical field
The present invention relates to the method that a kind of 2D and 3D software switch, when especially a kind of DirectShow plays three-dimensional video-frequency, carry out the method that 2D and 3D software switch.
Background technology
DirectShow is that a cover is fully based on COM (Component Object Model; Be The Component Object Model) application system; Its composition module is the com component of a kind of Filter of being referred to as (filtrator), and each Filter accomplishes some function on the data stream.Its design original intention is exactly to let the Application developer from work such as data transmission, hardware differences, the audio/video flow of complicacy be synchronous, free as far as possible; Overall application framework and bottom work are accomplished by each function Filter of DirectShow; What the programmer need do is exactly the function that designs whole application program; Definite Filter that will use, the administrative model that passes through Filter Graph (filtrator chart) then is with the correct processing procedure that connects and control entire stream of each functional module.
Stereoscopic display device and 2D and 3D switch:
The multi-view auto stereoscopic display device is the free stereo display equipment of new generation that is based upon on the mechanism of human-eye stereoscopic vision; Adopt microlens grating screen or lens screen technology; Through the accurate contraposition of mole line interferometry; Utilize the convex lens array of one group of oblique arrangement, the refraction that takes place in the horizontal direction to realize stereoeffect for eyes provide different fluoroscopy images.It utilizes human eye parallax characteristic, need be by any equipment of looking (like 3D eyes, the helmet etc.) that helps, at the naked image that can obtain to have complete depth information under the condition of looking of human eye.
The stereoscopic display device of all size provides a kind of 2D and the changeable function of 3D at present, and the switching between them only needs on hardware, to press the button and can easily realize.When the 2D display mode can't satisfy when browsing demand, you can switch to the 3D pattern can easily play stereo-picture, also can switch back the 2D pattern at any time and browse plane picture.
But this switching just unilaterally changes the polarization grid screen of display screen from hardware, the picture material of broadcast does not have real time altering.Stereoscopic display device is only play under the 2D pattern just has desirable appreciation effect when playing stereo-picture under plane picture, the 3D pattern.When under the 3D pattern, playing stereo-picture, if list switches to the 2D pattern in real time from hardware, just under the 2D pattern, play stereo-picture, then can not have effect clearly; When under the 2D pattern, playing plane picture, list switches to the 3D pattern in real time from hardware, just under the 3D pattern, play plane picture, also can not have stereoeffect equally.
So this method of switching 2D and 3D that on hardware, presses the button is to the demonstration of same picture material under two kinds of different modes, can under two kinds of patterns, all not have display effect clearly.
Summary of the invention
The objective of the invention is to overcome the inherent shortcoming of unilaterally carrying out 2D and 3D switching existence from hardware; A kind of 2D and 3D software chang-over method based on the DirectShow technology is provided; From the software according to the display mode of display device; Take corresponding image processing method, generate plane or stereoscopic image content and submit demonstration again to, so that obtain better appreciation effect.
According to technical scheme provided by the invention, said 2D and 3D software chang-over method based on the DirectShow technology may further comprise the steps:
(1) makes up 2D Filter and 3D Filter; Filter wherein is a filtrator;
(2) make up to be fit to the complete broadcast link of current display mode: utilize earlier the DirectShow technology set up one can playback common video file link; Again according to the display mode of display device; The every content frame that before image is submitted demonstration to, source file is decoded is handled, and even display mode is 2D, then in Filter Graph, increases 2D Filter; Image is carried out 2D handle, generate the data of a width of cloth plane picture; If display mode is 3D, then increase 3D Filter among the Filter Graph, image is carried out 3D handle, generate the data of a width of cloth stereo-picture; At last the data that generate being submitted to display device shows;
(3) switching on the corresponding hardware; Switch carrying out 2D and 3D on the software: when on the hardware when the 2D display mode switches to the 3D display mode; Picture material processing to original during broadcast is generated as stereo-picture; Promptly in Filter Graph, delete 2D Filter earlier, increase 3D Filter, come that the image that decoding is come out is carried out 3D and handle in 2D Filter position; When on the hardware when the 3D display mode switches to the 2D display mode; Picture material processing to original during broadcast is generated as plane picture; Promptly in Filter Graph, delete 3D Filter earlier, increase 2D Filter, come that the image that decoding is come out is carried out 2D and handle in 3D Filter position.
Utilize the DirectShow technology set up one can playback common video file link the time; It is that application program generates the Graph that is used for file playback automatically that Filter Graph manager provides a kind of technology that is referred to as intelligent link, and the intelligent link technology can be sought in the registered Component Gallery of system and be fit to play the Filter of this document and realize playback function from each Filter that is dynamically connected; The Filter Graph of the broadcast ordinary file of this structure just decodes to the source file content, submits to show again, view data is not processed; If the source file content without compression, does not then need decoding.
Advantage of the present invention is:
1, based on display mode, on software, adjust plane or stereo-picture in real time;
2, it is quick, real-time that 2D and 3D switch, and do not need to play again;
3, can carry out the contrast of 2D and 3D effect easily.
Description of drawings
Fig. 1 utilizes complete filter graph dial framework structure with playback function of DirectShow technique construction.
Fig. 2 is the filter graph dial framework structure under the 2D pattern.
Fig. 3 is the filter graph dial framework structure under the 3D pattern.
Fig. 4 is the filter graph dial framework structure of 2D and 3D mode switch.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described further.
Utilize the DirectShow technology; Make up a Filter Graph that can play ordinary file; Display mode according to stereoscopic display device; Change the processing procedure of view data, in Filter Graph, the original video image that decodes is carried out submitting to display device again and showing after 2D or 3D handle.Concrete realization has following steps:
Step 1. makes up 2D Filter and 3D Filter
The switching of 2D and 3D comes down on display device, to show the pictures different content, need handle with diverse ways original view data in Filter Graph inside, submits to display device again and shows.This just needs to make up required 2D Filter and the required 3D Filter of 3D display mode of 2D display mode.2D Filter function: every frame original image carries out data processing, generates the data of a width of cloth plane picture; 3D Filter function: every frame original image carries out data processing, generates the data of a width of cloth stereo-picture.
Step 2. makes up the complete broadcast link that is fit to current display mode
1, for can display image data, at first need utilize the DirectShow technology set up one can playback common video file link.It is that application program generates the Graph that is used for file playback automatically that Filter Graph manager provides the technology of a kind of being referred to as " intelligent link ", and the basic framework of Filter Graph is to generate automatically through the intelligent link method of calling Filter Graph manager under the general mode shown in Figure 1.The intelligent link technology can be sought in the registered Component Gallery of system and be fit to play the Filter of this document and realize playback function from each Filter that is dynamically connected.The Filter Graph of the broadcast ordinary file of this structure just decodes (if the source file content without compression, does not then need decoding) to the source file content, submits to show again, view data is not processed.
2, because the screen of stereoscopic display device is constructed and the video file content and the common planar display equipment of broadcast all there are differences; Filter Graph playing video file with above-mentioned can not get appreciation effect clearly; Also need be according to the display mode of display device, the every content frame that before image is submitted demonstration to, source file is decoded carries out particular processing.If display mode is 2D, then in Filter Graph, increase 2D Filter, image is carried out 2D handle, generate the data of a width of cloth plane picture; If display mode is 3D, then increase 3D Filter among the Filter Graph, image is carried out 3D handle, generate the data of a width of cloth stereo-picture.Again these data being submitted to display device at last shows.
The basic framework of Filter Graph comprises under the general mode shown in Figure 1: supply filter mainly is responsible for obtaining data, and trans form filter mainly is responsible for the work such as format conversion processing of data, submits to filtrator mainly to be responsible for the final whereabouts of data.
Filter Graph framework is that the 2D that submits to demonstration to carry out image before in data on the basis of Filter Graph framework under general mode handles under the 2D pattern shown in Figure 2.
Filter Graph framework is that the 3D that submits to demonstration to carry out image before in data on the basis of Filter Graph framework under general mode handles under the 3D pattern shown in Figure 3.
Switching on the corresponding hardware of step 3. is carried out 2D and 3D and is switched on software
In playing process, when on hardware, changing the display mode of display device,, just need on software, change the treatment of picture process in order to obtain clearly appreciation effect.Switching on the software can divide two kinds of situation according to display mode:
1, becomes the 3D pattern from the 2D mode switch.Just when on the hardware when 2D display mode switches to the 3D display mode, during broadcast the picture material of original handled and is generated as stereo-picture.In Filter Graph, delete 2D Filter earlier, increase 3D Filter simultaneously in 2D Filter position, come the image that decoding is come out is carried out the 3D processing.
2, become the 2D pattern from the 3D mode switch.Just when on the hardware when 3D display mode switches to the 2D display mode, during broadcast the picture material of original handled and is generated as plane picture.In Filter Graph, delete 3D Filter earlier, increase 2D Filter simultaneously in 3D Filter position, come the image that decoding is come out is carried out the 2D processing.
Filter Graph framework under 2D shown in Figure 4 and the 3D mode switch is to submit the 2D and the 3D hand-off process of carrying out image before showing in data on the basis of Filter Graph framework under general mode.
This case study on implementation operates on the ordinary PC, and concrete configuration is following:
CPU:Intel?Core2?2.66GHz
Internal memory: 2G DDR333
Operating system: Windows XP Professional Edition
Running environment: Microsoft Visual Studio 2008
In the case study on implementation, play one section image,, call the image process of corresponding display mode, accomplish and play link earlier according to the display mode of current display device.When on hardware during to the adjustment of the display mode of display device, adjustment treatment of picture process on software generates the view data of corresponding display mode, submits to display device again and shows.Its treatment step is following:
Step 1. makes up 2D Filter and 3D Filter
Make up required 2D Filter and the required 3D Filter of 3D display mode of 2D display mode.
Step 2. makes up the complete broadcast link that is fit to current display mode
Utilize the DirectShow technology, the running environment of configuration DirectShow, initialization COM storehouse, the basic frame structure of completion DirectShow, utilization intelligent link method makes up a Filter Graph, supports playback common video file.According to the display mode of current display device, add the Filter that step 1 makes up accordingly then.
Switching on the corresponding hardware of step 3. is carried out 2D and 3D and is switched on software
The switching of 2D and 3D is exactly the conversion according to display mode on the current hardware, the replacing of in Filter Graph, 2D Filter and 3D Filter being called, thus generate the image that is fit to display mode.
Use above-mentioned case study on implementation; When on hardware, changing the display mode of stereoscopic display device; Adjustment treatment of picture process on software generates the view data of corresponding display mode, thereby on display device, obtains clearly appreciation effect quickly and easily.
Claims (1)
1. 2D and 3D software chang-over method based on a DirectShow technology is characterized in that: said method comprising the steps of:
(1) makes up 2D Filter and 3D Filter; Filter wherein is a filtrator;
(2) make up to be fit to the complete broadcast link of current display mode: utilize earlier the DirectShow technology set up one can playback common video file link; Again according to the display mode of display device; The every content frame that before image is submitted demonstration to, source file is decoded is handled, and even display mode is 2D, then in Filter Graph, increases 2D Filter; Image is carried out 2D handle, generate the data of a width of cloth plane picture; If display mode is 3D, then increase 3D Filter among the Filter Graph, image is carried out 3D handle, generate the data of a width of cloth stereo-picture; At last the data that generate being submitted to display device shows;
(3) switching on the corresponding hardware; Switch carrying out 2D and 3D on the software: when on the hardware when the 2D display mode switches to the 3D display mode; Picture material processing to original during broadcast is generated as stereo-picture; Promptly in Filter Graph, delete 2D Filter earlier; Increase 3D Filter in 2D Filter position, come that the image that decoding is come out is carried out 3D and handle; When on the hardware when the 3D display mode switches to the 2D display mode; Picture material processing to original during broadcast is generated as plane picture; Promptly in Filter Graph, delete 3D Filter earlier, increase 2D Filter, come that the image that decoding is come out is carried out 2D and handle in 3D Filter position;
Utilize the DirectShow technology set up one can playback common video file link the time; It is that application program generates the Graph that is used for file playback automatically that Filter Graph manager provides a kind of technology that is referred to as intelligent link, and the intelligent link technology can be sought in the registered Component Gallery of system and be fit to play the Filter of this document and realize playback function from each Filter that is dynamically connected; The Filter Graph of the broadcast ordinary file of this structure just decodes to the source file content, submits to show again, view data is not processed; If the source file content without compression, does not then need decoding.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910182817A CN101702132B (en) | 2009-09-07 | 2009-09-07 | 2D and 3D software switching method based on DirectShow technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910182817A CN101702132B (en) | 2009-09-07 | 2009-09-07 | 2D and 3D software switching method based on DirectShow technology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101702132A CN101702132A (en) | 2010-05-05 |
CN101702132B true CN101702132B (en) | 2012-10-03 |
Family
ID=42157049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910182817A Expired - Fee Related CN101702132B (en) | 2009-09-07 | 2009-09-07 | 2D and 3D software switching method based on DirectShow technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101702132B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9582166B2 (en) * | 2010-05-16 | 2017-02-28 | Nokia Technologies Oy | Method and apparatus for rendering user interface for location-based service having main view portion and preview portion |
CN102375730B (en) * | 2010-08-19 | 2016-04-27 | 北京韩美智恒科技有限公司 | A kind of photographic data processing device and method |
CN102033730B (en) * | 2010-11-04 | 2012-05-30 | 武汉钢铁(集团)公司 | Method for converting DirectShow video data into high-performance Java image buffering |
CN103176644A (en) * | 2011-12-26 | 2013-06-26 | 英业达股份有限公司 | Electronic device and switching method of operation modes |
CN102710983B (en) * | 2012-04-16 | 2015-01-07 | 杭州米加科技有限公司 | Method for extracting audio and video data from multimedia |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1968395A (en) * | 2005-11-17 | 2007-05-23 | 腾讯科技(深圳)有限公司 | Viewing window switching control method and system for video image |
CN101441555A (en) * | 2008-04-03 | 2009-05-27 | 南京科融数据系统有限公司 | Video multiple-screen combined playing technology based on windows multiple-screen system |
-
2009
- 2009-09-07 CN CN200910182817A patent/CN101702132B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1968395A (en) * | 2005-11-17 | 2007-05-23 | 腾讯科技(深圳)有限公司 | Viewing window switching control method and system for video image |
CN101441555A (en) * | 2008-04-03 | 2009-05-27 | 南京科融数据系统有限公司 | Video multiple-screen combined playing technology based on windows multiple-screen system |
Also Published As
Publication number | Publication date |
---|---|
CN101702132A (en) | 2010-05-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102611448B1 (en) | Methods and apparatus for delivering content and/or playing back content | |
CN103155572B (en) | For regulating the 3D video control system of 3D Video Rendering based on user preference | |
US20220264068A1 (en) | Telepresence system and method | |
CN101702132B (en) | 2D and 3D software switching method based on DirectShow technology | |
CN109565567A (en) | Three-dimensional telepresence system | |
CN105993172A (en) | Manipulation of media content to overcome user impairments | |
Gotchev et al. | Three-dimensional media for mobile devices | |
JP2012085301A (en) | Three-dimensional video signal processing method and portable three-dimensional display device embodying the method | |
JP5851625B2 (en) | Stereoscopic video processing apparatus, stereoscopic video processing method, and stereoscopic video processing program | |
CN105052154A (en) | Generating videos with multiple viewpoints | |
CN102511013A (en) | Imaging device, method for controlling same, and program | |
JP2006094458A5 (en) | ||
CN102780892B (en) | 3d image processing method and portable 3d display apparatus implementing the same | |
JP2006229768A (en) | Video signal processing device, method therefor, and virtual reality creator | |
JP2013009274A (en) | Image processing device, image processing method, and program | |
CN102186092A (en) | Method, system and display for displaying two-dimensional (2D) menu in three-dimensional (3D) display mode | |
CN104977796A (en) | Realization method of stereoscopic spherical-screen projection system | |
CN106875452A (en) | Image processing method and terminal | |
CN114286142A (en) | Virtual reality equipment and VR scene screen capturing method | |
CN110012336A (en) | Picture configuration method, terminal and the device at interface is broadcast live | |
CN102540690A (en) | Apparatus and method for generating three dimensional image in portable terminal | |
CN104918037B (en) | 3D rendering display device and method and mobile terminal | |
CN110198457B (en) | Video playing method and device, system, storage medium, terminal and server thereof | |
CN204065656U (en) | A kind of three-dimensional ball curtain projection system | |
US10593122B1 (en) | Mirroring edge pixels |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20121003 Termination date: 20130907 |