LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Threshold Image

Solved!
Go to solution

HI All

 

I am trying to apply a threshold to an Image so that I can track its centroid across a screen as a beam moves, the goal is a beam pointing Stabilization. 

 

I have set the threshold to be between 128 and 255. The vi description seems to suggest that I anything between these two values would be set to zero but it seems to do the opposite (Anything outside this range is set to 0). 

 

Would anyone be able to assist me in understanding how this works.

 

Best Wishes 

Andrew

AndrewIons01_0-1615996163938.png

AndrewIons01_0-1615996383347.png

 

 

 

0 Kudos
Message 1 of 19
(1,563 Views)

maybe just an issue with the Intensity plot...?

 

thresholding.png

0 Kudos
Message 2 of 19
(1,525 Views)

Hi 

 

Thank you so much for the reply, would it be a good idea for me to send you the VI so you can have a look at it. 

 

Best Wishes 

Andrew

0 Kudos
Message 3 of 19
(1,522 Views)

@AndrewIons01 wrote:

Hi 

 

Thank you so much for the reply, would it be a good idea for me to send you the VI so you can have a look at it. 

 

Best Wishes 

Andrew


save your .vi with  typical data(you have to click edit>make current vales default)

and then attach to this post

0 Kudos
Message 4 of 19
(1,491 Views)

Thank you for replying, Here is the vi

 

0 Kudos
Message 5 of 19
(1,488 Views)

@AndrewIons01 wrote:

Thank you for replying, Here is the vi

 


I am afraid there is no data (in your 4dsigma Threshold example.vi ‏62 KB)  attached - also, maybe the issue is in your self-written sub.vi?

0 Kudos
Message 6 of 19
(1,476 Views)

Sorry for the delay, here is is. I ma also having trouble taking a series of images, computing them into 2D arrays, taking the average of these arrays. I keep getting zero at the moment. 

 

0 Kudos
Message 7 of 19
(1,450 Views)

@AndrewIons01 wrote:

I have set the threshold to be between 128 and 255. The vi description seems to suggest that I anything between these two values would be set to zero but it seems to do the opposite (Anything outside this range is set to 0). 

 

Would anyone be able to assist me in understanding how this works.

 


I'd do something like this

coerce-to-zero.png

0 Kudos
Message 8 of 19
(1,438 Views)

Thank you for the reply, I do have a question regarding your solution, why do you have two graphs going into an array builder? why do we need both going in. 

 

This image is a grey scale image, can set the colours to be a grey scale automatically? 

 

My final question (its a silly one). How does this function compared to the IMAQ Threshold VI. 

 

Once again I appreciate your help. 

 

Andrew 

0 Kudos
Message 9 of 19
(1,424 Views)

Hi Andrew,

 


@AndrewIons01 wrote:

why do you have two graphs going into an array builder? why do we need both going in.


Because both graphs are set to the same properties…

 


@AndrewIons01 wrote:

This image is a grey scale image, can set the colours to be a grey scale automatically?


Yes. just change the colorscale settings (aka ZScale.MarkerValues)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 19
(1,421 Views)