"aneuryzma" <pa**************@gmail.coma écrit dans le message de news:
6b**********************************...oglegroups.com...
Hi,
this is my code:
IplImage *image = 0;
...
if( !image ) {
image = cvCreateImage( cvGetSize(frame), 8, 3 );
image->origin = frame->origin;
}
myMethod(image);
cvShowImage( "CamShiftDemo", image );
...
Why do I receive this error ?
hummm what error again????
I'm just passing the pointer image by
reference.. when myMethod finishes, I should have the same pointer to
the modified image instead it is NULL.. ?
myMethod probably assign NULL to image... is myMethod declared like that
void myMethod(IplImage*& img);
If you do want to change the value of the pointer, but want to change the
value of what it is pointing to (I strongly suspect it is an image...) then
declare myMethod like that
void myMethod(IplImage* img);
Anyway, if after calling myMethod, your pointer is NULL, then you proibalby
have something else wrong in you method...
-----------------
Eric Pruneau