How can I resize an image with OpenCV ?
Hi I am looking for a way to resizing an image in OpenCV? What is the simplest way to do it?
Hi I am looking for a way to resizing an image in OpenCV? What is the simplest way to do it?
if you use opencv2,you can do like this:
Size size(100,100);//the dst image size,e.g.100x100
Mat dst;//dst image
Mat src;//src image
resize(src,dst,size);//resize image
Hi. Take a look at the resize function in the OpenCV documentation. It contains a description of the function and a small example.
You can use it to resize the image:
IplImage* resizing (IplImage *source) {
IplImage *destination = cvCreateImage ( cvSize(Your favourite width , Your favourite height ), source->depth, source>nChannels );
cvResize(source, destination);
return destination;
}
Asked: May 3 '13
Seen: 356,635 times
Last updated: May 03 '13