Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Phenem  
#1 Posted : Monday, July 05, 2004 5:26:00 AM(UTC)
Phenem

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.
Andrew  
#2 Posted : Wednesday, July 07, 2004 12:12:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 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.
Phenem  
#3 Posted : Thursday, July 08, 2004 11:06:00 AM(UTC)
Phenem

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.
Andrew  
#4 Posted : Thursday, July 08, 2004 1:56:00 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 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

Users browsing this topic
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.