Week 13

Things I did this week:

  1. Design and build a machine
  2. Documentation

My contribution


This week I mainly worked in the software end where I implemented two algorithms, one for dot image generation, and one for line algorithm.

I also worked on setting up our documentation site, and documented my contributions.

Machine week website

BACK TO TOP

The following is copied from the machine week site documentation that I did.

Image Processing

Catherine mainly worked on image processing.

We wanted an image of Neil's face on the T-shirt. So we started with images of Neil's face.

We followed a few links on different ways for getting edge detections. link1 link2 link3

Cartoonify

We first tried to cartoonify the image. It is achieved using OpenCV.

    The approximate approach is the following:
  1. Grayscale the image
  2. Apply ../imgs/week13n blur to the image and the grayscale image
  3. Apply adaptive threshold to the blurred grayscale image for edges
  4. Use bitwise and to combine filtered image and edges
One interesting thing was that the image from the source is BGR encoded instead of RGB encoded. So it gives the left image with plt.imshow.

Some other methods for edge detection

Other methods are then also explored to find the edges.

Canny
Occlusion edge detection
PIL Filter

Poisson Disc Sampling

We then found out a very cool pattern called halftone.

This fits what we wanted since the bleach drops from the pump.

We used poisson disc sampling to randomly sample dots from the image space, and max pool on the image at the dots to get the dot size.

The code is here.

Poisson Disc Sampling
Sampling Neil
Sampling Neil, but only on edges

Line Algorithm

During testing with bleach, we realized that the drops of bleach will spread too much and it's hard to recover a meaningful pattern using dots.

So we tried to do a line pattern. The edges found were modified to one pixel lines, and the image is then down sampled so that it contains less dots.

The code is here.

Original edge
Thin edge
Downsized edge
Simulated tool path (horizontal lines are side effect of machine moving around)

All code for algorithm's are here.

BACK TO TOP