how do I make this image whietish?

2 ビュー (過去 30 日間)
Wonwoo Cho 2021 年 12 月 13 日

How do I make this first image like this second image?
1 件のコメント-1 件の古いコメントを表示-1 件の古いコメントを非表示
Walter Roberson 2021 年 12 月 13 日

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

採用された回答

Yusuf Suer Erdem 2021 年 12 月 13 日
1 件のコメント-1 件の古いコメントを表示-1 件の古いコメントを非表示
Wonwoo Cho 2021 年 12 月 13 日
Thank You sir, you saved me :D

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

その他の回答 (1 件)

DGM 2022 年 11 月 13 日

To recreate this image in this specific example, we might compare it directly to its source and see what's been changed. Unfortunately, the result is a screenshot, so it's not the right size and it has then been subsequently cropped so that some edges are missing and others have padding. Stop saving images by saving the figure. It's only slightly less ridiculous than taking a tilted portrait photograph of the monitor with a cell phone.
So let's say we went out of our way to try to resize/crop/fill the image back into rough correspondence with the original. Then we could compare the two. I'm going to assume that whatever transformation was applied was applied equally to all channels.
A = imread('peppers.png'); % the original
B = imread('cccc.png'); % the garbage image
% try to figure out what each input value maps to
av0 = im2double(A(:));
bv0 = im2double(B(:));
[av idx] = unique(av0);
bv = zeros(size(av));
for k = 1:numel(av)
idx = av0 == av(k);
thesepix = bv0(idx);
bv(k) = median(thesepix);
end
plot(av,bv)
xlim([0 1])
ylim([0 1])
Why am I binning and finding the median for all the pixels instead of just comparing each one? That's because two pixels with the same value in A won't necessarily map to the same value in B -- because B is a significantly degraded copy of what used to be the actual output. B has been subject to interpolation when displayed, and again when saved. Whenever the saved image was then opened and edited manually, any number of other things might have happened. Yet more interpolation happens when B was rescaled to register it with A. Everything is blurred and slightly misaligned. If we had just tried to compare the pixel values directly, this is all we'd see:
If we can get a clear plot, we try to see if there's an obvious indication of what the initial value transformation was. Given the roughly piecewise-linear plot, it looks like a basic levels adjustment. Maybe there's a bit of gamma; maybe that's just reading tea leaves.
C = imadjust(A,[0 0.2],[0.2 1],1.2); % recreate the requested image
montage({B,C})

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

カテゴリ

Help Center および File ExchangeObject Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by