Perfect,
Remember to update the wiki too..
the division by zero occours only when someone try to make a white
balance passing as supposed white a color with a zero channel.
Such a choice seems me meaningless. silently clamp each channel to the
[1..255] range and add a comment.
cheers
P.
PS
PLEASE avoid commits without comments. And that holds for everyone here
around....
Francesco Tonarelli wrote:
> Hi Paolo,
>
> I'm going to commit the feature that you request me today, about white
> balance. Get a look, it seems to work fine.
> Doing that work I saw that, in some cases, the code could encounter a
> division by zero, for example when the color used to correct the white
> has a component to 0...
> I try some of this cases and the app does't crashes (strange, it
> should...) but I thing the result is anyway incorrect.
> How do you want that I fix this bug? replacing zeros with 1? is it
> wise? I think so, because a component less then 1 leads to a
> correction factor greater then 255, and it will be clamped anyway...
>
> let me know your strategy and I'll modify soon.
>
> comments to the code will be provided asap.
>
> cheers.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Meshlab-devel mailing list
> Mes...@li...
> https://lists.sourceforge.net/lists/listinfo/meshlab-devel
>
--
Paolo Cignoni -- Senior Researcher
Visual Computing Laboratory - ISTI - CNR
http://vcg.isti.cnr.it/~cignoni
ISTI - CNR
Via Moruzzi 1,
56124 Pisa
ITALY
|