├── Documents └── Images │ ├── Corn_composite.jpg │ ├── Flowers_composite.jpg │ ├── Plant_composite.jpg │ ├── Seaside_composite.jpg │ └── Wood_composite.jpg ├── Licence ├── Processing Folder ├── ParameterInputs.txt ├── ReadMeFirst.txt ├── TJColourTransfer3.exe ├── libgcc_s_dw2-1.dll ├── libopencv_core2410.dll ├── libopencv_highgui2410.dll ├── libopencv_imgproc2410.dll ├── libstdc++-6.dll ├── palette.jpg ├── processed.jpg └── target.jpg ├── README.md └── Visual Guide.pdf /Documents/Images/Corn_composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Documents/Images/Corn_composite.jpg -------------------------------------------------------------------------------- /Documents/Images/Flowers_composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Documents/Images/Flowers_composite.jpg -------------------------------------------------------------------------------- /Documents/Images/Plant_composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Documents/Images/Plant_composite.jpg -------------------------------------------------------------------------------- /Documents/Images/Seaside_composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Documents/Images/Seaside_composite.jpg -------------------------------------------------------------------------------- /Documents/Images/Wood_composite.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Documents/Images/Wood_composite.jpg -------------------------------------------------------------------------------- /Licence: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | 167 | -------------------------------------------------------------------------------- /Processing Folder/ParameterInputs.txt: -------------------------------------------------------------------------------- 1 | 640 // p1=The extent of the larger dimension in the output image. [640] 2 | 0.5 // p2=1.0 for full cross covariance processing, 0.0 for independent channel processing, intermediate otherwise. [default 0.5] 3 | 1.0 // p3=Number of reshaping iterations. [default 1.0] 4 | -1.0 // p4=Percent saturation shift (or -1 for automatic selection of a suitable value). [default -1.0] 5 | 50.0 // p5=Percent shading shift. [default 50.0] 6 | 1.0 // p6=1.0 for additional shading processing =0.0 otherwise. [default 1.0] 7 | 100.0 // p5=100.0 for full colour image, 0.0 for grayscale image, otherwise intermediate Tint. [default 100.0] 8 | 100.0 // p8=Percent of colour modification change arising from processing. [default 100.0] 9 | // ******************************************************************************************************************* 10 | // * 11 | // * THIS FILE IS USED TO SPECIFY THE VALUES FOR PROCESSING OPTIONS P1 TO P8. 12 | // * 13 | // * ABOVE THIS BOX THE NUMBERS ON THE LEFT HAND SIDE MAY BE CHANGED IN ACCORDANCE 14 | // * WITH THE GUIDANCE GIVEN, BUT NOTHING ELSE CAN BE CHANGED. 15 | // * 16 | // ******************************************************************************************************************* 17 | 18 | // Default processing parameters for Enhanced processing are as indicated above. 19 | 20 | // OPTION 1 (p1) 21 | // There is an option to specify the size of the output image in terms of its height or its width (whichever is greater). 22 | // Note that this affects the saved file 'processed.jpg' but not the size of the composite display image. 23 | // Larger values of p1 give rise to longer processing times. If too large an output image is specified then 24 | // processing may cease due to insufficient processing resources. An error message will normally 25 | // be displayed. The size of image that can be accomodated will depend upon the particular 26 | // host computer. 27 | 28 | // OPTION 2 (p2) 29 | // There is an option to match the cross correlation between the colour channels of the target 30 | // image to the correlation within the palette image. Full matching, no matching or restricted 31 | // matching may be specified. 32 | // Set CrossCovarianceLimit to 0 to inhibit cross covariance processing. 33 | // Set CrossCovarianceLimit to 1 for full cross covariance processing. 34 | // Set to an intermediate value for intermediate processing. 35 | // (See the note at the end of this file for further information.) 36 | 37 | // OPTION 3 (p3) 38 | // There is an option to further match the distribution of the target image colour channels 39 | // to the corresponding palette image colour channels by iteratively adjusting the 40 | // characteristics over and above the basic processing sequence. The number of 41 | // iterative adjustments can be specified for this 'reshaping' option. 42 | // Set the number of reshaping iterations to 0 for no reshaping processing. 43 | // Set the number of reshaping iterations to 1 for a single rehaping iteration. 44 | // Set the number of reshaping iterations to 'n' for 'n' reshaping iterations. 45 | 46 | // OPTION 4 (p4) 47 | // There is an option to pare back excess colour saturation resulting from the 48 | /// colour transfer processing. 49 | // Set percent saturation shift to 100% for no paring back. 50 | // Set percent saturation shift to 0% for full paring back. 51 | // Set to an intermediate value for an intermediate degree of paring back. 52 | // Set to '-1' for automatic parameter selection. 53 | // Values above 100.0 are permissible! 54 | 55 | // OPTION 5 (p5) 56 | // There is an option to retain the shading of the target image so that the processing is 57 | // implemented as a pure colour transfer or to adopt the shading of the palette image 58 | // or to select an intermediate shading. 59 | // Set percent shading shift to 100 for shading consistent with the palette image. 60 | // Set percent shading shift to 0 to retain the target image shading. 61 | // Set to an intermediate value for intermediate shading. 62 | // Values outside the range 0.0-100.0 are permissible! 63 | 64 | // OPTION 6 (p6) 65 | // There is an option to further adjust the shading of the output image to match 66 | // the target image, the palette image or an intermediate image 67 | // (as selected under Option 5) by directly matching distributions in the 68 | // corresponding grey shade images. 69 | // Set additional shading processing to '1' for enhanced shading processing. 70 | // Set additional shading processing to '0' to revert to simple shading. 71 | 72 | // OPTION 7 (p7) 73 | // There is an option to modify the colour tint of the final image. 74 | // Set percentage tint to 100.0 for a full colour image. 75 | // Set percentage tint to 0.0 for a greyscale image. 76 | // Set to an intermediate value for intermediate tint. 77 | // Values outside the range 0.0-100.0 are permissible! 78 | 79 | // OPTION 8 (p8) 80 | // There is an option to mix the final image with the initial image, 81 | // so that only part modification occurs. 82 | // Set percentage modification to 100 to achive the full processing outcome. 83 | // Set percentage modification to 0 to retain the target image in full. 84 | // Set to an intermediate value for intermediate modification. 85 | // Values outside the range 0.0-100.0 are permissible! 86 | 87 | ** PROCESSING PRECEDENCE ** 88 | // p7 is implemented first then p8. 89 | 90 | ======================== 91 | ** PROCESSING SET UP ** 92 | ======================== 93 | // To initiate processing, double click the file 'TJColourTranser2.exe' 94 | // This file ('ParameterInputs.txt') must be in the same directory 95 | // as 'TJColourTranser2.exe' 96 | // An output image will be generated under the name 'processed.jpg' 97 | // The displays and the program may be closed by hitting the keyboard. 98 | // 99 | // Requires the following dlls in the same directory as the executable 100 | // libgcc_s_dw2-1.dll 101 | // libopencv_core2410.dll 102 | // libopencv_highgui2410.dll 103 | / / libopencv_imgproc2410.dll 104 | // libstdc++-6.dll 105 | 106 | // For standard processing, the source and target file 107 | // must be in the same directory as the executable. 108 | // The target file must be named 'target.jpg'. 109 | // The source file must be named 'palette.jpg'. 110 | // Alternative images can be renamed as 'target.jpg' 111 | // and 'palette.jpg' as required for processing. 112 | // 113 | // If the file 'target.jpg' is removed or renamed, then 114 | // the program will operate in an alterative mode 115 | // where file selections are requested during processing 116 | // both for input and output images. 117 | // (Note that due to a quirk of the software library 118 | // used for input and output, images cannot be 119 | // processed if they lie in a base directory they 120 | // must lie within a folder.) 121 | 122 | 123 | ** NOTE ON CROSS CORRELATION PROCESSING ** 124 | // Cross correlation matching is performed by operations of the form. 125 | // Channel_a = W1*Channel_a + W2*Channel_b 126 | // Channel_b = W1*Channel_b + W2*Channel_a 127 | // as determined by the value of CrossCovarianceLimit. 128 | // 129 | // If CrossCovarianceLimit = 0, W2=0 and no cross correlation 130 | // matching is performed. 131 | // If CrossCovarianceLimit > 0, W2 is clipped if necessary so 132 | / / that it cannot lie outside the range 133 | // -CrossCovarianceLimit*W1 to +CrossCovarianceLimit*W1. 134 | // This mechanism may be used to guard against an overly large 135 | // correction term. 136 | // Typically CrossCovarianceLimit might be set to 0.5 137 | // (for a maximum modification corresponding to 50%). 138 | 139 | // (For standard Reinhard processing the parameters should be 640, 0.0, 0.0, 100.0, 100.0, 0.0, 100.0, 100.0) 140 | 141 | FOR MORE DETAILS SEE. https://github.com/TJCoding/Enhanced-Image-Colour-Transfer -------------------------------------------------------------------------------- /Processing Folder/ReadMeFirst.txt: -------------------------------------------------------------------------------- 1 | 2 | INSTRUCTIONS 3 | =========== 4 | 5 | Click the file "TJColourTransfer3.exe", (but first read the first paragraph of IMPORTANT NOTES below). 6 | 7 | An on-screen display will be generated and the file "processed.jpg'" will contain the processed image as derived from the images in "target.jpg" and "palette.jpg". 8 | 9 | The processed image (as saved) will intially have a maximum dimension of 640 pixels, but this can be varied by altering the value '640' in the file 'ParameterInputs.txt'. 10 | Other processing parameters may also be modified, if required, as described in that file. 11 | 12 | Different images may be processed by renaming each of the existing "target.jpg" and "palette.jpg" files and adding in new files named as "target.jpg" and "palette.jpg". 13 | 14 | Alternatively, if the file "target.jpg" is deleted or renamed, then the program will provide a file selection dialog for the input and output files. 15 | 16 | Further details of processing options can be found in the file "ParameterInputs.txt". 17 | 18 | 19 | IMPORTANT NOTES 20 | ============== 21 | 22 | When you first click "TJColourTransfer3.exe", you may get a message "Windows protected your PC". To overcome this, click "More info" and then "Run anyway". 23 | There is no issue here. Microsoft is being over cautious for software which does not originate from a commercially certified software company. 24 | 25 | The facility to read in files makes use of third party public domain software. Unfortunately it does have one minor quirk. 26 | It cannot read images from or write images to a base directory. It requires that the images lie within a folder. 27 | So, for example, images on a USB should not be directly stored on the base storage but should be within a folder. 28 | 29 | If the output image size is increased from 640 pixels, then the processing will take longer. 30 | The program could fail if a very large output image is specified. 31 | A failure will normally be indicated by the display of an error message. 32 | Processing time and image size capacity will be dependent upon the particular computing device. 33 | 34 | 35 | CHOICE OF IMAGES 36 | ============== 37 | 38 | I hope you enjoy using this software. 39 | 40 | It will produce interesting results for some combinations of input images but not others. 41 | 42 | I am always looking for good examples which illustrate the software's capability. 43 | 44 | If you find an image pair that works particularly well, you can email them to me with the heading "Colour Transfer Images" 45 | terence.johnson@gmail.com 46 | 47 | 48 | SOFTWARE DISTRIBUTION 49 | =================== 50 | 51 | Copyright © Terry Johnson January 01/12/2020 52 | https://github.com/TJCoding 53 | This program is free software. It comes without any warranty, to the extent permitted by applicable law. 54 | You can redistribute it under the GNU Lesser General Public License v3.0 55 | OpenCV dlls are distributed under a BSD licence. 56 | 57 | -------------------------------------------------------------------------------- /Processing Folder/TJColourTransfer3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/TJColourTransfer3.exe -------------------------------------------------------------------------------- /Processing Folder/libgcc_s_dw2-1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/libgcc_s_dw2-1.dll -------------------------------------------------------------------------------- /Processing Folder/libopencv_core2410.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/libopencv_core2410.dll -------------------------------------------------------------------------------- /Processing Folder/libopencv_highgui2410.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/libopencv_highgui2410.dll -------------------------------------------------------------------------------- /Processing Folder/libopencv_imgproc2410.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/libopencv_imgproc2410.dll -------------------------------------------------------------------------------- /Processing Folder/libstdc++-6.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/libstdc++-6.dll -------------------------------------------------------------------------------- /Processing Folder/palette.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/palette.jpg -------------------------------------------------------------------------------- /Processing Folder/processed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/processed.jpg -------------------------------------------------------------------------------- /Processing Folder/target.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Processing Folder/target.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/README.md -------------------------------------------------------------------------------- /Visual Guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TJCoding/Image-Colour-Transfer-Processing-Executable/d10449bcf323a39a280d89af94cf864a78bf5dfe/Visual Guide.pdf --------------------------------------------------------------------------------