Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66732

cant convert color image to black and white

$
0
0

i have the following attachment of code.

Im trying to take a color image

then convert it to black and white

But using the standard conversion formula

http://en.wikipedia.org/wiki/Grayscale

gray = 0.299*Red + 0.587Green+ 0.114*B

 

The attached code is my attempt at this.

Im not sure what im doing wrong.

I keept getting an error 'invalid image type'

 

The basics are that i am trying to extract the RGB from the image

Then apply the scalar offsets.

then combine the three arrays into the one grayscale.
ideally i figured there would be a premade function to do something like this.

im not talking about just capturing one channel though.

 

The acquistion is done inside a loop as the display needs to be done repetitively

The save is only at the end

 

Ive attached a screen shot of my MAX of the camera

 

Any help is appreciated.

 


Viewing all articles
Browse latest Browse all 66732

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>