Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with IMAQ ReplaceColorPlane

Greetings all-

 

I have a problem with IMAQ ReplaceColorPlane that I do not understand.  I have three 8-bit images (converted from arrays, but that should be a detail), and I wire them to the Red, Green, and Blue inputs of ReplaceColorPlane, but only the image that is wired to the Blue input terminal appears in the output image.  The Red and Green pixels are zero.  It doesn't matter which image I wire to blue.  I have even tried wiring the same image to all three inputs.  The result is always the same.  Only the blue channels are non-zero in the output.

 

I made a little test program using a little test image (8-bit, all pixels = 255).  In this test, ReplaceColorPlane works exactly as I would expect.  So, there is some subtle difference between the two cases that I don't get....

 

I am attaching my problem VI (Activity Color.vi) and also the test VI and test image.  Call Activity Color.vi is a simple test routine to set up and see the problem, but you will need the Advanced Signal Processing Toolkit to run it.  (Well, maybe you will see the problem.  If it "works fine" for you, let me know!)

 

Thanks,

-Geoff

0 Kudos
Message 1 of 2
(3,297 Views)
Using your test program and real_data.bmp file, it worked fine for me.  Feeding the same image into all three color planes resulted in an RGB image with R, G and B values being equal.  The only modification I had to make was to change the X and Y values of the Src image to the size of real-data.bmp
Randall Pursley
0 Kudos
Message 2 of 2
(3,287 Views)