11-11-2015 08:20 AM - edited 11-11-2015 08:26 AM
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?
Solved! Go to Solution.
11-11-2015 10:22 AM - edited 11-11-2015 10:23 AM
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> ---'
11-12-2015 04:47 AM
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.
11-12-2015 08:53 AM - edited 11-12-2015 09:05 AM
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> ---'
11-12-2015 09:09 AM
It looks like you need to select the Binary Palette for the image display control you create: