// To get orginal image from the OpenFileDialog
Image<Bgr, Byte> captureImage = new Image<Bgr, byte>(openImageFileDialog.FileName);
// To resize the image
Image<Bgr, byte> resizedImage = captureImage.Resize(width, height, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR);
/////////////////////OR///////////////////////
//open the image using open file dialog
OpenFileDialog Openfile = new OpenFileDialog();
if (Openfile.ShowDialog() == DialogResult.OK)
{
Image<Bgr, Byte> imgOriginal = new Image<Bgr, byte>(Openfile.FileName); //Open
Image<Bgr, byte> resizedImage = imgCurrent.Resize(width, height, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR); //Resize
}
Source : http://stackoverflow.com/questions/15052419/how-to-resize-image-with-imagebox-emgucv
No comments:
Post a Comment