Tuesday, September 2, 2014

Pixel Filtering using AForge .Net

This blog explains how to get the hue, saturation and luminance values of objects of our interest by filtering the unwanted pixels. To achieve this I am using HSLfilter class in the Aforge .Net framework.

Input Image:




Now I am going to find the blue colored rectangle from the input(video) image.

By adjusting the Hue, Saturation and Luminance track bars we can filter out the pixel which we don't want.

Output Image:


By clicking the "update Values" button the Hsl values will be updated in the texbox.If you want to save the Hsl values click the "Save Settings" button the "Save As" dialog will appear then choose the location and give the file name then save it.

Code behind for Hslfiltering method:



Code Behind for TrackBar:



Download the full Source code from here: ColorFiltering

Click here for my previous blog.

Happy Coding.


No comments:

Post a Comment