11-09-2005 10:24 AM
Hey Ram,
Here is a VI I wrote that does something like what you want. You provide two image paths and it will subtract them for you. However, it does it in RGB and not Grayscale.
Hope it helps.
Jack J.
Product Support Engineer
National Instruments
11-09-2005 04:50 PM
11-09-2005 04:54 PM
11-10-2005 09:15 AM
I whole heartedly agree with you Matt. Using Vision is much easier.
Ram, using the formula you found is a good idea. The reason you are still getting color images is that the picture control interprets the result of the equation a color values. So for example if you have a pixel that has R=50, G=100, B=150, and we average that we get 100. But when you feed an U32 element of 100 to the picture, it interprets that as R=0, G=0, B=100 and you get a solid blue pixel. When you really want to show a grayscale picture, it means that all the values R, G and B should be the same. So you should really be wiring in R=100, G=100, B=100.
I modified my earlier VI to incorporate this new information 🙂