float percent = 50.0; IplImage *source = cvLoadImage("bigImage.jpg"); IplImage *destination = cvCreateImage( cvSize((int)((source->width*percent)/100) , (int)((source->height*percent)/100) ),source->depth, source->nChannels ); //use cvResize to resize source to a destination image cvResize(source, destination); // save image with a name supplied with a second argument cvSaveImage( "resizeImage.jpg", destination );
3/17/2014
OpenCV Study, cvResize function
Subscribe to:
Post Comments (Atom)
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
OpenCV LUT example source code ... int LUTexample () { Mat img = imread( "AbyssCGI2.jpg" ); Mat lookUpTable( 1 , ...
-
fig 1. Left: set 4 points (Left Top, Right Top, Right Bottom, Left Bottom), right:warped image to (0,0) (300,0), (300,300), (0,300) Fi...
-
To install the language pack for vs 2013, it made things worse. The error message "window program compatibility mode is on. turn i...
-
This example source code is to extract HOG feature from images. And save descriptors to XML file. The source code explain how to use HOGD...
-
# Step 1: Define and train a simple PyTorch CNN model import torch import torch.nn as nn import torch.optim as optim import torchvisi...
-
Complete Tutorial: LabelMe with Login System and Dataset Management This guide provides step-by-step instructions for setting up LabelMe wit...
-
This post is about how to copy Mat data to vector and copy vector data to Mat. Reference this example source code. printf ( "/////...
No comments:
Post a Comment