logo       

CvCam callback problems: msg#01173

lib.opencv

Subject: CvCam callback problems

Hello

Im new to OpenCv and just starting to learn it, i encountered a
problem
which i cannot solve and cannot find any solution on web. Im trying
to
process frames using callback function from CvCam manual (one which
draws a line):


void callback(IplImage* image)//Draws blue horizontal lines across
the
image
{
IplImage* image1 = image;
int i,j;


assert (image);


for(i=0; i<image1->height; i+=10)
{
for(j=(image1->widthStep)*i; j<(image1->widthStep)*(i+1);
j+=image1->nChannels)
{
image1->imageData[j] = (char)255;
image1->imageData[j+1] = 0;
image1->imageData[j+2] = 0;


}


}



}


But instead of a line it draws 5 strange colored shapes in different
locations in the window. Im using VC++ 6 and openCV beta5.

Thanks in advance











Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise