how can i find Plot histogram ?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
채택된 답변
Image Analyst
2013년 11월 5일
0 개 추천
I assume you've looked up hist and histogram in the help and have gone over all the help documentation and didn't find what you were looking for. But I'm not sure what you want. Do you want help on plot()? On bar()? On hist(), histc(), or imhist()? Please expand on your question. Help us help you.
댓글 수: 16
engineer 01
2013년 11월 5일
thank you,exactly question is that...:
1-Input partly dark with something at the back stage 2-) Plot histogram & image for Q1
% Display the original gray scale image.
subplot(2, 2, 1);
imshow(grayImage, []);
title('Original Grayscale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(grayImage);
subplot(2, 2, 2);
bar(pixelCount);
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
engineer 01
2013년 11월 5일
thank you so much,but one more thing when i run this code shown the empty graphic.i wrote
pic=imread('d:\image4.jpg'); grayimage=rgb2gray(pic);
what can i do ?
Image Analyst
2013년 11월 5일
It should work. Attach your script and image file.
engineer 01
2013년 11월 5일
i uploaded result it's empty
engineer 01
2013년 11월 5일

Image Analyst
2013년 11월 5일
You didn't upload your script or image. You just uploaded a screenshot. Upload the .m file and your .PNG file (or whatever image format you're using).
engineer 01
2013년 11월 5일
ok
Image Analyst
2013년 11월 5일
Wow, you're really making me work for it. Now, please attach your image file.
engineer 01
2013년 11월 5일

engineer 01
2013년 11월 5일
thank you so much,this Picture is not important,The important thing is writing in first question dark image so doesn't matter for me if there is any problem
MATLAB is case sensitive so grayImage is not the same as grayimage. See corrected code below:
fontSize = 20;
rgbImage=imread('D:\image4.jpg');
grayImage=rgb2gray(rgbImage);
% Display the original gray scale image.
subplot(2, 2, 1);
imshow(rgbImage, []);
title('Original RGB Image', 'FontSize', fontSize);
subplot(2, 2, 2);
imshow(grayImage, []);
title('Gray Scale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(grayImage);
subplot(2, 2, 4);
bar(pixelCount);
grid on;
title('Histogram of Gray Scale Image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
engineer 01
2013년 11월 5일
thank you so much for everything it's work..Sorry,i will ask last a question
1-) Determine & output pixel intensity values which needs improvements. 2-) Apply constrast strectching to pixel values determined in Question 1
Image Analyst
2013년 11월 5일
Try imadjust().
engineer 01
2013년 11월 5일
how ?
Image Analyst
2013년 11월 5일
betterImage = imadjust(badImage);
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Histograms에 대해 자세히 알아보기
태그
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
