Ask Your Question

Revision history [back]

I hope this helps :)

include <stdio.h>

include "cv.h"

include "highgui.h"

int main() {

IplImage *img=NULL; //pull picture in //for reading image
img=cvLoadImage("test.jpg"); //image path, put in the proj folder
IplImage *smallImage=cvCreateImage(cvSize(50,50),img->depth,img->nChannels);
IplImage *largeImage=cvCreateImage(cvSize(256,256),img->depth,img->nChannels);

cvShowImage("Test",img);// put it on top


cvResize(img,smallImage);
cvResize(img,largeImage);
cvShowImage("Large",largeImage);
cvShowImage("Small",smallImage);

cvWaitKey(0); cvReleaseImage(&img); return 0; }


I hope this helps :)

:) #include <stdio.h> #include "cv.h" #include "highgui.h" int main() {

include <stdio.h>

include "cv.h"

include "highgui.h"

int main() {

 IplImage *img=NULL; //pull picture in //for reading image
 img=cvLoadImage("test.jpg"); //image path, put in the proj folder
 IplImage *smallImage=cvCreateImage(cvSize(50,50),img->depth,img->nChannels);
 IplImage *largeImage=cvCreateImage(cvSize(256,256),img->depth,img->nChannels);
  cvShowImage("Test",img);// put it on top
  cvResize(img,smallImage);
 cvResize(img,largeImage);
 cvShowImage("Large",largeImage);
cvShowImage("Small",smallImage);
    cvShowImage("Small",smallImage); cvWaitKey(0); cvReleaseImage(&img); return 0; }

cvWaitKey(0); cvReleaseImage(&img); return 0; }