Solved

video frames divided in vizalization cells

Posted on 2007-03-26
9
301 Views
Last Modified: 2013-11-22
This is a 1000 for me so if dudes, so I post a new question to give a extra 500 pts.

I need to divide video frames  from a avi or mpg that has a high resolution 1240* 2048 into a lover res 640*480, so it becomes possible to see parts of the movie that correponds to the divided frame in real time. Let me see if I can explain myself. The buffer conatins the frames each frame is dividing this into a vizulization grid showing only the ordered cell.

So the question is how do i do this using directx or some other component or using direct input I realy do not know.
0
Comment
Question by:RuiGraca
  • 5
  • 2
  • 2
9 Comments
 
LVL 19

Expert Comment

by:Barthax
ID: 18806170
You've got some issues initially before you get going on the frame cropping. First of all, the AVI is just a wrapper around the sound & video codecs: it only describes which codecs are used within & the rest, the program has to be aware of.

You don't mention how far you have got with the process yet, so in terms of AVI processing you can do a lot worse than checking out VirtualDub's source.  In terms of DirectX programming, there's huge quantities of information on this around the Internet - I haven't touched it myself, so can't recommend any.

VirtualDub: http://www.virtualdub.org/
0
 

Author Comment

by:RuiGraca
ID: 18814963
I am starting so I am trying a design based in double buffering, but I do not know if it is the best approach.

0
 
LVL 19

Expert Comment

by:Barthax
ID: 18843880
Double buffering is going to be a good design but it depends on what display mechanism you are using.  For non-DirectX painting (again, I don't know about DirectX), you would be best keeping a pointer to the active "frame" (bitmap, or other object you care to use) and another pointer to the inactive "frame".  When your program receives the windows paint message, your routine need only access the active frame.  Your normal processing will continue with the non-active frame and once that frame is complete, just swap the pointers over & continue processing.

Note: I am well aware DirectX is going to be quicker, I just don't have experience of it... :)
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:RuiGraca
ID: 18844367
the problem is that I need part of the displayed frame and I need that that part fills the monitor while the other part of the frame will be invisible to the user.
0
 
LVL 3

Expert Comment

by:Andre_Tertling
ID: 18844431
So you're saying you basically have a large picture from which you want to take a certain rectangular region and zoom that up to become fullscreen again? (The video and realtime issues can be dealt with later, first let's get clear about this question)
0
 

Author Comment

by:RuiGraca
ID: 18844714
Yes that it exacly I wounder for example if I put the monitor resolution in 640X480 and I got a movie that has 2048X1024 the movie will be larger than my monitor field view. So I will try to change the retangular region 640x480 dynamicly.
0
 

Author Comment

by:RuiGraca
ID: 18844717
But how ???? Can you help me??
0
 
LVL 3

Accepted Solution

by:
Andre_Tertling earned 500 total points
ID: 18846393
If you are familiar with the concept behind Avisynth, you can do all this with a simple Avisynth script. First you will need the video source (documentation about Avisynth and supplementary packages is available from a number of sources, among them www.doom9.org and http://avisynth.org/AviSynth) then apply a filter to crop a certain part of the video, then perform a zoom and finally the output stage. All this is done with independent DirectShow filters. Writing DirectShow filters is a very complex matter, but fortunately, there are lots of readymade filters for free use (check the license though, if you are doing a commercial project). If you want and need to do it in Delphi, you will have to create the DirectShow graph by means of API calls through Delphi. Windows and DirectShow will do the rest.
DSPack is such a library package for Delphi, unfortunately the web site seems to be down for me at present but you can find it on google.
0
 

Author Comment

by:RuiGraca
ID: 18849023
I am not familiar with the Avisynth, but I will see the DSpack and the Avisynth, I hope I get it fast.

Thanks It is a light in the end of a tunnel.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question