LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaq color threshold blank image

Solved!
Go to solution

I'm trying to do a basic color threshold program but the output that I get is blank image, but only when I create the display in the front panel myself. When I copy the display output from Color Thresold.vi example it can display the binary image output. 

 

What is the difference between the two display output? How can I make this possible without having to copy from anywhere else?

 

0 Kudos
Message 1 of 5
(5,403 Views)

The IMAQ datatype is really just a reference to the image in memory. You're using a Dispose IMAQ function at the end of your VI and this gets rid of all of the images in memory including the one you just created. Usually your application should keep running while you do other stuff and display the image then you clear all IMAQ at the end when you don't need the images anymore. If you plan on running the VI and leaving the IMAQ up for display, remove the Dispose function.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 5
(5,375 Views)

I've removed the dispose function but I still get the same results. Only one of the image displays work. The one that I put myself doesn't work. 

 

Both of them are connected to the same point so it is weird that only one of them works. 

0 Kudos
Message 3 of 5
(5,352 Views)

The image display simply displays the information that is currently in the image buffer that is wired to the control, so both indicators should show the same thing since they're both receiving "threshold". THis makes me think there must be a difference between the two indicators.

 

You're replacing the threshold pixels with a value of 1. This is just barely brighter than black, so I bet the pixels are there you just can't see them. Change that value to 255 and maybe the threshold will show up.

 

Edit: Figured it out. Your "working" indicator is set to Binary palette. This shows the red and black because all values are 0 or 1. Your "nonworking" indicator is set to Grayscale palette, so the values of 1 won't be discernable by the human eye against values of zero on a scale from 0 to 255.

 

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 4 of 5
(5,338 Views)
Solution
Accepted by ohhlalaa

It looks like you need to select the Binary Palette for the image display control you create:

 

Binary.png

Message 5 of 5
(5,329 Views)