Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Re : Flipping Webcam Explanation Please!!

$
0
0
I don't understand how those things work either!
But I believe that after a scale(-1, 1); the math necessary to place an exact mirror of an image is:

image(img, - (originalX + img.width), 0);

In your case, originalX = 0, and img.width = width. So...

image(camera, - (0 + camera.width), 0);
image(camera, - (camera.width), 0);
image(camera, - (width), 0);

image(camera, -width, 0);

Well, that's my guess!  

This post has an example where I did just that:
http://forum.processing.org/topic/wanna-change-direction-with-keypressed

Viewing all articles
Browse latest Browse all 1768

Trending Articles