用 opencv 输出多幅图片函数实现
2008-10-30 01:46
There is no inbuilt support to display more than one image in
OpenCV. Here is a function illustrating how to display more than one
image in a single window using Intel OpenCV. The method used is to
set the ROIs of a Single Big image and then resizing and copying the
input images on to the Single Big Image.
This paper comes
from :http://opencvlibrary.sourceforge.net/DisplayManyImages.
#include <cv.h>
#include <highgui.h>
#include <stdio.h>
#include <stdarg.h>
/*Function///////////////////////////////////////////////////////////////
Name: cvShowManyImages
Purpose: This is a function illustrating how to display more than one
image in a single window using Intel OpenCV
Parameters: char *title: Title of the window to be displayed
int nArgs: Number of images to be displayed
...: IplImage*, which contains the images
Language: C++
The method used is to set the ROIs of a Single Big image and then
resizing
and copying the input images on to the Single Big Image.
This function does not stretch the image...
It resizes the image without modifying the width/height ratio..
This function can be called like this:
cvShowManyImages("Images", 2, img1, img2);
or
cvShowManyImages("Images", 5, img2, img2, img3, img4, img5);
This function can display upto 12 images in a single window.
It does not check whether the arguments are of type IplImage* or