Tags

,

Here is the script that I developed for Gimp, to bring out details in the image. The steps are as follows, in case you wish to try them out individually, instead of using the script

  • Duplicate the layer (producing a new layer above it).
  • De-saturate the new layer.
  • Apply a Gaussian blur to the result, with a large radius (100 or more).
  • Set Mode in the Layers dialog to Divide.
  • Control the amount of correction by adjusting opacity in the Layers dialog, or by using Brightness/Contrast, Levels, or Curves tools on the new layer.
  • When you are happy with the result, you can use Merge Down to combine the control layer and the original layer into a single layer.

Here is the script

;; -*-scheme-*-
;;
;; Gimp script to 'bringing out the maximum amount of detail across all areas of an image'
;;

(define (script-fu-bp-bring-out-detail theImage drawable blurValue opacityValue deleteDivideLayer mergeLayers)
  ; step one - create a new layer, apply gaussian blur and set mode to 'grain extract'
  ; Create a new layer
  (define layerDivide (car (gimp-layer-copy drawable 0)))
  ; Give it a name
  (gimp-item-set-name layerDivide "Divide Layer")
  ; Add the new layer to the image
  (gimp-image-insert-layer theImage layerDivide 0 0)

  ; Call a plugin to blur the image
  (plug-in-gauss-rle 1 theImage layerDivide blurValue 1 1)

  ; Set the layer mode to 'Divide'
  (gimp-layer-set-mode layerDivide DIVIDE-MODE)
  ; Set opacity to provided value
  (gimp-layer-set-opacity layerDivide opacityValue)

  ;(gimp-image-set-active-layer theImage theLayer)

  (if (= deleteDivideLayer 1)
    (begin
      (gimp-image-remove-layer theImage layerDivide)
    )
  )

  (if (= mergeLayers 1)
    (begin
      (set! drawable (car (gimp-image-merge-down theImage layerDivide 2)))
    )
  )

  (gimp-displays-flush)   
)

(script-fu-register
  "script-fu-bp-bring-out-detail" ; script name
  "/Filters/BP/Bring out details ..."
  "Bring out details" ; description
  "BP" ; author
  "(c) 2016, BP" ; copyright notice
  "Nov 2016" ; date created
  "*" ; image type the script works on
  SF-IMAGE "Image" 0
  SF-DRAWABLE "Drawable" 0
  SF-ADJUSTMENT "Blur Value" '(5 0 100 1 10 0 1)
  SF-ADJUSTMENT "Opacity %" '(50 0 100 1 10 0 1)
  SF-TOGGLE "Delete Screen Layer?" FALSE
  SF-TOGGLE "Merge Layers?" FALSE
)

;
; end
;

Links

Advertisements