This was the basic "get to know you graphic format and
get in the swing of dealing with it" lab. The problems were not
particularly difficult, nor were they particularly profound, but they
provided a good introduction to working with PPMs.
Our assignment was two fold. First, generate some fractals. Second, put
yourself into some images. I was despairing about a creative way to do
this until Google Images came
to the rescue...
How big is the picture of yourself (pixel width and height)? How did you determine this?
The picture is 2560x1920 (which is really far larger
than I have any good use for...) I discovered this by opening it in
XnView (a paint program).
Where is the origin of an image--pixel (0, 0)--when you manipulate it in your code? How did you determine this?
The origin is the upper-left corner of the image. I
knew this ahead of time, because a friend of mine from highschool once
warned me about this pitfall when working with images, also I
remembered it from vision...
How did you replace the blue pixels in your picture? How well did your replacement method work?
I tried a couple of different methods that all
centered on the most common pixel color. The least effective of these
was a square sum difference of normalized color channel distances. I
got better results by allowing a range on either side of each color
channel, but this allowed for one color channel to be too dark while
another was too light. The method that I ended up using test for
strictly less than, but in range, with a slight upper fudge, or
strictly greater than, but in range, with a slight lower fudge. This
worked pretty well for everything but my hair. I spend a while working
on that but could not get it to cut the wisps without mangling the
body.
Was there any "blue-spill" in your image?
This worked pretty well for everything but my hair. I
spend a while working on that but could not get it to cut the wisps
without mangling the body.
How would you do it better?
I would have to spend some time, analyzing the colors
and then come up with a new system for threshholding things out. Perhap
treating individual color channels seperately...
How did you creatively insert yourself in an image? For this question, write down the equations you used.
I tried to implement feathering, but could not find
constant values that would take eliminate my "halo" without washing out
much of the rest of the image too...
I simply placed scaled images of myself at the coordinates I wanted
them to be. I am not quite sure what equations you want, since that was
just nested for loops with bounds checking. It occurs to me that you
may have wanted me to resize the image myself. Although I did not do
that here, I did that two years ago using a fairly simple algorithm:
Partition image into squares which map to pixels.
foreach square to be shrunk:
Average color of square
Make pixel in new image that color
Also, I wrote something to watermark an image based on another image
and an alpha value.

The other image I did just slips me into a Dali painting.

Also for those who are interested, I have a "nice" MFC
GUI built around this stuff too. (It has only been tested on my
Win2k machine so far...
)
What part of the Mandelbrot set did you find the most interesting?
The truth is that I had a bit of trouble initially
finding an interesting bit of this set. I added the zoomTo() functions
so that I could track down something more easily. Whereas with the
Julia set, I stumbled upon an interesting section almost imediately...
Also I have seen the Mandelbrot set many more times than the Julia set,
so I found it less intersting...
What coloring schemes did you experiment with, and which did you like the best?
I am a fan of simplicity and as such prefer the basic
iteration -> intensity map, with a single color.
Fractal Images
| Julia with c = 0.7454054 + i*0.1130063 -0.5 < x < 0.5 -0.5 < y < 0.5
|
Mandelbrot from afar -0.5 < c_real < 0.5 -0.5 < c_imaginary < 0.5 |
| Julia with c = 0.7454054 + i*0.1130063 -1.5 < x < 1.5 -1.5 < y < 1.5 |
Mandelbrot from anear -0.341 < c_real < -0.331 -0.056 < c_imaginary < -0.046 ![]() |
Last modified 2003-10-07 22:15 EST
