hi. just wondering if anyone has had any success with trying to rotate the camera object around a global axis [ 3d orbit],
have been banging my head against the wall on this one, any help would be really appreciated. thanks Gareth
hey there, as with my previous posts... I'm still a beginner trying to slowly figure out processing. I'm
building a sketch for a 3d head tracking piece, Im using opencv face tracking to control objects, that
move in 3d space relating to head poistion. Using others bits of code, and examples ive managed to get
a simple example working, what im really noticing is the jumpiness if the readings.
Im trying to work out how the data can be smoothed, ive been trying to figure out how i can average
the readings for x,y,z values so the movement is interpolated between each points.
Any ideas on how to best do this... and feedback would be appreciated, the code is as listed below.
Thanks,
Gareth Bale
P.S apologies for the messy code... im still learning to drive..
float z = 0; // DEFINE declare ALL THE FLOATS AND STARTING POINTS
float camX = 0;
float camY = 0;
float camZ = 1000.0;
float camCenterY = 0;
float camCenterX = 0;
float camCenterZ = 0;
float a = -500;
boolean changedir = false; // DEFINE BOOLEAN ARG
float linerotone = 0;
float linerottwo = 0;
int side = 0;
float tr;
float maxZ = 2000.0;
void setup() {
size(1024, 768, OPENGL); // SET UP THE OPEN GL RENDERER
opencv = new OpenCV( this ); // DEFINE OPEN CV AS THIS ONE
opencv.capture( width/4, height/4 ); // open video stream
opencv.cascade( OpenCV.CASCADE_FRONTALFACE_ALT_TREE ); // load detection description, here-> front face detection : "haarcascade_frontalface_alt.xml"
fill(204);
frameRate(30);
smooth();
// Create the fullscreen object
fs = new FullScreen(this);
// enter fullscreen mode
fs.enter();
}
void draw() {
background(0);
opencv.read(); // grab images from THE CAMERA
opencv.convert( GRAY );// convert image to gray scale
Rectangle[] faces = opencv.detect( 1.2, 2, OpenCV.HAAR_DO_CANNY_PRUNING, 60, 40 ); // detect face
//image( opencv.image(), 400, 400 );// draw the image at set position.
Hi. I was wondering if any one had tried rendering out a 3d scene simultaneously to two viewports from two camera's.
Im quite new to processing, so am not sure where to start, if any one has any suggestions, would be great, if i make any headway, i will pop the code up here. thanks