ofxCvHaarFinder/videograbber RPi cvResetImageROI error

Hey all,

I wrote together a quick sketch that converts a webcams frames to grayscale, then uses the default haar_finder.xml document for basic facial tracking. I am having the same issue on mac/arm that is illustrated with the image attached. (refer to attachment). It compiles correctly, but something fishy in the opencv source files isnt sitting right.

I had dug around in the forums, but from my understanding, the aspect ratio referenced in the source file containing the functions cvResetImageROI, etc need to be scaled to my dimensions, but I know im misinterpreting my issue. (i also ensured my newly created sketch contained the .xml file in the data folder).

Here is my testApp.cpp file :

  
#include "testApp.h"  
  
//--------------------------------------------------------------  
void testApp::setup(){  
	  
	camWidth 		= 320;	// try to grab at this size.  
	camHeight 		= 240;  
    red.set(255,0,0);  
    //we can now get back a list of devices.  
	vector<ofVideoDevice> devices = vidGrabber.listDevices();  
	  
    for(int i = 0; i < devices.size(); i++){  
		cout << devices[i].id << ": " << devices[i].deviceName;  
        if( devices[i].bAvailable ){  
            cout << endl;  
        }else{  
            cout << " - unavailable " << endl;  
        }  
	}  
      
	vidGrabber.setDeviceID(0);  
	vidGrabber.setDesiredFrameRate(60);  
	vidGrabber.initGrabber(camWidth,camHeight);  
	  
	videoInverted 	= new unsigned char[camWidth*camHeight*3];  
	videoTexture.allocate(camWidth,camHeight, GL_RGB);  
	ofSetVerticalSync(true);  
      
      
	finder.setup("haarcascade_frontalface_default.xml");  
    finder.findHaarObjects(grayImage);  
}  
  
  
//--------------------------------------------------------------  
void testApp::update(){  
	  
	ofBackground(100,100,100);  
	  
    bool bNewFrame = false;  
      
    vidGrabber.update();  
    bNewFrame = vidGrabber.isFrameNew();  
      
      
      
	if (bNewFrame){  
          
        colorImg.setFromPixels(vidGrabber.getPixels(), 320,240);  
        colorImg.setFromPixels(vidGrabber.getPixelsRef());  
        grayImage = colorImg; // convert our color image to a grayscale  
          
          
          
}  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
	ofSetHexColor(0xffffff);  
    grayImage.draw(360,20);  
      
    ofNoFill();  
	for(unsigned int i = 0; i < finder.blobs.size(); i++) {  
		ofRectangle cur = finder.blobs[i].boundingRect;  
		ofRect(cur.x, cur.y, cur.width, cur.height);  
	}  
      
      
}  

![](http://forum.openframeworks.cc/uploads/default/3111/Screen Shot 2013-11-25 at 1.28.50 PM.png)