필터 지우기
필터 지우기

How can I count the number of pixels in an image that satisfy a certain condition?

조회 수: 3 (최근 30일)
Mitra Bapat
Mitra Bapat 2015년 2월 11일
답변: Adam 2015년 2월 11일
I am doing a project based on image processing. My image is in double format. I need to count the number of pixels in an image which satisfy a condition. For example, I need to count the number of pixels whose values are greater than say 0.1... And then I need to store that number in a variable for further processing. Please help me out. Thank you.

답변 (1개)

Adam
Adam 2015년 2월 11일
res = nnz( im > 0.1 );

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by