I took a course in Medical Image Processing and coded up some of the assignments in Javascript. All relevant code is provided on the links below.

Here is an example of rotating an image using linear interpolation and via nearest neighbor. In the same link is an example of using the Sobel Operator to enhance edges.

example1

Here I show examples of edge tracing via 4 and 8 connectivity.

example2

This shows examples of erode, dilate, and find the area of binary image. Erosion can be described as all the points in set A that any shift of set B is contained within A. Here’s a description from wikipedia. erosion

example3

This last example shows an example of calulating the Hough Transform to find circles and calculating the Haar wavelet.

example4