gpt4 book ai didi

c - 两个连续的图像显示显示相同的图像

转载 作者:行者123 更新时间:2023-11-30 14:28:02 25 4
gpt4 key购买 nike

我正在尝试使用 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com