Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Read/Write AVI's using Latest Codecs

Currently we are using Camtasia and the TechSmith Codec (TSCC) to perform real-time capture of the PC screen, and then using the IVision Toolkit to playback the AVI's for further analysis, but this involves a lot of third party products, making support, training and installation that more complicated.  Does anyone know of a solution that will:

 

1) Allow LabVIEW to carry out our own screen capture program so I can perhaps hook into the live data of the screens for real-time analysis and also to have more options in selecting what the recorded image type is (ie. grayscale 8-bit, RGB 24-bit etc.), what the compression ration is and quality factor etc.

 

2) Ideally I would like to use the IMAQ Vision AVI VI's, since they are easy to you and simple to install as an executable, but they are really, really slow and seem to support only the

older legacy type codecs.

 

The software is going to be used by Doctors/Researchers who know little about computers, that is why the installation and use has to be simple.  I don't think products like ffdshow would be suitable since there seems to be a lot of manual setting up - but I could be wrong, maybe I need an OCX control or something - any ideas?

 

The TechSmith Screen Recorder software can save AVI files at 1224x732 pixels, 16-bit, and 20fps with little CPU usage (about 30%) so it's pretty efficient.

0 Kudos
Message 1 of 7
(3,894 Views)

Hi Chris Reed,

I am not completely sure if you are wanting use LabVIEW to actually take the screen capture or if you want to use it to interface with your third party software.  I can say there is nothing built into LabVIEW that will allow you to record a screen like you would like.  If you are trying to interface with the third party software you may be able to do this.  If the program has an active x interface then you could use this.  Once into LabVIEW you will have to use the IMAQ AVI functions.  You should have the ability to pick the image type once in LabVIEW and change if you need to with the IMAQ Cast Image.vi

Message Edited by Adam_H on 09-11-2008 08:37 AM
Adam H
National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(3,868 Views)

Hi Adam,

That's right I didn't expect LabVIEW to be able to handle this, but trying to find a suitable ActiveX control or other software package is like looking for a needle in a haystack - there are just so many products out there.  I was just wondering if anyone could recommend something that was fast, efficient, easy to use and not too expensive.  The trouble with the IMAQ AVI functions is that they seem to be horribly slow reading AVI's even when using the latest codecs and there's only a few old codecs that can be used to write AVI's, and quite often IMAQ doesn't give you the ability to alter the quality settings Smiley Sad

I've been using the IVision Toolkit and it runs very well, but I find it a lot harder to use than the IMAQ AVI Tools and I've had problems when it comes to installing an application on a user's computer - so I'm just seeing if there is anything else out there?

0 Kudos
Message 3 of 7
(3,851 Views)

Hi Chris Reed,

I am not aware of any programs that will do this exactly.  What exactly to you mean when you say that the IMAQ AVI functions are to slow?  Is it just that they take too long to process an AVI or is there other problems?  I can’t comment on the IVision toolkit as I have don’t have any experience.

Adam H
National Instruments
Applications Engineer
0 Kudos
Message 4 of 7
(3,832 Views)

Hi Adam,

Well it seems that the problem was with the old Intel ijl15 library - it just couldn't handle 24-bit images.  I'll probably still do a test to compare the speed of decoding between the IMAQ and IVision VI's, but I got around 16fps using the Microsoft Codec so I guess that isn't too bad.  My problem is how to replace the old ijl15 library?  I know in the IMAQ functions you can write a JPEG image to a file, but I need to convert each AVI frame into a JPEG string so I can create my own DICOM file consisting of a whole series of appended JPEG frames - any ideas?

0 Kudos
Message 5 of 7
(3,806 Views)

Hi Chris,

I think your best bet for writing each frame of an AVI to file will be to use the IMAQ Read Frame VI in a for loop.  Then take the image out and save it to a file in a specified folder.  Use the IMAQ Get Info VI to find how many frames are in the AVI and have the for loop run once for each frame of the AVI.  I think that is all you will need to do in order to save each frame as
Adam H
National Instruments
Applications Engineer
0 Kudos
Message 6 of 7
(3,782 Views)

Hi Chris,

Now, do you solve the problem that avi file is compressed with h.264 ? if do it ,can you show me block diagram.

Thanks,

C-Dison

0 Kudos
Message 7 of 7
(2,197 Views)