How can I detect 0.5 percent brightest pixels in an image?

1 回表示 (過去 30 日間)
lifeofengineer
lifeofengineer 2019 年 2 月 25 日
コメント済み: lifeofengineer 2019 年 2 月 25 日
I have a grayscale image.I need to find the 0.5 percent brightest pixels in that image. But my image contain differet object. I want to find the 0.5 percent brightest pixels in an for each object.
Could you help me ?
  2 件のコメント
Adam
Adam 2019 年 2 月 25 日
brightnessVal = prctile( img, 99.5 );
brightestPixels = img >= brightnessVal;
should give you a mask of the brightest pixels in a given greyscale image. How you take your original image and define objects from it to create individual img arguments for this is an entirely different question to the one in the title though and plenty more complicated.
lifeofengineer
lifeofengineer 2019 年 2 月 25 日
Actually yes you are right about my question is complicated.
[L, num] = bwlabel(B);
for k = 1 : num
imarray{k} = ismember(L, k);
imarray{k}=imarray{k}.*(ResimOrjinal(:,:,1));
figure
imshow(imarray{k}, []);
end
with this code i am showing my single object from the image. And i want to calculate this each single object's 0.5 percent brightest pixels and showing them on the screen

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

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by