Rank: Member
Groups: Member
Joined: 7/5/2004(UTC) Posts: 2
|
I'm trying to create an app that would split an AVI (1280x480) into two avi's (640x480) Left and right eye. I was thinking to use the draw funciton but I could not find any examples that might help me to figure out how to do this. Could you provide som insight to me? Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hello, Unfortunately AVI Processor does not provide any imaging function. Method AviFrame.Draw allows only resizing the image (by specifying width and height which differ from frame dimensions), but it does not allow specifying what image portion to draw. It seems you need to use AVI Processor in conjunction with some imaging component which provide Crop function, e.g. Graphics Mill. If you like I will post a code sample.
|
|
|
|
Rank: Member
Groups: Member
Joined: 7/5/2004(UTC) Posts: 2
|
Is the AVI processor OpenDML 1.02 compliant? If I were to use both of these products to do this job how fast would it be? Could I split the avi into the two halves at a good frame rate? Can the graphics mill convert bayer to rgb? Yes please show me an example. Thanks.
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
> Is the AVI processor OpenDML 1.02 compliant? AVI Processor is based on VfW (Video for Windows), so it does not support such extentions as OpenDML. So it cannot handle process files larger than 2GB... > If I were to use both of these products to do this job how fast would it be?Could I split the avi into the two halves at a good frame rate? It greatly depends on computer resources and dimensions of the frame. But I think overhead of retrieving the image between AVI Processor and Graphics Mill is not too big comparing to AVI decompression, cropping, and displaying. You can try it yourself. > Can the graphics mill convert bayer to rgb? AVI Processor always returns a frame to Graphics Mill in RGB color space. > Yes please show me an example. Here is a simple example, which iterates through all the frames of the AVI, divides them in half, and displays all them (entire frame, left half, and right half): Code:Private Sub CommandStart_Click()
Dim objBitmapLeft As New Bitmap
Dim objBitmapRight As New Bitmap
objBitmapRight.Formats.SelectCurrent "JPEG"
Dim objAviReader As New AviReader
objAviReader.Open "d:\[test files]\avis\001.avi"
Dim objAviFrame As AviFrame
For Each objAviFrame In objAviReader.Frames
objBitmapRight.Data.Picture = objAviFrame.Picture
Set PictureBoxTotal.Picture = objBitmapRight.Data.Picture
objBitmapRight.ApplyInPlace = False
Set objBitmapLeft = objBitmapRight.Transforms.Crop(0, 0, objBitmapRight.Data.Width / 2, objBitmapRight.Data.Height)
objBitmapRight.ApplyInPlace = True
objBitmapRight.Transforms.Crop objBitmapRight.Data.Width / 2, 0, objBitmapRight.Data.Width / 2, objBitmapRight.Data.Height
Set PictureBoxLeft.Picture = objBitmapLeft.Data.Picture
Set PictureBoxRight.Picture = objBitmapRight.Data.Picture
Next
End Sub
Please let me know if you have any questions. Edited by user Monday, December 24, 2007 5:16:22 PM(UTC)
| Reason: Not specified
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.