Using ScriptFu in the GNU Image Manipulation Program

  • Slides: 14
Download presentation
Using Script-Fu in the GNU Image Manipulation Program to Automate “Smart” Sharpening Benjamin Bucior

Using Script-Fu in the GNU Image Manipulation Program to Automate “Smart” Sharpening Benjamin Bucior <ben. bucior@gmail. com> Northwest Guilford High School, Greensboro, NC Summer Ventures in Science and Math Visual and Image Processing Rahman Tashakkori and Jere Miles Appalachian State University July 28, 2007 1

Background/Objectives • Gimp- GNU Image Manipulation Program – Free, open-source, similar to Photoshop •

Background/Objectives • Gimp- GNU Image Manipulation Program – Free, open-source, similar to Photoshop • Convolution matrices, Unsharp mask sharpening, “Smart” sharpening • Script-Fu, Scheme, Parenthesis • Goals: Compare methods of image sharpening, automate “smart” sharpening with Script-Fu 2

Gimp and “Smart” Sharpening works in Windows, Linux, BSD, Solaris, and OS X 3

Gimp and “Smart” Sharpening works in Windows, Linux, BSD, Solaris, and OS X 3

Methods • • Understand Script-Fu Procedure Browser Kate/Notepad++ Common bugs: – gimp_image_new vs. gimp-image-new

Methods • • Understand Script-Fu Procedure Browser Kate/Notepad++ Common bugs: – gimp_image_new vs. gimp-image-new – (set! var car(value)) vs. (set! var (car (value))) – string_value vs. “string_value” 4

“Smart” Sharpening • Duplicate image, extract Value channel from HSV • Create sharpening layer

“Smart” Sharpening • Duplicate image, extract Value channel from HSV • Create sharpening layer on original image using Value channel • Edge detect duplicate image, filter results • Add edge mask to sharpening layer • Unsharp mask on sharpening layer • Technique by Eric R. Jeschke, tutorial at http: //gimpguru. org/Tutorials/Smart. Sharpening 2/ 5

Results • Compare different sharpening techniques on an image, evaluate advantages/disadvantages • Original image,

Results • Compare different sharpening techniques on an image, evaluate advantages/disadvantages • Original image, Convolution matrix, Unsharp mask, “Smart” sharpening • Photo of trellis at Boone Gardens 6

Original Image 7

Original Image 7

Convolution Matrix 8

Convolution Matrix 8

Unsharp Mask 9

Unsharp Mask 9

“Smart” Sharpening 10

“Smart” Sharpening 10

Original Convolution 11 Unsharp “Smart”

Original Convolution 11 Unsharp “Smart”

Conclusions • “Smart” sharpening was best method – Unsharp masking second • Photos of

Conclusions • “Smart” sharpening was best method – Unsharp masking second • Photos of plants • Anti-aliasing: “jaggies” • Script-Fu easy, could automate other common processes (5 days) • Tweaking parameters improves restoration • “Smart” sharpening ineffective on heavy blurring • Script could be improved 12

Future Work • “Smart” sharpening script: – More options (guided process, more undo levels)

Future Work • “Smart” sharpening script: – More options (guided process, more undo levels) – Allow script to batch process images – Determine better default parameters • Photo restoration: – Red-eye removal – Reduce image noise – Correct heavy blurring 13

Acknowledgements • My parents: Andrew Bucior, Jr. , and Barbara Bucior • My siblings:

Acknowledgements • My parents: Andrew Bucior, Jr. , and Barbara Bucior • My siblings: Andrew Bucior III, Matthew Bucior, Sarah Bucior, and Samuel Bucior • The Gimp Developers and Documentation Team • Eric R. Jeschke • http: //portableapps. com/ (Gimp Portable) • Dr. Rahman Tashakkori and Jere Miles • Counselors at Summer Ventures • Ryan Belt and Allison Nelson 14