Optical Flow from AVI file

Hi,
I am trying to calculate and display the optical flow field from a .AVI file. I am working from the example Optical Flow.vi, however I cannot get it to work and am getting a 'IMAQ Vision: Incompatible image size error' on the optical flow function box. As far as I can see the 2 image inputs to the optical flow function are both in 8-bit greyscale format as they should be.
I am using my own greyscale conversion sub vi but this is again taken from one of the examples. I've included both the vi's as well as the .avi file im using. Hopefully someone can point out where I've gone wrong.
Thanks,
Oscar.
Attachments:
optical_flow_1.png ‏214 KB
convert_greyscale.png ‏20 KB

Hi Oscar,
I've had a quick look at your code and although I can't identify the exact reason why it's not working I have spotted a few things.
If I scroll the image I see the vectors appear briefly, so I think the image might be getting ovewritten somehow after the motion flow overlay is drawn
Also, I'm not sure a dedicated Grayscale conversion sub VI is needed, and yours creates a new image reference every time it runs which isn't ideal as it will continue to allocate more memory.
I think maybe a more linear flow of code may help combat your issues, I've written a quick VI that implements motion flow from an AVI, it seems to work fine with the AVI files I tested, so hopefully this might help:
Regards,
Adam Brown
Applications Engineer
National Instruments UK

