Forums

Welcome Guest Search | Active Topics | Members

AVI Processor Draw Options
Phenem
Posted: Monday, July 05, 2004 1:26:00 PM
Rank: Member
Groups: Member

Joined: 7/5/2004
Posts: 2
Points: 0
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.
Andrew
Posted: Wednesday, July 07, 2004 8:12:00 PM

Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 708
Points: 105
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.

Sincerely yours,
Andrew Simontsev from Aurigma Team
Phenem
Posted: Thursday, July 08, 2004 7:06:00 PM
Rank: Member
Groups: Member

Joined: 7/5/2004
Posts: 2
Points: 0
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.
Andrew
Posted: Thursday, July 08, 2004 9:56:00 PM

Rank: Advanced Member
Groups: Administration , Member

Joined: 8/2/2003
Posts: 708
Points: 105
> 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.

Sincerely yours,
Andrew Simontsev from Aurigma Team
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.