08/01/31 20:41:03 .net
長文失礼します。
proce55ingでカメラ画像の左右反転って可能でしょうか?
下のコードでウェブカメラの画像は表示できるのですが・・・
for文の中をいじれば可能なんでしょうか?試行錯誤したのですがうまくいきません。
どなたか詳しい方ご教授願います。
import processing.video.*;
Capture camera;
void setup(){
size(320,240);
camera = new Capture(this,320,240,12);
loadPixels();
camera.loadPixels();
}
void draw(){
for(int y=0 ; y < height ; y++){
for(int x = 0; x < width ; x++){
int pos = (y * width) + x;
pixels[pos] = camera.pixels[pos];
}
}
updatePixels();
}
void captureEvent(Capture camera){
camera.read();
}