私の OpenCV 関数はすべて問題なく動作しています。しかしcvResize()
、コンパイラによって検出されません。この機能はインストール時にインストールされていないと思います。次のプログラムは、cvResize identifier is undefined というエラーを通知します
この機能を別途ダウンロードして使用することはできますか?どのように?
#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;
}