My sketch is 1024w x 768h, and my camera's output is NTSC 720w x 480h. Is there a possible workaround for scaling the camera's image? Here is an example using the (slightly modified) jmyron simple camera example:
/*
a very simple example that draws the camera pixels
to the screen using the pixel[] array.
last tested to work in Processing 0090
JTNIMOY
*/
import JMyron.*;
JMyron m;//a camera object
int vidw = 720;
int vidh = 480;
void setup(){
size(1024,768);
m = new JMyron();//make a new instance of the object
m.start(vidw,vidh);
m.findGlobs(0);//disable the intelligence to speed up frame rate
println("Myron " + m.version());
}
void draw(){
m.update();//update the camera view
int[] img = m.image(); //get the normal image of the camera
loadPixels();
for(int i=0;i<vidw*vidh;i++){ //loop through all the pixels
pixels[i] = img[i]; //draw each pixel to the screen
}
updatePixels();
}
void mousePressed(){
m.settings();//click the window to get the settings