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
This seems not possible without implementing an operation with a
specific calculation :
intermediate[n] += weight * (log (input[n] + 1.) - log
3. The next step would be another specialised op that performs :
logl = log(intermediate + intermediate +
intermediate + 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 :
implemented steps 1..3 of first apporach within the process
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
[Video For Linux]
[Gimp on Windows]