LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a faster way of reading .jpeg than IMAQ Readfile?

I'm using IMAQ Readfile to open and display .jpeg Images. I want to show them in a loop, like a movie, but I can't get my program to show more than 2-3 images per second. I don't do any processing, just showing the Image.

The images are large (5 MPixel, 2500x2000 converted to a 200k jpeg File), but on my PC (3.4Ghz Pentium 4, 7200rpm SATA Harddrive) it should be possible to view them much faster. When I profile my program it shows that it takes 350-400ms for one IMAQ Readfile call.

I'm using LabView 7.1 with IMAQ 3.1
0 Kudos
Message 1 of 13
(4,606 Views)
You are right, JPEG decoding in LV doesn't seem to be very efficient.
May be a solution could be to convert your images into an AVI file first ?
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 13
(4,601 Views)


@chilly charly wrote:
May be a solution could be to convert your images into an AVI file first ?





It's possible, but not very nice. That's more or less the step I want to get rid of.
0 Kudos
Message 3 of 13
(4,594 Views)
Try the read jpg vi in the all functions, graphics&sound, graphics format from the block diagram
0 Kudos
Message 4 of 13
(4,591 Views)


@unclebump wrote:
Try the read jpg vi in the all functions, graphics&sound, graphics format from the block diagram

It's even worse than the IMAQ jpeg since you have one additionnal conversion step before display !
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 13
(4,580 Views)
I can open 200k jpeg files in less than 350-450ms with the read jpg vi.
0 Kudos
Message 6 of 13
(4,579 Views)
I have used a nice trick some time ago: I had to display a sequence of 36 jpgs in very fast succession. To do that I have read all images in an initial step without displaying them. This initialization phase took some time but for my application this wasn't a problem. Windows kept the images in the hard drive's cache and the next time I loaded them in my application the load process took virtually no time.
This trick won't work if you need to access the hard drive for other purposes, too as this will clear the cache. Another solution could be to create a RAM-Disc and copy the files to the RAM-Disc before displaying them. This should speed up the load-process, too.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 7 of 13
(4,556 Views)
Try Show Image (http://www.geocities.com/gzou999/imgtool.htm)
 
 
George Zou
George Zou
0 Kudos
Message 8 of 13
(4,544 Views)

 Hi, I have been given a task wherein I have to display around 500 JPEG with minimum possible time lag so that it appears as an animation.

Can you help me with this..

0 Kudos
Message 9 of 13
(4,155 Views)

If the quantity of the images is not too big you can load them all in an array of images and then show them quickly one after the other.

Of course the "loading" time will take 350ms per image, quoting the number you reported...

 

A second option could be to convert programmatically all the images to a format faster to load, but it's going to take some space on the disk...

 

Message Edited by MarcoMauri on 06-16-2010 03:26 AM
0 Kudos
Message 10 of 13
(4,116 Views)