12-03-2018 08:19 AM
I need to identify a green circle and so far I've used the IMAQ ColorThreshold vi for colour recognition. Now I want to get rid of the noise with erosion and dilation but when I wire the vi, the image just goes black. What could be the problem? Also, I tried to wire the image src input to the original image then the image is just plain white. I link the picture
12-04-2018 09:34 AM
A mistake I fall for every time is that Boolean operations return 0's and 1's. So you have to format the image as "binary" to see something.
12-11-2018 02:38 PM
But why would this be a boolean operation? It's an image type no?
12-12-2018 03:02 AM
A threshold returns 0's (above threshold) and 1's (below threshold). So the result is Boolean.
You don't need to change the image type, you need to change the color scheme.
A 0\1 still fits in a u8 image, but you won't see anything in the default color scheme. You'll need the Boolean color scheme, that has black as 0, and red as >0.
01-07-2019 05:14 AM
I looked into what you said. But what I don't understand is that with both new image I set the image type to grayscale(U8) and I checked with the image info the output of the threshold and it's also grayscale. So why are they not compatible? I don't see that I would use the normal color scale anywhere, it should be boolean. Where am I wrong?
01-07-2019 06:26 AM
U8 is just the data type to hold the data. A Boolean needs an U8 (at least), as there is no Boolean data type image.
The term " Grayscale(u8)" is just confusing. U8 and grayscale are mutually exclusive. You'll need an U8 image type, but a Boolean palette. A grayscale color scale will simply display 0 as black, and 1 as nearly black. Alternatively, multiply the image with 255. That will make the 1's 255's, and that will show up as white.