Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
blellum
blellum's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Mirroring a webcam in a sketch
[5 Replies]
31-Mar-2011 08:06 AM
Forum:
Core Library Questions
We have a few sketches where we want to mirror the webcam - but we are using blend within the sketch, and any mirroring:
// flip image horizonatlly
pushMatrix();
scale(-1,1);
popMatrix();
Doesn't work when we are using blend() to manipulate the live feed - any ideas?
I looked at using an .java file for the capture (from you einstein sketch) - could I run the mirror function in mycapture.java, and if so how?
This is from the gwoptics file which I wish to adapt:
import processing.core.PImage;
import processing.core.PApplet;
import processing.core.PConstants;
import processing.video.*;
public class mycapture {
private Capture cam;
private int _w;
private int _h;
private PImage _img;
public mycapture (PApplet pa, int w, int h) {
_w=w;
_h=h;
cam=new Capture(pa,_w,_h);
}
public PImage get_image(){
cam.read();
PImage tmp=cam.get();
//tmp.filter(PApplet.GRAY);
return tmp;
}
public void stop() {
cam.stop();
}
}
«Prev
Next »
Moderate user : blellum
Forum