Echoing what the other comment said, blurring and setting as Divide has never occurred to me. I just tried it and it does a very good job at leveling. Nice one.
The radius of 50 was too large. Reason being: I'm used to working with much higher resolution scans, and without high contrast shadows across them. A blur radius of around 15 does a good job of eliminating the shadow edge in this image after the divide. What we're basically doing is a high pass filter. The radius of 50 is too low a frequency; it lets through the shadow edge noticeably.
By the way, here is a useful trick: blurred layer in Divide mode, plus vary the opacity. You can reduce the amount of contrast between light and dark areas in an image without completely leveling it. Works well with low opacity levels (just a slight blend of the Divide mode layer). If you have a picture with areas that are too dark and too bright, a touch of this can help. High radii tend to work well, with blends of up to 20% or so.
For me, this does what I want Retinex to do! Only better, with intuitive control parameters and predictable results.
Just came up with an improvement to the above: Divide by Blur, with 0-20% blend. However, not over the RGB image, but only over its its L (lightness) channel in a LAB colorspace separation. Then, recompose. That looks really natural for brightening the shadows and reducing highlights.
Look at the picture of the little girl peering out of the back window of a truck on NASA's Retinex page, as enhanced by Retinex:
The reflection in the glass is brought out in a less cheesy way that you might not guess is the result of processing, if you don't already know.
I did a decompose of the image to the LAB color space (Colors/Components/Decompose...). Then
I used a blur radius of 200 pixels on a copy of the L layer. Put into Divide mode and blended at a bit over 30%, and recomposed from LAB back to the original RGB image.
(That's a simplification; of course I had to struggle with Gimp to preserve the ID of the L layer, which is destroyed by a straight "merge layer down" after which the recompose operation fails with an error. I in fact made two copies of the L layer, and did the processing and merge operation between those two copies. Then I did a select all to copy the resulting layer to the clipboard and pasted that into the original L layer to replace it.)
By the way, here is a useful trick: blurred layer in Divide mode, plus vary the opacity. You can reduce the amount of contrast between light and dark areas in an image without completely leveling it. Works well with low opacity levels (just a slight blend of the Divide mode layer). If you have a picture with areas that are too dark and too bright, a touch of this can help. High radii tend to work well, with blends of up to 20% or so.
For me, this does what I want Retinex to do! Only better, with intuitive control parameters and predictable results.