OPENCV



Name copy()
Examples copy
import hypermedia.video.*;

OpenCV opencv;

size( 120, 160 );
opencv = new OpenCV(this);
opencv.allocate(width,height);                        // create the bufer
opencv.copy("niolon.jpg");                            // copy the image in its entirety into buffer
opencv.interpolation(OpenCV.INTER_NN);                // set the interpolation method
opencv.copy("niolon.jpg",50,70,20,20,20,20,80,80);    // copy a part of the image into buffer
image( opencv.image(), 0, 0 );                        // show buffer

Description Copy the image (or a part of it) into the current OpenCV buffer (or a part of it). Resizing allowed. Note: any alpha channel will be ignored.
Syntax copy(image);
copy(file);
copy(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight);
copy(file, sx, sy, swidth, sheight, dx, dy, dwidth, dheight);
copy(pixels, step, sx, sy, swidth, sheight, dx, dy, dwidth, dheight);
Parameters
image PImage : the image to copy into buffer
file String : the filepath of the image to copy into buffer
pixels int[] : the image data
step int : the width of one horizontal line of pixels
sx int : the source x coordinate
sy int : the source y coordinate
swidth int : the source width
sheight int : the source height
dx int : the destination x coordinate
dy int : the destination y coordinate
dwidth int : the destination width
dheight int : the destination height
Return None
Usage Application