LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

image processing

Hi, all,

 

Currently I am developing an image acquisition system, and I have two problems which may need your help.

 

1. Once I acquisite the imag information, I want to save it to a file. However, if I tie a simple save to file VI, it always overwrites the previous image. How can I save multiple images?

 

2. After saving the imags I want to do averaging for the images. e.g. average 10 images to get 1 result. I don't know how could I do that. 

Image.jpg

Please find my code in the attachment. You help is highly appreciated. 

 

0 Kudos
Message 1 of 7
(1,064 Views)

here is for the first question, has shown in your VI that I modified, at each iteration you build the name of the image file before using the "save image" function.

 

as for your second question.. what exactly do you want to do? a pixel by pixel average on many consecutive images? why?

in the image processing palette you have function to sum / substract / etc... images pixel by pixel, that may help you do what you want.

 

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 7
(1,057 Views)

Many thanks for your comments. In fact I run the program but unfortunately an error message appeared:

 

Do you have any idea what could be the reason of this problem?

 About your question, we want to do this averaging because we want to reach a good resolution.

Untitled.jpg

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

I assume that it's because the folder you selected doesn't exist. So before entering the loop you need to check that the destination folder exists and create it if it doesn't.

 

OpenG has a function that does just that (along with a huge amount of very handy function ;)).

 

But if you feel really lazy you can set the "path" to only accept existing folder (right clic on the path control from the FP and browse option).

 

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 4 of 7
(1,040 Views)

"However, if I tie a simple save to file VI, it always overwrites the previous image. How can I save multiple images?"

 

You might want to use the iteration terminal to create a unique file name per run so the filenames get different by iteration

 

 

0 Kudos
Message 5 of 7
(1,033 Views)

Thank you again for your comments. yes, We did exactly the same thing. First I tried to create am empty image file (test.jpg) and then in the program I opened that file as our first file. However, this error still jumps out. 

 

Then, I tried to change the property of the "path" to "New or existing". But it still didn;t work. The same error happened. 

0 Kudos
Message 6 of 7
(1,019 Views)

Hmmm.. not sure what's the issue then..

Here's another blind guess - I don't have USB camera so I can test it.

If it still doesn't work, try and remove the AVI part and see what happens.

 

I've never used USB cams but I often use CameraLink and FireWire cams, I know the driver is different.. With CameraLink it is good to have an image allocated only for the acquisition and copy to another image buffer straight after acquisition before you do any processing because the driver can reserve the acquisition buffer for itself.

 

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 7 of 7
(998 Views)