main.cpp
资源名称:gabor.rar [点击查看]
上传用户:soukeisyuu
上传日期:2022-07-03
资源大小:5943k
文件大小:1k
源码类别:
波变换
开发平台:
Visual C++
- #include "cv.h"
- #include "ml.h"
- #include "highgui.h"
- #include <stdio.h>
- #include <math.h>
- #include <ctype.h>
- #include "gabor.h"
- int main( int argc, char** argv )
- {
- IplImage *im;
- IplImage *re;
- IplImage *sa;
- im = cvLoadImage( "../2.jpg", CV_LOAD_IMAGE_GRAYSCALE );
- re = cvCreateImage(cvGetSize(im),8,1);
- CvGabor gabor;
- gabor.initGabor(0,2,11,3*PI/4);
- gabor.doGabor(im,re);
- sa = cvCreateImage(cvSize(im->width/2,im->height/2),8,1);
- cvPyrDown(re,sa);
- cvSaveImage("../gabor2.jpg",sa);
- }