我正在尝试使用 OpenCV 可视化 2 个连续图像
这是我正在计算的 3 个矩阵:
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 );
我的问题是显示的 2 个图像是相同的,并且始终显示我计算的最后一个矩阵(在本例中是第 3 行的矩阵)。
知道问题出在哪里吗?
最佳答案
就像 @karlphillip 所说,您的代码示例不完整。但看起来 IplImage* img_t2_2 = cvGetImage(projectionResult_img, &img_t );
中的第二个参数可能应该是 img_t_2
。
关于c - 两个连续的图像显示显示相同的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6917164/