Empty ImageData

Hi,

I’m new here, so apologies if I’m posting this in the wrong place. :?:

Any advice appreciated. Thanks!

Best,
Diana :?

And here is the portion of the code relevant to this.

  
  
  
			if (!vidWriter)  
				vidWriter = cvCreateVideoWriter("output2.avi", 0, /*fps*/ 30, cvSize(frame->roi->width,frame->roi->height), 1);  
		  
			IplImage *tempROI = cvCreateImage(cvSize(frame->roi->width,frame->roi->height),frame->depth,3);  
  
			for (int j = frame->roi->yOffset; j < frame->roi->yOffset + frame->roi->height; j++)  
				for (int i = frame->roi->xOffset; i < frame->roi->xOffset + frame->roi->width; i++)  
			{  
				  
				CV_IMAGE_ELEM(tempROI, uchar,(j - frame->roi->yOffset), (i - frame->roi->xOffset)*3    ) = CV_IMAGE_ELEM(frame, uchar, j,i*3);  
				CV_IMAGE_ELEM(tempROI, uchar,(j - frame->roi->yOffset), (i - frame->roi->xOffset)*3 +1 )  = CV_IMAGE_ELEM(frame, uchar, j,i*3+1);  
				CV_IMAGE_ELEM(tempROI, uchar,(j - frame->roi->yOffset), (i - frame->roi->xOffset)*3 +2 )  = CV_IMAGE_ELEM(frame, uchar, j,i*3+2);  
				  
			}  
  
			cvNamedWindow("test");  
			cvShowImage("test",tempROI);  
			cvWaitKey();  
  			cvWriteFrame(vidWriter,tempROI);  
			cvReleaseImage(&tempROI);  
  
  

if this is a straight opencv question, you might try:

http://groups.yahoo.com/group/OpenCV/

while many of us use opencv quite often, it will be confusing to start to answer non openframeworks questions on this forum (since it is, after all, about openframeworks). We can think about maybe starting a general conversation / anything goes forum topic, but in the meantime, I think it might be better to try yahoo.

take care!
zach

Thanks Zach, just did that. :slight_smile:

D.

cool, good luck !!

zach

Hey Diana!

It would be great if you could post the reference to the topic you started :wink: