AForge.NET

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

BayerOptimized filter class problem

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

BayerOptimized filter class problem

Postby riccio81 » Thu Mar 23, 2017 9:38 pm

Hi everyone !!
I have been working to de-bayer images with the RGGB pattern and i am able to convert it into an rgb 24 bpp image. I spotted it is a 100 ms avarage time consuming process for each image using the styandar Bayer class, so i switched to the BayerOptimized class that is 10 time faster but i can't obtain a right 24 bpp colored images. In fact into the documentation you only have two possible bayer patterns :GRBG and BGGR :-( That is strange couse the standard Bayer class allows you to choise between many standard formats : BGGR, GRBG, RGGB and so on( So is there any way to fix this strange missing ? Any tips :-)))
Thank you in advanced.
riccio81
 
Posts: 7
Joined: Thu Mar 23, 2017 9:09 pm

Re: BayerOptimized filter class problem

Postby andrew.kirillov » Fri Mar 24, 2017 8:07 am

Hello,

riccio81 wrote:So is there any way to fix this strange missing ? Any tips :-)

You just need to extend the optimized version to support RGGB in a similar way it does support GRBG and BGGR.
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: BayerOptimized filter class problem

Postby riccio81 » Fri Mar 24, 2017 9:21 am

Ok i wil try this! But if anyone tried to do this let me know ;)
Thank so much
riccio81
 
Posts: 7
Joined: Thu Mar 23, 2017 9:09 pm

Re: BayerOptimized filter class problem

Postby riccio81 » Fri Mar 24, 2017 4:51 pm

Just for curiosity does anyone know which is the debayering algotitym used in the standard Bayer and BayerOptimized class?
riccio81
 
Posts: 7
Joined: Thu Mar 23, 2017 9:09 pm

Re: BayerOptimized filter class problem

Postby andrew.kirillov » Sat Mar 25, 2017 6:51 pm

The algorithm in use is "homebrew" ;) Basically when I needed to de-bayer images, I just wrote that code. Nothing in particular was followed. It does work somehow, however.
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: BayerOptimized filter class problem

Postby riccio81 » Sun Mar 26, 2017 5:01 pm

I am not asking for the code itself :D but to know if the neighbors , biliniear, bicubic or any other algorithym is used to perform demosaicing. For exmpale BayerOptimized is faster then Bayer maybe due to using of a simpliest algoritym that leads to worst results than Bayer class. Reading the cs file of the BayerOptimized i am not able to recognise a specific algoritym so i can't adjust it to make it works for the RGGB pattern. Can i access the Bayer.cs to investigate futhermore?
Thank so much for your replies!! :)
riccio81
 
Posts: 7
Joined: Thu Mar 23, 2017 9:09 pm




Return to AForge.NET Framework