How to take the color grade from one image and apply it to another?

10 ビュー (過去 30 日間)
Joey Daermann
Joey Daermann 2022 年 11 月 28 日
編集済み: DGM 2022 年 11 月 28 日
Good Afternoon all,
I was wondering if its possible to take the colors of one image and apply them to another. I want to bascailly convert the theme.
Ive seen this done many times in photoshop for example in this video https://www.youtube.com/watch?v=epPOrHG6SnE .
What steps would i go about doing this in matlab if at all possible? Has anyone done this before?
Thank you all.

採用された回答

Image Analyst
Image Analyst 2022 年 11 月 28 日
Sorry but I don't think Walter's suggestion would work.
The best paper I've seen on this is
Sorry but I don't have code for that paper.
  3 件のコメント
DGM
DGM 2022 年 11 月 28 日
編集済み: DGM 2022 年 11 月 28 日
Yeah, same. I didn't get very far either. It's still in my TODO notes ... waaay down at the bottom.

サインインしてコメントする。

その他の回答 (2 件)

Walter Roberson
Walter Roberson 2022 年 11 月 28 日
rgb2ind the base image and save the color map. Now rgb2ind the second image and ind2rgb passing in the saved colormap.
  3 件のコメント
Walter Roberson
Walter Roberson 2022 年 11 月 28 日
I forgot earlier that you can rgb2ind your base image and then rgb2ind the second image passing in the colormap from the first image and then ind2rgb back with the same map. The effect would be to substitute each color with the closest color that exists in the first image. But it does not have to appear much in the original image so this would not tend to shift palettes.

サインインしてコメントする。


DGM
DGM 2022 年 11 月 28 日
編集済み: DGM 2022 年 11 月 28 日
The paper that @Image Analyst linked is good, but I haven't seen any MATLAB implementation. You're free to post it on the File Exchange if you write one.
MIMT imrecolor() is about the closest thing, but it's nowhere near as good as that. Results may end up pretty terrible on photographs, but it was never meant to work on anything but abstract images. It's just an incremental improvement over a basic histogram matching as one would do with imhistmatch().
I wouldn't call it a color grading tool, but I might as well throw that out there. This comment references the paper that @Image Analyst linked and compares to the results using imrecolor() and imhistmatch().

カテゴリ

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by