I’m trying to visualize 2 successive images using OpenCV
Here are the 3 matrices I am computing:
projectionResult_img_debug = cvReshape( projectionResult_line, &row_header_temp, 0, rect_list[9].height );
projectionResult_img_debug2 = cvReshape( AverageImg_line, &row_header_temp2, 0, rect_list[9].height );
projectionResult_img = cvReshape( projectionResult_line2, &row_header_temp3, 0, rect_list[9].height );
//debug: printMatrixValues(projectionResult_line, 1200, 1250);
printMatrixValues(AverageImg_line, 1200, 1250);
printMatrixValues(projectionResult_line2, 1200, 1250);
IplImage img_t;
IplImage* img_t2 = cvGetImage( projectionResult_img_debug, &img_t );
IplImage img_t_2;
IplImage* img_t2_2 = cvGetImage( projectionResult_img, &img_t );
My problem is that the 2 images that are displayed are the same, and are ALWAYS displaying the last matrix that I have computed (in this case it’s the one on line 3).
Any idea of where the problem is?
Like @karlphillip says, your code sample is incomplete. But it looks like the second argument in
IplImage* img_t2_2 = cvGetImage( projectionResult_img, &img_t );should probably beimg_t_2.