Friday, 13 April 2012

Image Processing in C++

This evening, I've been playing about in code, I was looking for some method of rasterizing bitmap data to an off screen surface and saving it to disk, I settled on using CImg in the end, and my first task was to perform some grey scale conversions.

I started with this image, which I got from a google search, and I moved onto implementing averaging grey scale:

This is (r + g + b) / 3, simple....

I also implemented a scaling based on luminosity and another on min-max averaging...  Here are the results...

There are subtle differences when you zoom into these images, the last one the Luminosity one is the clearest when you inspect it carefully, and so I used that to start implementing some Sobel mask edge detection.  Here's the output of my implementation...

Right now I'm going to bed, but I'm tempted to tidy my code and post it here in the Public domain, I'm sure I've seen some degree level image processing modules based on this, any universities out there want to give me coarse credit?


  1. hello there and thank you for your information – I
    have definitely picked up anything new from right here.
    I did however expertise several technical points using this site, as I experienced to reload the web site a lot of times previous to I could get
    it to load properly. I had been wondering if your hosting is
    OK? Not that I am complaining, but sluggish loading instances times will
    often affect your placement in google and could damage your quality score
    if ads and marketing with Adwords. Anyway
    I'm adding this RSS to my e-mail and could look out for a lot more of your respective fascinating content. Make sure you update this again soon.
    my page: garvalin shoes

    1. Meah, it's been two years and I just spotted this reply... I hope the OP is ware Blogger (the host of this site) is google... So talk to them.

  2. This comment has been removed by a blog administrator.