Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the...

29
Investigating the Development Investigating the Development of Colour Interpolation of Colour Interpolation Techniques for GIMP Techniques for GIMP Author: Vera Kuki Author: Vera Kuki ć ć Supervisors: Shaun Bangay Supervisors: Shaun Bangay Adele Lobb Adele Lobb George Wells George Wells

Transcript of Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the...

Page 1: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Investigating the Development of Investigating the Development of Colour Interpolation Techniques for Colour Interpolation Techniques for

GIMPGIMP

Author: Vera KukiAuthor: Vera Kukićć

Supervisors: Shaun BangaySupervisors: Shaun BangayAdele LobbAdele Lobb

George WellsGeorge Wells

Page 2: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

OverviewOverview

Presentation OverviewPresentation Overview IntroductionIntroduction Colour TransferColour Transfer DesignDesign ImplementationImplementation ResultsResults ConclusionConclusion

Page 3: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

IntroductionIntroduction

Motivation for the studyMotivation for the study Recent colourisation and colour interpolation Recent colourisation and colour interpolation

techniques techniques Bring the power of colourisation to common Bring the power of colourisation to common

graphics packages graphics packages

Hence our Objective:Hence our Objective: Explore and evaluate colour interpolation plug-ins Explore and evaluate colour interpolation plug-ins

in the GIMP frameworkin the GIMP framework Integrate colourization into GIMPIntegrate colourization into GIMP

Allows GIMP users the ability to use a colourisation toolAllows GIMP users the ability to use a colourisation tool

Page 4: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour TransferColour Transfer

Colour Transfer TechniquesColour Transfer Techniques Colouring Book MethodColouring Book Method

Photoshop: manually paint colour with low Photoshop: manually paint colour with low opacityopacity

Movie Industry: track polygonsMovie Industry: track polygons

PseudocolouringPseudocolouring Global Transformation/Colour MapGlobal Transformation/Colour Map

Colour Transfer between ImagesColour Transfer between Images Colour Transfer to Greyscale ImagesColour Transfer to Greyscale Images

Page 5: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour TransferColour Transfer

Colour Transfer between Images Colour Transfer between Images [Reinhard et [Reinhard et

al]al]

Source Target Final

+ =

Page 6: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour TransferColour Transfer

Colour Transfer to Greyscale Images Colour Transfer to Greyscale Images [Welsh et al][Welsh et al]

Source Target Final

+ =

Page 7: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Select Source and Target ImagesSelect Source and Target Images Convert Images to the Convert Images to the llαβαβ colour colour

spacespace Image MatchingImage Matching Colour TransferColour Transfer

Page 8: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Convert Images to the Convert Images to the llαβαβ colour colour spacespace

lαβlαβ space was developed to reduce the space was developed to reduce the correlation between the 3 coordinate axis correlation between the 3 coordinate axis of the colour spaceof the colour space l l –> chromatic luminance channel–> chromatic luminance channel αα –> yellow-blue channel –> yellow-blue channel β β –> red –green channel–> red –green channel

Page 9: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

llαβαβ colour space colour space

Page 10: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Convert Images to the Convert Images to the llαβαβ colour colour spacespace Images are converted using matrix Images are converted using matrix

manipulationmanipulation

RGB -> XYZ tristimulus valuesRGB -> XYZ tristimulus values XYZ -> LMS spaceXYZ -> LMS space LMS -> LMS -> llαβαβ (using log conversion) (using log conversion)

Page 11: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Image MatchingImage Matching Create luminance histograms of the two imagesCreate luminance histograms of the two images

The image:The image:

has a histogram:has a histogram:

0

1

2

3

4

5

6

7

0 1 2 3 4 5 6

Page 12: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Image MatchingImage Matching Remap luminance histograms between source Remap luminance histograms between source

and target imageand target image Scale and shift distributions globallyScale and shift distributions globally

Source Target-> Scaled

and Shifted

Page 13: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Image MatchingImage Matching Pre-compute neighbourhood statistics for Pre-compute neighbourhood statistics for

imagesimages Use sampling techniques to get colour Use sampling techniques to get colour

samples from the source imagesamples from the source image Find best match from samplesFind best match from samples

