Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the...
-
Upload
myron-scott -
Category
Documents
-
view
218 -
download
2
Transcript of Investigating the Development of Colour Interpolation Techniques for GIMP Investigating the...
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
OverviewOverview
Presentation OverviewPresentation Overview IntroductionIntroduction Colour TransferColour Transfer DesignDesign ImplementationImplementation ResultsResults ConclusionConclusion
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
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
Colour TransferColour Transfer
Colour Transfer between Images Colour Transfer between Images [Reinhard et [Reinhard et
al]al]
Source Target Final
+ =
Colour TransferColour Transfer
Colour Transfer to Greyscale Images Colour Transfer to Greyscale Images [Welsh et al][Welsh et al]
Source Target Final
+ =
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
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
llαβαβ colour space colour space
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)
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
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
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
Colour Transfer AlgorithmColour Transfer Algorithm
Colour TransferColour Transfer
Transfer the Transfer the αα and and ββ channels only channels only (colour)(colour)
Target Image
Colourized Result
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
SwatchesSwatches
Select swatchesSelect swatches
Source Target
+ =
Final
DesignDesign User InterfaceUser Interface
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
ImplementationImplementation
EnvironmentEnvironment Plug-in ArchitecturePlug-in Architecture Development IssuesDevelopment Issues
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
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
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
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
ResultsResults
+ =
ResultsResults
+ =
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
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
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
Questions?Questions?