Gegl Operation : Retinex

ForumsFor GEGL developers (read-only) ► Gegl Operation : Retinex

Sent: 2010-07-29 16:08:37 UTC (over 1 year ago)

From: Geert Jordaens

Gegl Operation : Retinex

hello,

I'm trying to port the retinex operation of gimp to a Gegl operation and
facing following problems.

First approach :

1. a GeglOperationMeta
since the
Retinex algorithm depending on the parameters needs multiple
blurred images (gegl:gaussian-blur).

2. The difference between the original image and each of the
blurred images have to be summed an result in an intermediate image.
This seems not possible without implementing an operation with a
specific calculation :

intermediate[n] += weight * (log (input[n] + 1.) - log
(blur[n]))

3. The next step would be another specialised op that performs :

logl = log(intermediate[0] + intermediate[1] +
intermediate[2] + 3.)
dest[n+i] = (gain * ((log(alpha * (input[n]+1.)) - logl) *
intermediate[n]) + offset);

4. Finally the values have to be corrected with the variance and
mean calculated on the whole image.

Second approach :
GeglOperationAreaFilter
implemented
steps 1..3 of first apporach within the process method.
The same problem for step 4.

Any suggestions on :

How to go with step 4 since the operations process method can only
calculate a mean and variance for its ROI?

Additional observation for Retinex and Gaussian Blur if the value of
scale/stdev is equal or bigger then the default size of the gegl ROI
then way the splitting in smaller chunks becomes a bottleneck. If the
extra area needed around the ROI is important in respect to the ROI what
kind of operation should be used?

_______________________________________________
Gegl-developer mailing list
Gegl-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gegl-developer

Welcome!


Lost password?

Not a member? Sign up!

Random tutorials | Latest tutorials

  1. Hot Wallpaper with Flames Hot Wallpaper with Flames 52
  2. Generate a stripe-like texture Generate a stripe-like texture 6
  3. Create a shocking sphere/ball Create a shocking sphere/ball 20
  4. Create futuristic looking tech pattern Create futuristic looking tech pattern 12

Latest comments

But I just have 1 more prob (bear with me) I am really having troub... (2 days ago in [AVATAR] Become a real Na'Vi using GIMP!)

I got it to work :) I had to close the image and restart it. I thin... (2 days ago in Create cool rifts with translucent lights!)

there was a second and 3rd release of 2.6.12. we included the lates... (2 days ago in Last stable 2.6 release: 2.6.12 has arrived)

Poll

Is GIMP an adequate application for you to create printed graphics like flyers, advertisments etc?

Latest forum activities

Your Ad Here

facts & numbers

gimpusers.com RSS feed

48 identi.ca followers
750 Twitter followers

powered by bitfire it services