pixels value in grayscale image

조회 수: 2 (최근 30일)
mengqi zhang
mengqi zhang 2017년 1월 10일
답변: Image Analyst 2017년 1월 10일
I'm new beginner in imaging matlab, I have a easy project but I just know how to insert an image in matlab. the problems is 1)I have a grayimage, how to obtain the total pixels number. 2)if I want to get many scale pixels number, eg: the color range is 0-255, if I want to know 0-10 how many pixels I have in this image, 11-20 how many pixels I have in this image,ect. how to extract it?? thank you very much, if you program it I will appreciate it.

답변 (1개)

Image Analyst
Image Analyst 2017년 1월 10일
Take the histogram
totalNumberOfPixelsInIMage = numel(grayImage)
[pixelCounts, grayLevels] = imhist(grayImage);
If you're a beginner, you must see my Image Segmentation Tutorial in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 because it goes over all the basic steps you'll need for a typical thresholding-based image segmentation, analysis, and classification.

카테고리

Help CenterFile Exchange에서 Get Started with Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by