c - 缺少 PDB 文件

标签 c visual-studio-2010 opencv

我正在尝试制作一个非常简单的程序,使用 Opencv 反转像素位置。但是由于某种原因,代码似乎无法计算,我注意到很多丢失的 PDB 文件,我做了一些研究,但是我还没有找到任何东西来帮助我解决问题 我正在使用 VS 2010 和 Opencv 2.2

#include "stdafx.h"
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <iostream>

using namespace std ;

int _tmain(int argc, _TCHAR* argv[]){


    IplImage *image = cvLoadImage("mra.jpg");
    if (!image) {
            cout<<"Error: Couldn't open the image file.\n"<<endl ;
            return 1;
    }
    IplImage *new_image = cvCreateImage(cvGetSize(image) , image->depth , 1 );

    CvScalar pix ;
    int position = 0 ;

    for(int i = 0 ; i < image->height ; i++ ){
        for (int j = 0 ; j < image->width ; j++ ){
            pix = cvGet2D(image , i , j ) ;     

            if ( i = 0 ){
                position = image->height - 1 ;
            }else if ((position >= 2)) {
                position = position - 2 ;
            }
            cvSet2D(new_image , position , j , pix );
        }
    }


    cvNamedWindow("1111", CV_WINDOW_AUTOSIZE);
    cvNamedWindow("2222", CV_WINDOW_AUTOSIZE);
    cvShowImage("1111", image);
    cvShowImage("2222", new_image);

    // Wait for the user to press a key in the GUI window.
    cvWaitKey(0);

    // Free the resources.
    cvDestroyAllWindows ;
    cvReleaseImage(&image);
    cvReleaseImage(&new_image);

    return 0;
}

提前致谢

最佳答案

如果(我=0)

将 0 分配给 i。它应该是 (i == 0)。 您是否有机会遇到无限循环?

关于c - 缺少 PDB 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4708810/

相关文章:

c - 打印值数组的十六进制表示

c - 网络掩码的 IPv4 前缀长度

python - 在Python中读取给定目录中的图像文件

c++ - 从BackgroundSubtractorMOG2检索背景图像时出错

python - 如何使用FastAPI将视频帧和文本返回到HTML页面?

c - C 中的数组和指针

c - WTSS在停止服务之前发送消息

c# - 通过表达式 EPPlus 格式化条件

c# - 部署共享点事件接收器时为 "Operation is not valid due to the current state of the object"

c++ - 这在 Visual Studio 中被视为 .NET 还是 IL?