画像の拡大/縮小


深くて手が回らない簡単なことをする
// Gauss.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include "cv.h"
#include "highgui.h"
#include ;
#include 
using namespace std;
void resizeImage(IplImage * src,IplImage *dst,bool largescale);
int _tmain(int argc, _TCHAR* argv[])
{

	clock_t clkbegin;
	clock_t clkend;
	IplImage * src =cvLoadImage("D:/lena.jpg");

	 IplImage*dst= cvCreateImage(cvSize(src->width/2,src->height/2),src->depth,3);
	 clkbegin=clock();
	  resizeImage(src,dst,0);
	  clkend=clock();
	  cout<height;
	int cols;cols = src->width;
#define Imr(ROW,COL) ((uchar*)(src->imageData+(ROW)*src->widthStep))[(COL)*src->nChannels+0]
#define Img(ROW,COL) ((uchar*)(src->imageData+(ROW)*src->widthStep))[(COL)*src->nChannels+1]
#define Imb(ROW,COL) ((uchar*)(src->imageData+(ROW)*src->widthStep))[(COL)*src->nChannels+2]
#define newImr(ROW,COL) ((uchar*)(dst->imageData+(ROW)*dst->widthStep))[(COL)*dst->nChannels+0]
#define newImg(ROW,COL) ((uchar*)(dst->imageData+(ROW)*dst->widthStep))[(COL)*dst->nChannels+1]
#define newImb(ROW,COL) ((uchar*)(dst->imageData+(ROW)*dst->widthStep))[(COL)*dst->nChannels+2]
	if(!largescale)
	{
	  //   ;
		cout<