Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to display extracted video from IMAQ card in 3 different palette styles.

A video signal is played to and captured using the IMAQ card. However, in trying to display the video in different styles only the HSL video is displayed while the gray scale video is not, it just shows a black screen. The third video display is an addition of the 2 video images just mentioned above. That window too shows a black screen.
0 Kudos
Message 1 of 6
(3,559 Views)
Which IMAQ card are you using?

If you are using the PCI-1411 to acquire color images, it sounds like you have it setup to acquire in HSL mode. You can display this, but each image will be converted back to RGB to be viewed properly, which will slow down the display. You can also extract the L plane from the image, which is the grayscale portion of the image. I can't figure out why you would be trying to add the two images together, since they are not the same kind of image.

If this doesn't answer your question, you need to go into more detail of what card you are using, and what you are trying to accomplish.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 6
(3,559 Views)
Bruce,

I'm using the PCI-1408. The reason why I want both images overlaid is because the HSL image will be adjusted according to a threshold value. The grayscale image is the original image unaffected by this change. I want the user to have the ability to see how close to the original grayscale image he is getting without having to eyeball the comparison in 2 separate windows.

Now the whole purpose of this is because we want to get a pixel count of a moving object (airplane). The color of the plane changes depending on the angle that it is being seen. HSL will be used for the pixel count since a fuller view of the plane is seen than if RGB was used.

As I was messing with the program some more, I noticed something that rarely happens, and that is
that the 2 windows would switch back and forth in displaying the image. HSL would go into a rainbow speckled view or grayscale would go black if not working displaying the image. But that was rare, normally HSL is the only window displaying something.

Does that help?
0 Kudos
Message 3 of 6
(3,559 Views)
How are you getting the HSL image? The only way I can think of doing that with a 1408 card is using StillImage, which would not work with a moving object. Are you somehow producing it from the grayscale image?

One possible reason for the windows switching would be if you are processing the original image. You should do the processing on a copy of the original. Otherwise, the display of the original will sometimes show the processed image when it refreshes the image.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 4 of 6
(3,559 Views)
I'm using a LL Occurrence Ring, when I extract the information from the buffer I split the extracted signal 2 different ways.
1) Goes to a Imaq threshold VI, then to a WindDraw. The palette connector of WindDraw is connected to GetPalette VI that is set to Binary.

2) Signal is routed to WindDraw with a palette set to Gray

Once i stop the program from running the occurrence is closed.
0 Kudos
Message 5 of 6
(3,559 Views)
Using occurrences seems a little complicated, but if it works it won't hurt anything.

You aren't using HSL or RGB images. Those are both color images. You are only dealing with grayscale and binary images.

What you need to do is create a second image using IMAQ create, and use it as the destination image when you threshold. This will keep the original grayscale image separate from the new binary image. If you don't do this, the binary image replaces the original grayscale. When you try to display a binary image using the grayscale palette, it looks all black because it is only 1s and 0s, instead of values up to 255.

Subtracting the binary image from the grayscale will not do much, since the values will only change
by 1 at most. Instead, you might want to look at masks or overlays. Another option would be to use the comparison operator to clear all values less than your threshold value.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 6 of 6
(3,559 Views)