02-03-2009 07:52 AM
Hello
I woulod like to do thresholding for an image without using IMAQ functions. How is it done? Can anyone explain the step by step procedures for it or post an example?
Thanks
Solved! Go to Solution.
02-03-2009 08:08 AM
without imaq, you can take your array version of an image (pixel map) and compare it to the threshold (greater than) this will return a 2d array of booleans which can be converted to u8 where 1 is above th and 0 is below th. you can also do it for a range by doing a range check (in range?) and getting your boolean array there.
02-04-2009 09:56 AM
Hello flakpl
I am having a an image of 2D array .. its a complex array. How can i do the thresholding with it. I tried to convert the 2D array to 1D and the compare with a value (eg 255). but it didnt work. cudnt proceed further.
Can you help me?
02-04-2009 10:51 AM
Hey Nghtcrwlr,
can you post your VI?
Thanks,
cheggers
02-04-2009 04:26 PM
Hello Cheggers
I am not sure whether one could do thresholding with complex numbers. Do we need to extract the real part of the complex number and compare it? anyways i was not able to run this vi. see attachment.
02-04-2009 06:43 PM - edited 02-04-2009 06:43 PM
Well, you don't really have an "image", but a 2D complex array. One (of many!) possible interpretation for a "threshold" would be to compare the absolute value R for each element.
You don't need any FOR loops for this. Here's one possible solution. Modify as needed.
02-04-2009 09:58 PM
altenbach shows an implementation of what I discribed. A threshold is simply a per pixel comparison (>, < or in range) and the value is usually a 0 or 1. This produces a binary image. Using the polymorphic nature of labviews comparison a 2d array doesnt have to even be converted (an infact it usually is faster to not use a nested loop).
02-05-2009 07:42 AM