A pixelated mirror which reflects whatever is in front it, based on its shade.
How It Works
The patch given by Prof is quite complex so I tried to slice them into different parts as I studied them one at a time.Step 1 : Open Camera & Digitize Video
First step is to grab the camera.
Step 2 : Pixelate
Next is to pixelate the video and break it into 4 parts which will be used as ‘regions’ for the next step.
Step 3 : Specify Regions
Instead of using parts of the videos, I decided to use different colours instead as my grey levels. The srcdimstart and srcdimend attributes move data around in the matrix, creating an illusion as if the image is moving around.
Step 4 : Place Videos on Pixel
To me, this is the most complex part of the whole patch. uzi is used to count from 1 to 40 and calculate the bounding box. After placing videos on the ‘pixels’, everything are brought together into a single object to display the final result.
As mentioned before, this patch is quite complicated due to the calculations made. I am fine with part 1 to part 3 but am still not sure with some of the functions done in part 4.
Note to self : Tutorial 14 Matrix Positioning