LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading images efficiently

Solved!
Go to solution
Hi all, I have a question that I want to ask before I start building my next application. I have a camera which sends me images to a specified folder and with specified name format. At the moment the name is taken as a data in the following format: 0:yyyy-MM-dd_hh-mm-ss.fffffff.bmp The name format can be changed. What I need to do is take every image from this camera in the correct order, read it from a specified path, and show it in LabView. The camera gives images with 30fps frame rate. Finally there are two questions: - what is the most efficient way to read and show these files one after another as fast as possible - what is the simplest way to iterate through names? Because I can change the name format maybe there is some other more 'LabView friendly' format of name I could use? I appreciate any help.
0 Kudos
Message 1 of 25
(3,195 Views)

The format for the name of images doesn't change anything to your problem, LabVIEW can interpret the yyyy-MM-dd_hh-mm-ss.fffffff.bmp format so no issue here.

Reading images from disk, images that were save to disk by the camera, that doesn't sounds like the best idea to me ; it will probably work but not sure you will be able to display at 30Hz live (that will depend a lot on the size of your images). Maybe you could just get LabVIEW to load and display the most recent images saved at the rate you can. but that will use a lot of disk access.

What is you camera? What's the size and bit depth of you images?

If you have VDM (Vision Development Module) you can acquire images from your camera, and then you wouldn't have to get the camera to save to disk and your LabVIEW app to read from disk...

 

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 25
(3,186 Views)

The problem of accessing the camera directly was already discussed on this forum, and unfortunately there is no chance to use LabView to read images directly from this camera. Images are not so big, 140x240pixels, with 8-bit depth. 

0 Kudos
Message 3 of 25
(3,181 Views)

Oh... ok.

Then you should be able to achieve that. Do you need help for the implementation?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 25
(3,176 Views)

I am not sure how to implement the filename format, because I think I should take the current data/time from a system but with some delay. If you have any suggestions I would be very grateful. 

0 Kudos
Message 5 of 25
(3,171 Views)

Here's a quick example, hope it helps.

 

Example_VI_BD.png


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 25
(3,168 Views)

I'll try it. What is the name of the main block you've used ? 

0 Kudos
Message 7 of 25
(3,166 Views)

"scan from string" located in the string palette.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 8 of 25
(3,163 Views)

I probably didn't get the point of using this example. I understand the format, the time stamp as an initial value, but don't really get the input string. I understand, that this should be the filename? If so, how should I iterate the filename automatically?

0 Kudos
Message 9 of 25
(3,158 Views)

Well, in fact you dont even need that... you merely need to get the list of file that are in your folder, sorting alphabetically the file name string array should let you pick the most recent file.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 10 of 25
(3,155 Views)