Weighted metric of luminance, mean and Weighted metric of luminance, mean and standard deviationstandard deviation

Page 14: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Colour Transfer AlgorithmColour Transfer Algorithm

Colour TransferColour Transfer

Transfer the Transfer the αα and and ββ channels only channels only (colour)(colour)

Target Image

Colourized Result

Page 15: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

SwatchesSwatches

User-assisted approachUser-assisted approach

User selects a small number of swatchesUser selects a small number of swatches Transfer colour only to swatchesTransfer colour only to swatches Colour entire target imageColour entire target image

Page 16: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

SwatchesSwatches

Select swatchesSelect swatches

Source Target

+ =

Final

Page 17: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

DesignDesign User InterfaceUser Interface

Page 18: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

DesignDesign

Image Acquisition

Image Colourspace Mapping

Compute Image Statistics

Co

lou

r T

ran

sfe

r Luminance Scaling

Colour Image sampling

Find Best Matches

Scan Line Pixel Colour Transfer

Obtain the drawables from the GIMP runtime

Raw pixel byte stream data from GIMPdrawable is internalized within PixelArea

wrapper types

Luminance stats are computed from pixelareas

The luminance histogram of the source pixelarea is scaled to the destination image

Sample from source pixel area: Grid uniform,jittered, with neighborhood statistics etc.

Each pixel in the destination image is matchedwith the best approximating pixel in our sampled

list

Page 19: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ImplementationImplementation

EnvironmentEnvironment Plug-in ArchitecturePlug-in Architecture Development IssuesDevelopment Issues

Page 20: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ImplementationImplementation

EnvironmentEnvironment

GIMP – is the GNU Image Manipulation GIMP – is the GNU Image Manipulation PackagePackage Open source – free Open source – free Suitable for image retouching, altering and Suitable for image retouching, altering and

image composition. image composition. Uses external modules known as plug-insUses external modules known as plug-ins

GIMP caters for C and PearlGIMP caters for C and Pearl

Page 21: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ImplementationImplementation

Plug-in definition: Plug-in definition:

““A file containing data used to alter, A file containing data used to alter, enhance or extend the operation of a enhance or extend the operation of a parent application program”.parent application program”. Free On-line Dictionary of Free On-line Dictionary of

ComputingComputing

Page 22: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ImplementationImplementation

Plug-in ArchitecturePlug-in Architecture Implement a specified interfaceImplement a specified interface Plug-in mustPlug-in must

Register itself in the Procedure Database PDBRegister itself in the Procedure Database PDB Have a main() functionHave a main() function

Signal handlingSignal handling CommunicationCommunication

PLUG_IN_INFO – global variablePLUG_IN_INFO – global variable query() – call to gimp_install_procedurequery() – call to gimp_install_procedure run() – sets the status code return valuerun() – sets the status code return value

Page 23: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ImplementationImplementation

Development IssuesDevelopment Issues GIMP API poorly documented GIMP API poorly documented

Wade through gimplib sourceWade through gimplib source Trial and Error implementation Trial and Error implementation Negatively affected development timescalesNegatively affected development timescales

Experiences with CExperiences with C GUI development using GTK tedious GUI development using GTK tedious

Page 24: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ResultsResults

+ =

Page 25: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ResultsResults

+ =

Page 26: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ConclusionConclusion

ApplicationApplication Enhance Scientific DataEnhance Scientific Data

Medical ImagingMedical Imaging Satellite ImagesSatellite Images Scanning Electron MicroscopyScanning Electron Microscopy

Colourize black/white photographs and Colourize black/white photographs and moviesmovies

Artistic EffectsArtistic Effects

Page 27: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ConclusionConclusion

Future WorkFuture Work

Robustness: more sophisticated matchingRobustness: more sophisticated matching Colour correctionColour correction Automated choice of source imageAutomated choice of source image Different metric for texture matches and Different metric for texture matches and

similarity – allow for small surface similarity – allow for small surface colouringcolouring

Page 28: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

ConclusionConclusion

Implemented a new general, fast and Implemented a new general, fast and user-friendly approach to colouring user-friendly approach to colouring greyscale imagesgreyscale images

Page 29: Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the Development of Colour Interpolation Techniques for GIMP Author:

Questions?Questions?