收藏 分享(赏)

垂直镜像.doc

上传人:hyngb9260 文档编号:7832713 上传时间:2019-05-27 格式:DOC 页数:2 大小:26KB
下载 相关 举报
垂直镜像.doc_第1页
第1页 / 共2页
垂直镜像.doc_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

1、#include“stdio.h“#include“cv.h“#include“highgui.h“/垂直镜像void main(int argc,char *argv)int i,j,u,v,m,n;int height,width,step,step1;uchar *data;uchar *data1;IplImage *Img;IplImage *dst;Img = cvLoadImage(“123.jpg“,0);width = Img-width;height = Img-height;data = (uchar*)Img-imageData;step = Img-widthStep

2、;dst = cvCreateImage(cvGetSize(Img),IPL_DEPTH_8U,1);data1 = (uchar*)dst-imageData;step1 = dst-widthStep;cvZero(dst);cvNamedWindow(“win1“,1);cvShowImage(“win1“,Img);for(i=height/2;iheight;i+)for(j=0;jwidth;j+)u=2*i-height;v=j;data1i*step1+j = datau*step+v;for(m=0;mheight/2;m+)for(n=0;nwidth;n+)i =height-m;j=n;data1m*step1+n=data1i*step1+j;cvNamedWindow(“win2“,1);cvShowImage(“win2“,dst);cvWaitKey();cvReleaseImage(

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报