Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Images

hello.

i have the follwing setup.

1) I read an image and display it in an image window ... say... Image1.
2) I put the data read through a Mathscript program that applies a threshold to the data.
3) This data is then displayed as an image ... say .. Image2.

Problem:

Image1 is displayed original image.
when the thresholded image is displayed in Image2 , the same image also shows up in Image1.
In short the original image is lost.

What could be the problem.

Basically images should show the most recent processed image.

Kindly advise
Thanks
Panash
0 Kudos
Message 1 of 2
(3,137 Views)
Hi there,
 
Images are used as pointers in LabVIEW and therefore will behave as such.  When you update the image in your mathscript node the original image data space is changed.  As a result of this change the front panel updates all the controls that reference that memory space.  Hence you have the image updated in the first image indicator.
You are not losing the original image, you are writing over it.
The way around this is to use a vi called "image to Image.vi" (I have attached a screenshot of the context help)
This will copy the image into a second memory space.  (Don't forget to create the image space with a different name)
 
Using this function your original image will be preserved.
 
AdamB

Message Edited by AdamB on 06-05-2007 03:06 AM

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 2
(3,135 Views)