OpenCV
index
 
Name loadImage ( )
Examples
OpenCV image

import hypermedia.video.*; size( 200, 200 ); OpenCV opencv = new OpenCV( this ); opencv.loadImage( "niolon.jpg", width, height ); // fit OpenCV image to the PApplet size image( opencv.image(), 0, 0 ); // display OpenCV buffer image( loadImage("niolon.jpg"), 0, 0); // show image source
Description Loads an image from the specified file.

Currently the following file formats are supported:

  • Windows bitmaps - BMP, DIB
  • JPEG files - JPEG, JPG, JPE
  • Portable Network Graphics - PNG
  • Portable image format - PBM, PGM, PPM
  • Sun rasters - SR, RAS
  • TIFF files - TIFF, TIF

note : this method automatically update previous memory allocation

Syntax
loadImage(file);
loadImage(file, width, height);
Parameters
file   String : the name of file to be loaded
width   int : the destination image (buffer) width size
height   int : the destination image (buffer) height size
Returns None
Usage Web & Application
Related