分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
这个以前的时候,采取的是把要显示的图片copy到一张大图片上去~ 这个也忒麻烦了点
然后 在 http://download.csdn.net/detail/zhazhiqiang2010/3614993#comment 这里发现一个好用的代码。。。。
感谢上传者,记录在这里只为了以后方便使用~~~
#include <cv.h>#include <highgui.h>#include <stdio.h>#include <stdarg.h>#include <time.h>#include <iostream>#pragma comment(lib, "cv.lib")#pragma comment(lib, "cxcore.lib")#pragma comment(lib, "highgui.lib")void cvShowManyImages(char* title, int nArgs, ...) { // img - Used for getting the arguments IplImage *img; // DispImage - the image in which input images are to be copied IplImage *DispImage; int size; int i; int m, n; int x, y; // w - Maximum number of images in a row // h - Maximum number of images in a column int w, h; // scale - How much we have to resize the image float scale; int max; // If the number of arguments is lesser than 0 or greater than 12 // return without displaying if(nArgs <= 0) { printf("Number of arguments too small....\n"); return; } else if(nArgs > 12) { printf("Number of arguments too large....\n"); return; } // Determine the size of the image, and the number of rows/cols from number of arguments else if (nArgs == 1) { w = h = 1; size = 300; } else if (nArgs == 2) { w = 2; h = 1; size = 300; } else if (nArgs == 3 || nArgs == 4) { w = 2; h = 2; size = 300; } else if (nArgs == 5 || nArgs == 6) { w = 3; h = 2; size = 200; } else if (nArgs == 7 || nArgs == 8) { w = 4; h = 2; size = 200; } else { w = 4; h = 3; size = 150; } // Create a new 3 channel image0 DispImage = cvCreateImage( cvSize( 100+ size*w, 60 + size*h), 8,