Grayscale Firefly MV + ofVideoGrabber > indexed grayscale

Hi all, I’m getting indexed output (seems like I get 16 grays only) from a grayscale (256 grays) fireflyMV using github OF under Mac OS X (10.6). Also happens with 0.61. I’ve tried all the options in the SequenceGrabber settings panel, with same results. Other apps can access the camera and get the full 256 grayscale range. I’ve been trying to mess with the k24RGBPixelFormat value inside ofVideoGrabber methods, with different results, but none of them better. Also tried switching around the defined(__BIG_ENDIAN__) #ifdef’s, with same results

  
  
#if defined(TARGET_OSX) && defined(__BIG_ENDIAN__)  
	QTNewGWorldFromPtr (&(videogworld), k32ARGBPixelFormat, &(videoRect), NULL, NULL, 0, (offscreenGWorldPixels), 4 * width);		  
#else  
	QTNewGWorldFromPtr (&(videogworld), k24RGBPixelFormat, &(videoRect), NULL, NULL, 0, (pixels), 3 * width);  
#endif		  
  

I’ve got source for cocoa apps that use SequenceGrabber for video input and they fine work too… Trying to compare them with the ofVideoGrabber class is quite difficult, as they seem to take different approaches, but nothing is extremely different.

Anyone else experiencing this?

I know I can use ofxVideoGrabber for firewire cams; I have and it rocks, but it’s quite inconvenient if you need to alternate between USB and Firewire cameras…

![](http://forum.openframeworks.cc/uploads/default/1596/Screen shot 2011-05-07 at 12.03.55.PNG)

![](http://forum.openframeworks.cc/uploads/default/1598/Screen shot 2011-05-07 at 12.04.10.PNG)

![](http://forum.openframeworks.cc/uploads/default/1599/Screen shot 2011-05-07 at 12.08.04.PNG)

Investigating further, I see of 0.6 works. ofVideoGrabber had some changes for 0.61, which I’m trying to revert to… Let’s see how it goes.

Edit: So I managed to make it work again, basically opened v0.60 and current version side by side and got rid of most changes on the newest version… Only left in the frameRate related addition in initGrabber(); so that you can still set a desired frameRate.

  
  
//---------------------------------- 5 - final initialization steps  
....  
if( attemptFramerate >= 0 ){  
	err = SGSetFrameRate(gVideoChannel, IntToFixed(attemptFramerate) );  
	if ( err != noErr ){  
		ofLog(OF_LOG_ERROR,"initGrabber error setting framerate to %i", attemptFramerate);  
	}		  
}  
  

hope this helps someone!