码迷,mamicode.com
首页 > 其他好文 > 详细

cvPyrDown cvPyrUp 图像金字塔

时间:2014-08-14 17:01:29      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:opencv cvpyrdown cvpyrup 图像金字塔

核心函数:cvPyrDown,cvPyrUp

程序:

bubuko.com,布布扣

代码:

#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include <iostream>
int pyr(int argc,char** argv)
{
IplImage* src=cvLoadImage("e:\\picture\\xibao.jpg");
IplImage* dst1=cvCreateImage(cvSize(src->width/2,src->height/2),src->depth,src->nChannels);
IplImage* dst2=cvCreateImage(cvSize(src->width*2,src->height*2),src->depth,src->nChannels);
cvPyrDown(src,dst1,CV_GAUSSIAN_5x5);
cvPyrUp(src,dst2,CV_GAUSSIAN_5x5);
cvNamedWindow("src");
cvNamedWindow("PyrDown");
cvNamedWindow("PyrUp");
cvShowImage("src",src);
cvShowImage("PyrDown",dst1);
cvShowImage("PyrUp",dst2);
std::cout<<src->height<<std::endl;
std::cout<<src->width<<std::endl;
cvWaitKey(0);
return 0;
}


本文出自 “flyclc” 博客,请务必保留此出处http://flyclc.blog.51cto.com/1385758/1539846

cvPyrDown cvPyrUp 图像金字塔,布布扣,bubuko.com

cvPyrDown cvPyrUp 图像金字塔

标签:opencv cvpyrdown cvpyrup 图像金字塔

原文地址:http://flyclc.blog.51cto.com/1385758/1539846

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!