04-09-2010 12:40 PM
Hello Everyone
I am trying to use a USB camera and then convert the image obtained to array format so that i can have access to each pixel intensity. But when i am using IMAQ image to array, it gives error like invalid image format. Thought i an see the image in image window it is just that i can not convert it to array. A little help from anyone is appreciated.
Regards
Chauhan
04-10-2010 10:03 AM
You are using a USB camera, which generates color images. You are using ImageToArray for grayscale images, which is why the image format is not compatible. You need to do one of two things:
1. Convert your color image to a grayscale image. IMAQ Cast is the easiest way to do this - just create a second image that is grayscale and use it as the destination.
2. Use ImageToArray for color images to extract the data you need.
Bruce
04-11-2010 08:44 AM
Thnaks
IMAQ cast did the work.