フィルターのクリア

Problem with imhist after modify image

2 ビュー (過去 30 日間)
Dani D
Dani D 2016 年 3 月 11 日
コメント済み: Zahra Saman 2018 年 4 月 12 日
Hello, Why After histogram in 0 to 1 range?
I=imread('cameraman.tif');
figure
subplot(2,2,1);
imshow(I);
title('Original');
subplot(2,2,2);
imhist(I);
title('Original Histogram');
I=double(I);
fis=readfis('FIS4');
[m n]=size(I);
for i=1:m
for j=1:n
I(i,j)=evalfis(I(i,j),fis);
end
end
subplot(2,2,3);
imshow(uint8(I));
title('After');
subplot(2,2,4);
imhist(I);
title('After Histogram');
  1 件のコメント
Zahra Saman
Zahra Saman 2018 年 4 月 12 日
Plz help me to remove this error pleasw

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

回答 (2 件)

Ahmet Cecen
Ahmet Cecen 2016 年 3 月 11 日
For now use:
imhist(uint8(I))
That will get your work done, although it puzzles me why that is necessary, because imhist normally accepts double.
  4 件のコメント
rjvyas
rjvyas 2017 年 10 月 6 日
I had the same problem and using imhist(uint8(I)) worked! Thank you
Image Analyst
Image Analyst 2017 年 10 月 6 日
You can also use histogram:
histogram(I);
which doesn't require conversion to integer.

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


Julie
Julie 2016 年 3 月 11 日
It changed the range, sometimes it does grayscale in 0-255, and sometimes it does it in 0-1. It won't make a difference to your image. To fix your histogram use
imhist(I.*255);
  3 件のコメント
Zahra Saman
Zahra Saman 2018 年 4 月 12 日
please help me in this problem
Zahra Saman
Zahra Saman 2018 年 4 月 12 日
please help me in this problem

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

カテゴリ

Help Center および File ExchangeImage Filtering and Enhancement についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by