How would I detect gray/white pixels in a picture?

조회 수: 1 (최근 30일)
Ali Almakhmari
Ali Almakhmari 2022년 8월 8일
답변: Walter Roberson 2022년 8월 9일
I am trying to write a function to detect white-like and gray-like pixels in a given colored picture. I am stuck on how to go about it. Any help is appreciated.
  댓글 수: 1
yanqi liu
yanqi liu 2022년 8월 9일
yes,sir,may be upload your image file to analysis

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2022년 8월 9일
Convert for HSV, check for "high" V (near 1) and "small" (near 0) S. You will need to decide on the exact boundaries, depending how "white like" or "gray like" you want to allow.

추가 답변 (1개)

KSSV
KSSV 2022년 8월 8일
REad about find. Gve the pixle value as zero and use find. This will give you the indices.
[y,x] = find(I==0) ; % I is gray image
  댓글 수: 1
Ali Almakhmari
Ali Almakhmari 2022년 8월 8일
But that would require me to manually identifiy the gray pixels and assign them to zero. Which is the thing I am trying to automate with this function.

댓글을 달려면 로그인하십시오.

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by