Probelm in implementing Adaptive Histogram Equalization

12 ビュー (過去 30 日間)
Ghulam
Ghulam 2019 年 10 月 8 日
回答済み: Image Analyst 2019 年 10 月 8 日
Hi,
I am trying to implement Contrast Limited Adaptive Historgram Equalization an image using the command adapthisteq(I) but i am getting error like
"Error using adapthisteq
Expected input number 1, I, to be two-dimensional."
I have attached my image here, can anyone pls guide me the problem with it.
Note: since the file format of tif is not supported in the attachment, therefore i am attaching jpg format of my file.
Thanks
  2 件のコメント
Stephan
Stephan 2019 年 10 月 8 日
What shows up for
size(I)
Ghulam
Ghulam 2019 年 10 月 8 日
This is the result
ans =
1728 1852 4

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

回答 (2 件)

Stephan
Stephan 2019 年 10 月 8 日
編集済み: Stephan 2019 年 10 月 8 日
  1 件のコメント
Ghulam
Ghulam 2019 年 10 月 8 日
Thanks Stephan,
I also think that the issue is of dimensions, when i have converted the image into Gray image. there was no error and i was able to apply the CLAHE.

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


Image Analyst
Image Analyst 2019 年 10 月 8 日
Before calling adapthisteq(), cast the image to gray level if it's not already:
if ndims(I) == 3
I = rgb2gray(I)
end

Community Treasure Hunt

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

Start Hunting!

Translated by