8000 GitHub - stongey/PhotoRestore: Python scripts and GIMP plugins for restoring the color of scans of old faded photographs.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Python scripts and GIMP plugins for restoring the color of scans of old faded photographs.

License

Notifications You must be signed in to change notification settings

stongey/PhotoRestore

{"props":{"initialPayload":{"allShortcutsEnabled":false,"path":"/","repo":{"id":189215307,"defaultBranch":"master","name":"PhotoRestore","ownerLogin":"stongey","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2019-05-29T11:50:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/5861372?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1559130632.0","canEdit":false,"refType":"branch","currentOid":"509036aaa7e93ef1b621fe44ff2b00ac907ebbc2"},"tree":{"items":[{"name":"GIMP Plugins","path":"GIMP Plugins","contentType":"directory"},{"name":"Python","path":"Python","contentType":"directory"},{"name":"White Papers","path":"White Papers","contentType":"directory"},{"name":"Windows","path":"Windows","contentType":"directory"},{"name":"android","path":"android","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":null,"totalCount":8,"showBranchInfobar":false},"fileTree":null,"fileTreeProcessingTime":null,"foldersToFetch":[],"treeExpanded":false,"symbolsExpanded":false,"isOverview":true,"overview":{"banners":{"shouldRecommendReadme":false,"isPersonalRepo":false,"showUseActionBanner":false,"actionSlug":null,"actionId":null,"showProtectBranchBanner":false,"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_repo","releasePath":"/stongey/PhotoRestore/releases/new?marketplace=true","showPublishActionBanner":false},"interactionLimitBanner":null,"showInvitationBanner":false,"inviterName":null,"actionsMigrationBannerInfo":{"releaseTags":[],"showImmutableActionsMigrationBanner":false,"initialMigrationStatus":null}},"codeButton":{"contactPath":"/contact","isEnterprise":false,"local":{"protocolInfo":{"httpAvailable":true,"sshAvailable":null,"httpUrl":"https://github.com/stongey/PhotoRestore.git","showCloneWarning":null,"sshUrl":null,"sshCertificatesRequired":null,"sshCertificatesAvailable":null,"ghCliUrl":"gh repo clone stongey/PhotoRestore","defaultProtocol":"http","newSshKeyUrl":"/settings/ssh/new","setProtocolPath":"/users/set_protocol"},"platformInfo":{"cloneUrl":"https://desktop.github.com","showVisualStudioCloneButton":false,"visualStudioCloneUrl":"https://windows.github.com","showXcodeCloneButton":false,"xcodeCloneUrl":"xcode://clone?repo=https%3A%2F%2Fgithub.com%2Fstongey%2FPhotoRestore","zipballUrl":"/stongey/PhotoRestore/archive/refs/heads/master.zip"}},"newCodespacePath":"/codespaces/new?hide_repo_select=true\u0026repo=189215307"},"popovers":{"rename":null,"renamedParentRepo":null},"commitCount":"24","overviewFiles":[{"displayName":"README.md","repoName":"PhotoRestore","refName":"master","path":"README.md","preferredFileType":"readme","tabName":"README","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cp dir=\"auto\"\u003ePYTHON SCRIPTS AND GIMP PLUG-INS FOR RESTORING FADED SLIDES AND PRINTS\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eNOTE - The original author, Geoff Daniell, has given me (stongey) permission to publish\nthis repository on GitHub in his name. Below is Geoff's original Read Me text.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTested on GIMP 2.8 on a Mac. We will be working on testing with GIMP 2.10, other platforms, and Python 3 coming up.\nYour experience may vary. Please report issues.\u003c/p\u003e\n\u003chr\u003e\n\u003cp dir=\"auto\"\u003eA retirement project was scanning all my old colour slides and it turned out that many of the colours had deteriorated over the years. After spending a whole wet afternoon trying to improve them with image processing software it seemed that the best result was using the 'AUTO' button. Since I used to work on image processing (but not this sort) I was sure I could do better than an 'AUTO' button. The result is:\u003c/p\u003e\n\u003cmarkdown-accessiblity-table\u003e\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth align=\"left\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/8da26c653f320a2e08f84baa5ac9798337ebd622f56168efcd80d54b807938e7/687474703a2f2f7777772e6c696f6e686f7573652e706c75732e636f6d2f6f726967696e616c372e6a7067\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/8da26c653f320a2e08f84baa5ac9798337ebd622f56168efcd80d54b807938e7/687474703a2f2f7777772e6c696f6e686f7573652e706c75732e636f6d2f6f726967696e616c372e6a7067\" alt=\"Deteriorated Original\" data-canonical-src=\"http://www.lionhouse.plus.com/original7.jpg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/th\u003e\n\u003cth align=\"left\"\u003e\u003ca target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://camo.githubusercontent.com/efff825c0374d98912272c23092a36ab50762ed53e580ebef73cc27091d66149/687474703a2f2f7777772e6c696f6e686f7573652e706c75732e636f6d2f726573746f726564372e6a7067\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/efff825c0374d98912272c23092a36ab50762ed53e580ebef73cc27091d66149/687474703a2f2f7777772e6c696f6e686f7573652e706c75732e636f6d2f726573746f726564372e6a7067\" alt=\"Restored using my algorithm\" data-canonical-src=\"http://www.lionhouse.plus.com/restored7.jpg\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd align=\"left\"\u003eDeteriorated Original\u003c/td\u003e\n\u003ctd align=\"left\"\u003eRestored using my algorithm\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\u003c/markdown-accessiblity-table\u003e\n\u003cp dir=\"auto\"\u003eSome years ago I released a GIMP plug-in for automatically restoring scanned\nslides or prints that had deteriorated with age. This work is described in\nthe file \"restore1.pdf\" and the file Restore1.py is the corresponding plug-in,\n(renamed from the old restore.py). Several people have used this and commented favourably\non it performance.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eI have now devised a new algorithm which, I believe, should perform\nbetter. The technical details and some examples are given in the file\nrestore2.pdf and there are two versions of the plug-in. At the present time\nRestore2.py is the one to use. The reason Restore3.py is provided is because\nthere has been some discussion on removing the GIMP procedure for\nconversion of an image to color indexed mode and Restore3.py contains its own\ncode for the operation. The results are not identical but are very similar and\nit is unlikely that one will perform systematically better than the other, so\ncomparisons are waste of time.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eI also regard a systematic comparison of the performance of the old and new\nalgorithms as rather pointless because the justification for new is its much\nmore solid theoretical basis. It is shown to work well in several examples and\nwould be expected to do well on other images. I have nevertheless kept the\noriginal version as inevitably there will be the occasional image for which\nthis performs better and if the results of the new one are poor it is worth\ntrying the old.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe plug-ins listed above operate on a single picture opened in GIMP. The\nbatch_restore versions are similar but operate on all the photographs in a\ndirectory. The results are put in sub-directory \"restored\", which must exist.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eTo use these plug-ins copy them to your local directory ./gimp-2.x/plug-ins.\nYou may need to change the permissions to make them executable. The\nplug-ins will be automatically loaded when you start gimp and they appear on\nthe menus under \"restore\" and \"filters\"; information is also loaded into the\nplug-in database. They also work on a Mac running OSX except that it is\nhard to find the correct folder to put them in because it is hidden! On\nWindows you are on your own!\u003c/p\u003e\n\u003c/article\u003e","loaded":true,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fstongey%2FPhotoRestore"}},{"displayName":"LICENSE","repoName":"PhotoRestore","refName":"master","path":"LICENSE","preferredFileType":"license","tabName":"GPL-3.0","richText":null,"loaded":false,"timedOut":false,"errorMessage":null,"headerInfo":{"toc":null,"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fstongey%2FPhotoRestore"}}],"overviewFilesProcessingTime":0}},"appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-708ec8ade250.js","githubDevUrl":null,"enabled_features":{"copilot_workspace":null,"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}}

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PYTHON SCRIPTS AND GIMP PLUG-INS FOR RESTORING FADED SLIDES AND PRINTS

NOTE - The original author, Geoff Daniell, has given me (stongey) permission to publish this repository on GitHub in his name. Below is Geoff's original Read Me text.

Tested on GIMP 2.8 on a Mac. We will be working on testing with GIMP 2.10, other platforms, and Python 3 coming up. Your experience may vary. Please report issues.


A retirement project was scanning all my old colour slides and it turned out that many of the colours had deteriorated over the years. After spending a whole wet afternoon trying to improve them with image processing software it seemed that the best result was using the 'AUTO' button. Since I used to work on image processing (but not this sort) I was sure I could do better than an 'AUTO' button. The result is:

Deteriorated Original Restored using my algorithm
Deteriorated Original Restored using my algorithm

Some years ago I released a GIMP plug-in for automatically restoring scanned slides or prints that had deteriorated with age. This work is described in the file "restore1.pdf" and the file Restore1.py is the corresponding plug-in, (renamed from the old restore.py). Several people have used this and commented favourably on it performance.

I have now devised a new algorithm which, I believe, should perform better. The technical details and some examples are given in the file restore2.pdf and there are two versions of the plug-in. At the present time Restore2.py is the one to use. The reason Restore3.py is provided is because there has been some discussion on removing the GIMP procedure for conversion of an image to color indexed mode and Restore3.py contains its own code for the operation. The results are not identical but are very similar and it is unlikely that one will perform systematically better than the other, so comparisons are waste of time.

I also regard a systematic comparison of the performance of the old and new algorithms as rather pointless because the justification for new is its much more solid theoretical basis. It is shown to work well in several examples and would be expected to do well on other images. I have nevertheless kept the original version as inevitably there will be the occasional image for which this performs better and if the results of the new one are poor it is worth trying the old.

The plug-ins listed above operate on a single picture opened in GIMP. The batch_restore versions are similar but operate on all the photographs in a directory. The results are put in sub-directory "restored", which must exist.

To use these plug-ins copy them to your local directory ./gimp-2.x/plug-ins. You may need to change the permissions to make them executable. The plug-ins will be automatically loaded when you start gimp and they appear on the menus under "restore" and "filters"; information is also loaded into the plug-in database. They also work on a Mac running OSX except that it is hard to find the correct folder to put them in because it is hidden! On Windows you are on your own!

Releases

No releases published

Packages

No packages published

Languages

0