An improved version of that image mirroring program I made awhile back. This one allows you to select the line of symmetry, rather than always having it be at the center of the image. Left-clicking sets the line of symmetry. Right-clicking changes the location of the zoom-box and the left/right keys nudge the line of symmetry one pixel to the left or right, if you want more precision.
It gets kinda slow if you try using it on larger images, so smaller images will yield quicker results.
A java applet and Processing source code can be found here.
Here is the completed room mapping final project! Since last time, I’ve added a very useful smoothing option that makes the plot look less like a bunch of random jagged edges and more like a recognizable shape. There’s also an option to choose different types of shapes to plot with, which makes for some pretty artsy-looking results. It is surprisingly fun to play around with the smoothing options, textures, and shape types, as you can see me doing in the video.
The Arduino/Processing source code can be found here, and if you just want to play around with the plotting program (I’ve included some sample files), you can download an exe file here. You’ll need the ControlP5 library if you want to modify/run the Processing code (not necessary for the exe).
Here’s a follow-up to the previous room mapping post. The scanning process is more efficient now, with less wasted movements (and thus faster scanning). Rather than going all the way back to the beginning of a column (for lack of a better term) and scanning down every time the end is reached, it just starts scanning from the bottom up.
The program has been improved too. Aside from the pretty menus (made using ControlP5) and graphical options such as color changing, I’ve added a function that checks the ratio between every side of every quadrilateral. If the ratio between any two sides exceeds a certain threshold (chosen by the user), the quadrilateral isn’t drawn. This makes it so that you don’t have a bunch of really long quadrilaterals connecting points that aren’t actually even connected in reality (see the old video for an example).
My final project for the Arduno microcontroller class is this 3D room mapping thing. It still needs some work but here’s basically what it looks like. An ultrasonic distance sensor is mounted on a servo (which is mounted on another servo), and records the distance of objects located at various angles. Two angles and a distance from the center make up a spherical coordinate system, and those coordinates can be plotted.
The source code for Running Marisa can be found here.
Included with the Arduino GLCD library is a Processing program by Michael Margolis that converts an image into a header file that you can include in your Arduino sketch to display bitmaps using GLCD.DrawBitmap(). It’s pretty convenient, but what if I wanted to include lots of bitmaps, to be used as frames of an animation? I’d have to generate the header files one by one and include all of them, then define some arrays to point to the different frames.
I decided to modify the program to accept a folder as an input, and the output would be a single file containing the headers for all of the files in the array. In addition, at the very end of the file, a pointer array is declared, with each entry in the array pointing to the address of each image. The length of the array is also stored as a variable.
You can download the Processing file and java applet here.
I made a program for @bitmapchaos that takes an image and creates two mirrored image files (images are mirrored across the horizontal center of the original image) in the same folder. You can download a java app here, and the Processing source code is in the full post.