#include "cv.h"
#include "stdafx.h"
#include "highgui.h"
IplImage* doPyrDown( IplImage* in ,int filter = CV_GAUSSIAN_5x5 )//该函数将返回一个大小为输入图像1/2的IplImage数据结构
{
assert ( in->width%2 == 0 && in->height%2 == 0 );
IplImage* out = cvCreateImage( cvSize( in->width/2, in->height/2 ), in ->depth, in->nChannels );
};
int main ()
{
IplImage* in = cvLoadImage ( "2.jpg" );//导入待处理的图像
#include "stdafx.h"
#include "highgui.h"
IplImage* doPyrDown( IplImage* in ,int filter = CV_GAUSSIAN_5x5 )//该函数将返回一个大小为输入图像1/2的IplImage数据结构
{
assert ( in->width%2 == 0 && in->height%2 == 0 );
IplImage* out = cvCreateImage( cvSize( in->width/2, in->height/2 ), in ->depth, in->nChannels );
cvPyrDown ( in , out, filter );
// 输入图像,out输出图像,其宽度和高度应是输入图像的一半,filter 卷积滤波器类型,目前仅支持CV_GAUSSIAN_5x5。
return ( out );};
int main ()
{
IplImage* in = cvLoadImage ( "2.jpg" );//导入待处理的图像