资源简介
具体见博客:http://blog.csdn.net/u014773418/article/details/50517857
代码片段和文件信息
// Given a view of a checkerboard on a plane view that image and a
// list of others frontal parallel to that plane
//
// This presumes that you have previously callibrated your camera and stored
// an instrinics and distortion model for your camera.
//
// console application.
// Gary Bradski Oct 3 2008
//
/* *************** License:**************************
Oct. 3 2008
Right to use this code in any way you want without warrenty support or any guarentee of it working.
BOOK: It would be nice if you cited it:
Learning OpenCV: Computer Vision with the OpenCV Library
by Gary Bradski and Adrian Kaehler
Published by O‘Reilly Media October 3 2008
AVAILABLE AT:
http://www.amazon.com/Learning-OpenCV-Computer-Vision-Library/dp/0596516134
Or: http://oreilly.com/catalog/9780596516130/
ISBN-10: 0596516134 or: ISBN-13: 978-0596516130
OTHER OPENCV SITES:
* The source code is on sourceforge at:
http://sourceforge.net/projects/opencvlibrary/
* The OpenCV wiki page (As of Oct 1 2008 this is down for changing over servers but should come back):
http://opencvlibrary.sourceforge.net/
* An active user group is at:
http://tech.groups.yahoo.com/group/OpenCV/
* The minutes of weekly OpenCV development meetings are at:
http://pr.willowgarage.com/wiki/OpenCV
************************************************** */
#include
#include
#include
#include
void help(){
printf(“Birds eye view\n\n“
“ birdseye board_w board_h intrinsics_mat.xml distortion_mat.xml checker_image \n\n“
“Where: board_{wh} are the # of internal corners in the checkerboard\n“
“ intrinsic intrinsic path/name of matrix from prior calibration\n“
“ distortion distortion path/name of matrix from pror calibration\n“
“ checker_image is the path/name of image of checkerboard on the plane \n“
“ Frontal view of this will be shown.\n\n“
“ ADJUST VIEW HEIGHT using keys ‘u‘ up ‘d‘ down. ESC to quit.\n\n“);
}
int main(int argc char* argv[]) {
if(argc!=6)
return -1;
help();
//INPUT PARAMETERS:
int board_w = atoi(argv[1]);
int board_h = atoi(argv[2]);
int board_n = board_w * board_h;
CvSize board_sz = cvSize( board_w board_h );
CvMat *intrinsic = (CvMat*)cvLoad(argv[3]);
CvMat *distortion = (CvMat*)cvLoad(argv[4]);
IplImage *image = 0 *gray_image = 0;
if((image = cvLoadImage(argv[5]))== 0){
printf(“Error: Couldn‘t load %s\n“argv[5]);
return -1;
}
gray_image = cvCreateImage(cvGetSize(image)81);
cvCvtColor(image gray_image CV_BGR2GRAY);
//UNDISTORT OUR IMAGE
IplImage* mapx = cvCreateImage( cvGetSize(image) IPL_DEPTH_32F 1 );
IplImage* mapy = cvCreateImage( cvGetSize(image) IPL_DEPTH_32F 1 );
cvInitUndistortMap(
intrinsic
distortion
mapx
mapy
);
IplImage *t = cvCloneImage(image);
cvRemap( t image mapx mapy );
//GET THE CH
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 318467 2016-01-14 13:18 鸟瞰图变换\鸟瞰图变换\0.jpg
文件 636 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\cl.command.1.tlog
文件 16168 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\CL.read.1.tlog
文件 408 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\CL.write.1.tlog
文件 2984 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\li
文件 6758 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\li
文件 710 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\li
文件 107765 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\main.obj
文件 492 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\mt.command.1.tlog
文件 788 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\mt.read.1.tlog
文件 7862 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\mt.read.2.tlog
文件 316 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\mt.write.1.tlog
文件 543744 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\vc100.idb
文件 929792 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\Debug\vc100.pdb
文件 381 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\鸟瞰图变换.exe.intermediate.manifest
文件 84 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\鸟瞰图变换.lastbuildstate
文件 2873 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug\鸟瞰图变换.log
文件 248 2016-01-14 11:00 鸟瞰图变换\鸟瞰图变换\Distortion.xm
文件 267 2016-01-14 11:00 鸟瞰图变换\鸟瞰图变换\Intrinsics.xm
文件 6604 2016-01-14 13:28 鸟瞰图变换\鸟瞰图变换\main.cpp
文件 3361 2016-01-13 15:29 鸟瞰图变换\鸟瞰图变换\鸟瞰图变换.vcxproj
文件 1126 2016-01-13 15:29 鸟瞰图变换\鸟瞰图变换\鸟瞰图变换.vcxproj.filters
文件 409 2016-01-14 11:23 鸟瞰图变换\鸟瞰图变换\鸟瞰图变换.vcxproj.user
文件 912 2016-01-13 15:27 鸟瞰图变换\鸟瞰图变换.sln
..A..H. 15872 2016-01-14 15:25 鸟瞰图变换\鸟瞰图变换.suo
目录 0 2016-01-14 15:24 鸟瞰图变换\鸟瞰图变换\Debug
目录 0 2016-01-14 13:18 鸟瞰图变换\鸟瞰图变换
目录 0 2016-01-14 15:25 鸟瞰图变换
----------- --------- ---------- ----- ----
1969027 28
............此处省略1个文件信息
相关资源
- 批量图像自动分割 opencv grabcut
- Opencv实现特征点提取和匹配
- 基 于OpenCV 的动态背景下的运动目标检
- Ubuntu和Zedboard都可实现的opencv人脸识别
- opencv 人脸识别 代码
-
训练好的车牌检测xm
l - OpenCV 找圆算法(HoughCircles)总结与优
- opencv实现指定目录下多幅图像读取与
- 车牌定位之字符分割
- 编译opencv3.1需要的ffmpeg_version.cmake文件
- LPT变换源码
- CameraHDR.rar
- number.zip
- 机器视觉霍夫圆检测识别木材死节O
- 图像的预处理灰度图、二值化、字符
- 批量处理图片大小
- OpenCV实现相位相关图像配准
- opencv彩色图转换为灰度图并保存
- vgg_generated_80.i
- opencv-图片相似度对比代码-感知哈希算
- opencv2.44附加依赖项
- rk3288平台深度学习框架caffe+opencv环境
-
cascadexm
l.rar - 图片上加文字或者数字opencv
- OpenCV切边案例-01
- 提取二值图像中的最大轮廓OpenCV版
- Opencv 目标检测和识别
- opencv实现特征点的检测与匹配
- Qt魔方还原lesson5-opencv识别颜色
- opencv 标定 带图片
评论
共有 条评论