Similar Messages

  • Burning DVD's from .avi files

    What exactly do I have to do to use iDVD 6 to make a DVD from .avi files?

    What exactly do I have to do to use iDVD 6 to make a
    DVD from .avi files?
    The .AVI format is just a wrapper for many different ways of storing audio/video - some 'flavors' work in iMovie/iDVD and some don't.
    I have a video camera that produces a 'flavor' of .AVI file that requires VisualHub at http://www.techspansion.com/visualhub/ so that I can convert the files into DV video files that CAN be used in iMovie/iDVD.

  • Capturing audio from avi file

    I want to capture just the audio from avi file. Here is what I did. I dragged the avi into garage band and saw a separate audio and video track. I tried to import the just the audio into itunes but it would only let me import both video and audio. I decided to burn the audio to cd and then import it into itunes. This seemed to work but I would like to know if there is a better method. I figure there must be. Anybody out there tried this?

    i'm not near my GB machine to test this, but see if you can Share to Disk and make sure the Compress checkBox is not selected.

  • Workflow question - fastest workflow from AVI files to DVD?

    I have recently purchased my first Mac (it is fantastic!). I am currently experimenting with both '08 and '06 iMovie.
    Right now my main priority is creating individual DVD's of each of my tapes that I have previously captured via WinDV on an XP system. Those tapes are stored, each clip separately, via AVI files on external hard disks.
    Now I would like to, as quickly as possible, use either version of iMovie to burn a DVD that simply includes all the clips from a given tape capture. The plan is that these will be simply playable versions (a playable backup, if you will) of all the clips on each tape - I'll come back later and do edits to create "finished" DVD's.
    Any suggestions as to the most efficient and quickest way to create the DVD's? (I've downloaded Streamclip also, but am not sure whether that will help me out at this point or not)
    Thanks in advance.

    Any suggestions as to the most efficient and quickest way to create the DVD's?
    The most efficient work flow in terms of application use would likely be iMovie HD here. Assuming your AVI files are "playback" and "conversion" compatible with QT, then they will be automatically converted during file level import for use in whatever project compression format you create for editing. In addition, this work flow offers more in the way of "effects" if desired and allows you to chapter files for iDVD use internally rather than having to go through GarageBand. On the other hand, if you are working with very short source files requiring little or no editing and a minimum of titles, transitions and/or chaptering, then iMovie '08 may be faster in terms of actual editing speed. Both applications have their own strengths and weaknesses and you should probably try a test project with both so that in the future you can select the proper one according to the needs of any given project.

  • Removing Advanced Pulldown from AVI files

    I've recently switched from Vegas 4.0 to Final Cut Pro 5.1 and I'm trying to remove the advanced pulldown from my AVI files. I tried using Cinema Tools and it could not use the AVI. Then I tried using FCP tools/remove advanced pulldown option and the file went offline. Can sombody tell me how to do this?
    Thanks

    It wasn't out of sync before. I shot it on the Panasonic DVX100 in 24pa. Removed the pulldown and edited the film in Vegas. Now I want to transfer it to FCP change it to 16X9 and make a 16X9 24P DVD in DVD Studio Pro. When I did copy it back to tape from Vegas I used LP instead of SP so I could fit the entire movie on a mini dv tape. Maybe that has something to do with it not being able to remove the pulldown during capture? I think I'm going to try and split it up into 2 tapes and record sp mode.
    Mac Pro 2.66   Mac OS X (10.4.7)   FCS

  • Encore adds random static (Popping and Crackling) to audio from AVI files

    We spend the whole day today trying to debug this problem... any help would be greatly appreciated.
    We have a large conversion project where we are capturing VHS videos and converting them to DVD.
    For those that require chapters, we are using Encore CS4.
    All of the videos were captured the same way, in an AVI format.
    We have found that when we load them into an Encore CS4 timeline, we will hear random static sounds -- pops in the audio.
    We believe the AVI file is clean.  We can watch the video in Windows Media Player, and the audio is fine.  We can burn the AVI file to a DVD video using another low-end package (Power Director) and the DVD is fine.  The AVI files have been run on other systems, and the audio crackling sound does not present itself.
    But when we try to use Encore, some of the files exhibit the crackling sound.  (Note that not all of the files have this problem.  But those that do exhibit the problems will exhibit them every time.)
    We tried loading them into Premier -- same thing.
    So, this problem seems to be limited to Adobe tools.
    We are running Windows 7 on an Intel i7, ATI Radeon card... a really fast, strong, stable system.
    At this point we're not sure what to try...
    We have attempted to pre-encode them using Adobe Media Encoder.  Same results, regardless of which audio settings we try.
    Any suggestions?
    Thanks!
    ==> Mike

    Well, this gives me something to explore.  Thank you.
    It looks like it meets the requirements you identified, but I cannot tell the "type 2"
    here is a report from MediaInfo:
    General
    Complete name                    : H:\***4.avi
    Format                           : AVI
    Format/Info                      : Audio Video Interleave
    Format_Commercial_IfAny          : DV
    Format profile                   : OpenDML
    File size                        : 1.79 GiB
    Duration                         : 8mn 52s
    Overall bit rate                 : 28.9 Mbps
    Video
    ID                               : 0
    Format                           : DV
    Duration                         : 8mn 52s
    Bit rate mode                    : Constant
    Bit rate                         : 24.4 Mbps
    Width                            : 720 pixels
    Height                           : 480 pixels
    Display aspect ratio             : 4:3
    Frame rate mode                  : Constant
    Frame rate                       : 29.970 fps
    Standard                         : NTSC
    Chroma subsampling               : 4:1:1
    Bit depth                        : 8 bits
    Scan type                        : Interlaced
    Bits/(Pixel*Frame)               : 2.357
    Stream size                      : 1.78 GiB (100%)
    Audio
    ID                               : 0-0
    Format                           : PCM
    Muxing mode                      : DV
    Muxing mode, more info           : Muxed in Video #1
    Duration                         : 8mn 52s
    Bit rate mode                    : Constant
    Bit rate                         : 1 536 Kbps
    Channel(s)                       : 2 channels
    Sampling rate                    : 48.0 KHz
    Bit depth                        : 16 bits
    Stream size                      : 0.00 Byte (0%)
    From gSpot:

  • Get associated avi file from avi file reference

    For normal bytestream files, there is a "refum to path" function (under File I/O -> Advanced File Functions) that will give the associated file path for the input file reference.  This does not seem to work when an AVI file reference (opened using IMAQ's AVI functions) is wired ("refnum to path" returns <Not a Path>).  Is there a way to extract the AVI file path from an AVI file reference?

    Thanks for your help.  The design of my program involves streaming video to disk (along with multiple other parallel functions, including DAQ interfacing and collection, playing back AVIs in mediaplayer, etc.).  Because of this, I have multiple "engine" loops running in parallel to the user interface loop.  In the UI loop, the target of the streaming video can be changed or even turned off, so I have a LV2 functional global holding the AVI file reference, which the video streaming engine checks for validity before proceeding through a loop iteration.  However, in the engine, certain decisions about extra data that needs to be saved with the streaming video is made by checking the directory of the file it is instructed to write to.  Therefore, a way to extract that file name from the reference in the LV2 global would be usefull.  The workaround I have to use now is to store the file path as well as the AVI file reference in the LV2 global and pass them around together.  This isn't that bad, but in the intrest of keeping block diagrams uncluttered with data I shouldn't need, I posted the question. 

  • No audio from avi file-PE4 & Vista 64

    I looked at the post for this topic from Adobe. Did all the steps regarding the audio driver for not hearing audio from ALL clips. I can hear any sound from the headphones jack for ANY audio device. And the AVI file plays back with sound in WMPlayer and in Windows Movie Maker. When I go to Preferences, Audio hardware, default device - the ONLY device listed is the Premier Elements Windows Sound. Beneath it is the ASIO settings. That contains the proper setting for the Realtech sound card. I am not able to select the ASIO device as the new default device. I followed the Adobe post closely but I still get no sound output from PE4. What next?

    I do show the ASIO button in the Audio Hardware window.
    The only reason that mine does not show on the screen-cap is because it fades out in the GUI, when it's open.
    Did we determine that when this file is played, in say WMP, you do get Audio? Unfortunately, with the new forum software, I can't see anything, except the post to which I am replying.    [Edit] Yes we did.
    Did you have any luck with ASIO4ALL?
    Hunt

  • Capturing jpeg files from .avi file or from webcam

    hi everybody,
    i am trying to capture frames as jpeg from my webcam while it is recording. I mean i don't need to capture avi file i need to grab the images from the stream.(i need at least 20 images per second )is it possible to do this with JMF . i also have morena. which is more useful ?
    Thanks for your help

    thanks
    after posting this thread i found this topic too but thanks for your effort .
    but you gave me answer and i sent you duke dollars thanks again

  • IMAQ image to array vi not working with images extracted from avi file

    Hi,
      I downloaded some avi's and uncompressed them so that I can analyze them within labview. I am trying to convert images I am reading from the avi file to an array. When I use "IMAQ image to array" I get the following error " IMAQ Image To Array  Invalid image type" -1074396080.
       I am able to display each read image and save them to the hard drive, but I am unable to convert the vision image to array. I verified that the image extracted from avi is the same as the image type I created in memory to hold the image.
      Please see the attached vi I created.
    thank you
    Ruz
    Attachments:
    example2.vi ‏62 KB

    Hi all, this thread was useful for me...but i have another doubt... when I try to extract a single plane (Luminance, Saturation, R,G,B...anyone) and try to save it in jpg as gray image, it saves an image with blue tones. I have examinated it using Matlab and checked that Red plane has low values (but not zero), the same for G plane and high values for B plane. An image of the VI is attached.
    Thanks in advance
    Attachments:
    planes.png ‏28 KB

  • PE 10 missing audio from *.avi files?

    Hi,
      New PE 10 installation.  When I add a *.avi file to the timeline or sceneline, I am missing the audio tracks. Don't see the audio tracks.  Even when I press the Play button above, there is only video and no audio.  But in the Media section, when I select "Edit Original", the avi file plays with audio fine.  What am I doing wrong?
    Thank you,
    Jerry

    Read Bill Hunt on a file type as WRAPPER http://forums.adobe.com/thread/440037
    What is a CODEC... a Primer http://forums.adobe.com/thread/546811
    What CODEC is INSIDE that file? http://forums.adobe.com/thread/440037
    Report back with the codec details of your file, use the programs below... a screen shot works well to SHOW people what you are doing
    For PC http://www.headbands.com/gspot/ or http://mediainfo.sourceforge.net/en
    For Mac http://mediainfo.massanti.com/
    Once you know exactly what it is you are editing, report back with that information... and your project setting, and if there is a red line above the video in the timeline, which indicates a mismatch between video and project

  • No sound from avi files - soundtrack is ms format?

    Anyone know how to get qucktime to play avi files where the soundtrakc element is 'ms' format. the video part is mp4 and i think the whole file is divx

    I have been having the same problem with DivX files that are encoded with MP4 video and AC3 audio (Digital Dolby Surround 5.1). I always get the picture but no sound. The QT does offer to take me to a web page which offers a variety of codec’s and plug-ins, but it does not specify which one it would desire...:-)
    As far as I can see, the only solution to the problem is to have the problematic files recoded with a suitable program. In my case, Visual Hub does the job just fine. It is a waste of time, but what can you do... It would be lovely if Visual Hub had "video pass through" option do avoid video conversion or recoding...
    If you do not feel like paying for Visual Hub, try FFmpeg, which is nice, but not very user friendly if you do not know what combinations of audio and video encoding you want as your final product, not to mention “encapsulation” (mov, avi wvm, rm…). VLC can also do the recoding, and it does usually do a good job, but as with FFmpeg, it is not easy to setup.
    Good luck and I hope I shed at least some light to your problem.

  • No sound from ".AVI" files

    Every time I play a ".AVI" file (or MPEG) I can see the video perfectly but not any sound.
    What do I need to do?
    Thanks

    Install Perian. Search here in the future and you won't wait for an answer as this is asked about 100 times a day.

  • Lost audio from AVI file

    I have Quicktime PRO and need to edit some avi files. Upon opening up some DIVX files, I have lost the audio. Their is a prompt saying I need some plug ins and dropped me on the quicktime plugin page. I read through all the plug ins but I am not sure what the problem is.
    Does anyone know how I can bring back the audio in these files? Many thanks.
    Calvin

    i'm not near my GB machine to test this, but see if you can Share to Disk and make sure the Compress checkBox is not selected.

  • No finder preview, quicklook or cover flow for AVI files in 10.8.1

    Just installed 10.8.1 over 10.6.8, and I can't preview avi or wmv files in the Finder. CoverFlow just shows a generic QuickTime movie icon and Quicklook just an empty window with a spinning wheel. There are no problems with mp4, m4v and mpg.
    Quicktime X10.2 and Quicktime 7.6.6 opens them fine.
    I have:
    a) Deleted all caches with Onyx
    b) Repaired permissions
    c) Deinstalled Perian 1-2-3, Divx plius 8.2.3 and Flip4Mac 3.0b2
    d) Deleted all codecs from /Library/Quicktime and ~/Library/Quicktime
    e) Rebuilt launchservices
    f) Looked for any remains of any old installation of a 3ivx codec. There's nothing.
    It happens in two different user accounts. Both of them, admin accounts. So, I've moved away /Library/Preferences to start up with a new empty Preferences folder.
    What else can I try?
    Incidentally, I'm also experiencing the blurry or disapearing icons bug.
    Yhis is my /Library/Quicktime folder:
    There's no Quicktime folder in ~/Library
    And this is the /Library/Quicklook folder:
    Thanks to all for your help.
    David

    Flip4Mac (installed) and Perian (installed) provide this support. As a matter of fact, I can play AVI and WMV in Quicktime 10.2 and 7.6.6. It's the Finder or the QuickLook subsystem what has a problem.
    Besides that, having those QuickTime components installed, there are no problems in a new installation from scratch in a nother disk. But I'm trying to avoid that and to restore in Mountain Lion part of the functionality of my Mac under Snow Leopard.
    There should be a preference, cache, temp file or something like that that is impeding QuickTime or the Finder to access the necessary components to preview and quicklook AVI and WMV files.

Maybe you are looking for

  • How can i upload voice memos to my website

    my husband is a musician and i recorded some samples from his show.  want to upload on his website, but i guess i need to convert the file.  what do i do?

  • Ipad screen has a massive grey bar through it??

    I turned on my Ipad this morning, and it seemed to be working just fine, except that there was a thick, pixilated grey bar right through my screen. I tried restarting it several times, but nothing changed. I connected it to power and it didn't go awa

  • [FILES] File listing Issue

    The listing of files seems to be broken for directories with large amount of files/folders. Unless the problem can be fixed by a setting in Dreamweaver, this should be considered a major bug. Following an image link, displaying the issue: https://dl.

  • Handling List Subject ?

    Hi Folks, I want to store different types of subjects in a list, so the type of each is unknown. When retrieving items, I know which type they are (T), so I do a cast. How can I check this cast in order to get rid of the compiler warning? class Gener

  • Performance issue using Universe with SNC connection

    I had a dynamic dashboard using Live office > Webi report > Universe > Bex query which was working fine but we recently implemented SNC between Business Objects and SAP BW due to which the universe connection has been changed to use sign on connectio