2
모든 opencv 함수가 완벽하게 작동합니다. 그러나 cvResize()는 컴파일러에서 찾을 수 없습니다. 이 기능은 설치 중에 설치되지 않았을 것입니다. 다음 프로그램은 cvResize 식별자가 정의되지 않았다는 오류를 알려줍니다.cvResize 식별자가 정의되지 않았습니다.
이 기능을 별도로 다운로드하여 사용할 수 있습니까? 방법?
#include "opencv2/highgui/highgui.hpp"
#include <iostream>
#include <ctype.h>
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
// Create an IplImage object *image
IplImage *source = cvLoadImage(argv[1]);
// Here we retrieve a percentage value to a integer
int percent = atoi(argv[3]);
// declare a destination IplImage object with correct size, depth and channels
IplImage *destination = cvCreateImage
(cvSize((int)((source->width*percent)/100) , (int)((source->height*percent)/100)),
source->depth, source->nChannels);
//use cvResize to resize source to a destination image
cvResize(source, destination);
// save image with a name supplied with a second argument
cvSaveImage(argv[2], destination);
return 0;
}