hello, I am receiving an error . It says Undefined function or variable 'grayImage'. please let me know how i can define the function . here is my code
1 次查看(过去 30 天)
显示 更早的评论
[pixelCount, grayLevels] = imhist(grayImage);
bar(grayLevels, pixelCount); % Plot it as a bar chart.
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlabel('Gray Level', 'FontSize', fontSize);
ylabel('Pixel Count', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
0 个评论
采纳的回答
Peng Li
2020-3-30
you have to have image data first which the grayImage is supposed to be. you can use imread to read an image in your disk for example.
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!