can we convert the histogram back to the original image????

1 回表示 (過去 30 日間)
user06
user06 2015 年 6 月 25 日
コメント済み: Walter Roberson 2015 年 6 月 26 日
suppose i have calculated a histogram of a gray image. now i want my original image back through the histogram. can this be possible?

回答 (1 件)

Steven Lord
Steven Lord 2015 年 6 月 25 日
Not in general, no.
A = randi([0 1], 10);
B = A(randperm(10), :);
C = rot90(A, 1);
A, B, and C each have exactly the same number of 0's and 1's, but each has their 1's in different locations. I've only generated three such images; there are many more.
% Show image A
subplot(2, 2, 1);
imagesc(A)
axis square
% Show image B
subplot(2, 2, 2);
imagesc(B)
axis square
% Show image C
subplot(2, 2, 3);
imagesc(C)
axis square
% Show graphs in black and white
colormap(gray(2))
The histogram of each of those images would be the same.
subplot(2, 2, 4)
histogram(A)
Which image is the "original" image for this histogram?
  2 件のコメント
user06
user06 2015 年 6 月 26 日
original image is lena image and i have calculated the histogram of the lena image. now i want to convert this histogram back to lena image.
Walter Roberson
Walter Roberson 2015 年 6 月 26 日
I took a vector of binary values each 0 or 1. I did a histogram of it and the result was that there was 15 0's and 9 1's. Can you convert that histogram back to the original vector?
Answer: No. There are 1307504 different binary vectors of length 24 that have exactly that distribution of 0's and 1's. You can't know which the original was.
I am going to go out on a limb here and speculate that what you really are trying to do is Histogram Equalization.

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

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by