Helf Detection

I don't know if there are other English to Sindarin dictionaries out there but mine doesn't have 'skin' on it so I just went with the closest word - 'fur' which is Helf in Sindarin.

Anyway -
I rarely talk about about the wonders that my magical laptop do whenever I find the motivation to start programming after a long streak of spouting profanity to the ends of the earth thanks to back to back to back to back to back to...to back to back segmentation faults. Anyway I wouldn't  be posting this if it wasn't funny. I dunno. I'm bad at jokes and the moment has passed.
Probably.

One of the major subjects I'm taking this semester is CMSC 165 - Digital Image Processing. The course title is pretty self explanatory so people with knowledge in programming should know what kind of lessons and exercises we have every week. For our eighth lab exercise we have Skin Detection. The objective is, well, to detect skin color and output the resulting image given an input image. There are plenty of methods that can be used to tackle the exercise such as contours, edge detection and such. I went with the cropped image approach.

I'm not really sure if that is what it's called. 
Anyway for that approach two inputs are needed: the actual image file to be used to detect the skin, and an image cropped from the original. The cropped image is used to create a histogram per color channel and the most frequently occurring intensity is taken as basis for each color channel in the actual image. Basically if the intensity for each color channel per pixel in the actual image is within the given range the pixel in the output image is colored, if not either color it black (0) or white (255).

There was a dilemma here, though. Are the conditions connected or are they independent of each other? If the conditions are connected then the pixel is only colored if the blue, green, AND red color channels are all within the given range of their respective frequency taken from the histogram of the cropped image. If they are independent of each other then the pixel is colored iff the intensity is within range regardless of the other color channels. So if pixel_blue_intensity is within the range of the most frequent blue intensity taken from the histogram of the cropped image then the corresponding pixel of the output image is colored in the same intensity as the blue intensity of the pixel in the input image.

I'm sure I didn't explain it properly. That's not the point of this post anyway.

So going back to the last sentence of the fourth paragraph of this post the output greatly differs depending on the color given to the pixel that is not within the given range.

If the pixels not within the range are colored white:
The output is a nice and peaceful group of people covered in the blessed and blinding white light of Celestia. They are all smiles, obviously happy. No worries in the world. It's also reminiscent of the happy days immortalized in the photo. Bliss, as they say.

And when the pixels not within the range are colored black...well:
Good goddesses. Which circle of inferno did this spawn crawl out from?

If you stare long enough...
...they stare back at you.

Comments