AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

RGB filtering

The forum is to discuss topics related to different areas of image processing and computer vision.

RGB filtering

Postby prodigyaj » Sun Mar 22, 2009 6:14 pm

Hey all ,

I wanted to know how exactly do i achieve RGB filtering. I have tinkered with the color filter option but icouldnt get the required results !!

I have uploaded a jpeg file and want to know how to achieve the exact filtering on the left from the image on the right ?

Currently i am achieving as shown in current.jpg !!

the filter code i m using is

ApplyFilter(new ColorFiltering(new IntRange(0, 150), new IntRange(0, 120), new IntRange(120, 230)));

Kindly suggest !!

Regards

AJ
Attachments
current.JPG
current.JPG (9.38 KiB) Viewed 10445 times
untitled.JPG
untitled.JPG (41.02 KiB) Viewed 10445 times
prodigyaj
 
Posts: 13
Joined: Mon Mar 16, 2009 12:37 pm

Re: RGB filtering

Postby andrew.kirillov » Mon Mar 23, 2009 7:06 am

Hello,

prodigyaj wrote:I have uploaded a jpeg file and want to know how to achieve the exact filtering on the left from the image on the right ?

Please, refer to file names. As for me I have two images - one on top of another. So no left and right. Or may be you need to describe clearly your problem.

If I correctly understood you, then what you want is the "untitled.JPG"??? Do you want to get from color picker dialog a filtered image, which is shown on the left of "untitled.JPG"

If it is so, then I think ChannelFiltering filter may be more helpful. Set green and red channels to filter out completely, so they will go away. And for blue specify the range you like. IPLab may help in experimenting.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: RGB filtering

Postby prodigyaj » Mon Mar 23, 2009 12:39 pm

My aplogies for not putting up the question correctly !!

I did try channel filtering but nuthing that could get me close to this !!
prodigyaj
 
Posts: 13
Joined: Mon Mar 16, 2009 12:37 pm

Re: RGB filtering

Postby andrew.kirillov » Mon Mar 23, 2009 1:33 pm

Where did you get that sample image from which you try to mimic? What was done in that unknown software which produced such result?
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: RGB filtering

Postby prodigyaj » Mon Mar 23, 2009 1:49 pm

The software used is Robo Realm.

It just had a plain RGB filter where in it had options to select the color. That output is obtained when I select blue !

Heres the link to that site http://www.roborealm.com/

Its free to download for hobbyists and educational purposes.

Regards

AJ
prodigyaj
 
Posts: 13
Joined: Mon Mar 16, 2009 12:37 pm

Re: RGB filtering

Postby prodigyaj » Mon Mar 23, 2009 8:18 pm

Hey all ,

I got the formula thanks to the site i gave !!
replace the current pixel with (0,0,0((B-R)+(B-G))

Another question is how can that specific condition be achieved in aforge ?

Regards

AJ
prodigyaj
 
Posts: 13
Joined: Mon Mar 16, 2009 12:37 pm

Re: RGB filtering

Postby andrew.kirillov » Tue Mar 24, 2009 9:00 am

prodigyaj wrote:Another question is how can that specific condition be achieved in aforge ?

Since AForge.NET Framework does not have exactly the same routine, you may need to create your own filter inheriting from BaseInPlacePartialFilter, for example.

Other than that it is hard to help you, since it is not clear what you want to get. Yes, you've showed an image and said "I want something like this". But this does not give a clue about your final goal. Maybe there exists other ways to the goal. But we don't know, since the goal is not known.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to Image Processing and Computer Vision