LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Threshold image inside loop

I am trying to threshold an image inside a while loop so the user can fine tune their threshold values.  The threshold values are being iterated correctly but when the image passes through its 2nd iteration the image goes black or disappears.  Any suggestions?  Thanks.

 

Alex

0 Kudos
Message 1 of 11
(3,688 Views)

Without seeing the screen shot of your vi I can only guess.

 

Have you connected a Imaq create to img dst of the imaq threshold? Have you put this out of the loop? What are all the processing that you are doing after this?

0 Kudos
Message 2 of 11
(3,681 Views)

try with shift registers for image

0 Kudos
Message 3 of 11
(3,679 Views)

How will shift register help in an image threshold?

0 Kudos
Message 4 of 11
(3,675 Views)

We are currently using shift registers but its not working.  The value is changed correctly but the image does not change.  In fact the image either completely disappears or it is thresholded entirely black.  I have attached a ss of the loop.

0 Kudos
Message 5 of 11
(3,664 Views)

Hello,

 

If you right-click your image display and then select Palette, what mode is it set to?

 

-Zach

0 Kudos
Message 6 of 11
(3,656 Views)

 


ladouceuraj a écrit :

We are currently using shift registers but its not working.  The value is changed correctly but the image does not change.  In fact the image either completely disappears or it is thresholded entirely black.  I have attached a ss of the loop.


According to the diagram, this behaviour is normal : once the image has been thresholded, the original data are replaced with the new [0, 1] values. Nothing left for another run.

 

Define a second image and wire it to the "destination image" input of the threshold function.

BTW, a shift register is completely useless when working with images, since the wire contains a reference  to the image structure, not the data itself.

Chilly Charly    (aka CC)
0 Kudos
Message 7 of 11
(3,652 Views)

Do not use a shift register as cc has suggested. Just connect the proper buffers properly and you should see the desired image. (Img dst)

0 Kudos
Message 8 of 11
(3,631 Views)

I have removed the shift registers but I am confused about the destination image.  Should i connect the same image wire leading into the while loop to the destination image port on threshold?   I tried this and ended up with the same results. 

 

chilly charly - I understand that the values are being replaced to binary.  Is there a way to essentially start over with the original image leading into the loop? 

0 Kudos
Message 9 of 11
(3,609 Views)

By destination It means connect an "imaq create" to the img dst of the threshold.

0 Kudos
Message 10 of 11
(3,584 Views)