Extract the "overall colors" of an image to apply another?
Ältere Kommentare anzeigen
I've been meaning to show my students a way to "borrow" the color palette of an image to apply to another?
Take the Mona Lisa, for example. It has its own "tones" and "mood". Suppose there was a way to load that image into Matlab and extract its "most vital" color characteristic? And then be able to "apply" this "personality" to any other existing image? I know, it's a crazy idea and I've been thinking what could possibly be the "linking mechanism" between the two images or between any two sets of images, for that matter, that would make this possible? Perhaps the "Brightness" levels? To me, it's clearly a problem of "mapping tones" between imiages but I have no idea where to start. But one thing is sure, the students would immediately understand the idea and, from a pedagogical point of view, it would go a long way towards building an "abstract" view of "image processing" which is what the class is about.
Akzeptierte Antwort
Weitere Antworten (2)
Richard Burnside
am 14 Jun. 2023
Bearbeitet: Richard Burnside
am 14 Jun. 2023
1 Stimme
The imread command will return the indexed image and the 256x3 colormap of the image:
[X,cmap] = imread('corn.tif');
You can work with that colormap to apply it to another image using the colormap command.
4 Kommentare
Roger Breton
am 14 Jun. 2023
Roger Breton
am 14 Jun. 2023
Bearbeitet: Walter Roberson
am 15 Jun. 2023
Roger Breton
am 14 Jun. 2023
Bearbeitet: Roger Breton
am 14 Jun. 2023
Richard Burnside
am 14 Jun. 2023
The answer supplied below by Image Analyst seems to have that process worked out. Pretty amazing results.
Image Analyst
am 14 Jun. 2023
1 Stimme
The best algorithm I've seen for transferring the color gamut is Mark Grundland Color Histogram Specification by Histogram Warping

Sorry, I don't have code for that algorithm.
3 Kommentare
Roger Breton
am 14 Jun. 2023
Image Analyst
am 14 Jun. 2023
If youi can do it, let me know. And post it to the File Exchange. A couple of years ago I made a s tab at it and I got the first few steps done but then it got into some pretty sophisticated math that I didn't know how to translate into MATLAB so I gave it up.

Roger Breton
am 14 Jun. 2023
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





