Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Specific image intensity for further processing.

1 回表示 (過去 30 日間)
kwan karmeng
kwan karmeng 2014 年 7 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
How do i select a specific intensity of an image? For example i would like to process only the intensity of 150 on grayscale image.

回答 (2 件)

Ben11
Ben11 2014 年 7 月 25 日
編集済み: Ben11 2014 年 7 月 25 日
Try this:
PixelsofInterest = (YourImage == 150); % get the location of the pixels you want to analyze
imshow(PixelsofInterest)

Image Analyst
Image Analyst 2014 年 7 月 25 日
What does "process" mean? It's trivial to find a "map" - a binary image - that says where the pixels with value 150 are.
binaryImage = grayImage == 150;
But what you do after that depends on what you want to do. If you just want a 1D list of pixel values, you can do
pixelValues = grayImage(binaryImage); % Of course they will all equal 150.
If you want the sum of the pixels (the count), do
totalArea = sum(binaryImage(:));
If you want the perimeter, Solidity, Equivalent circular Diameter, or something like that, you'll have to do
labeledImage = bwlabel(binaryImage);
measurementsStructure = regionprops(labeledImage, grayImage, 'all');
You can pass in specific measurements instead of 'all' if you know what they are.
See the Image Segmentation Tutorial in my File Exchange for a better discussion and demo. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
  4 件のコメント
kwan karmeng
kwan karmeng 2014 年 7 月 26 日
I want to interpolate the specific intensity, to remove specular reflection actually.
Image Analyst
Image Analyst 2014 年 7 月 26 日
That didn't answer either question. But maybe you want roifill().

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by