필터 지우기
필터 지우기

how to find coordinates of specific pixel l value?

조회 수: 10 (최근 30일)
Muhammad Hammad Malik
Muhammad Hammad Malik 2019년 1월 18일
댓글: Image Analyst 2019년 2월 3일
hello all,
i want to find the x,y coordinates of specific pixel value. how i can find that.kindly guide me thanks.
see attach image. this represts the pixel values of binary image, now i want to find x,y coordinates of these pixel values only.b6f8411eb0ede0815ae2e9f9a9a6668.jpg

채택된 답변

Roy Kadesh
Roy Kadesh 2019년 1월 18일
[row,col]=find(BW3==1);
depending on your image orientation, either row is x, or col is x.
  댓글 수: 1
Image Analyst
Image Analyst 2019년 2월 3일
No.
If the row is x you're violating a pretty strong convention of having x be the horizontal direction and y be the vertical direction.
What you have is correct:
[row,col]=find(BW3==1);
but you could also do
[y, x] = find(BW3); % Note: y comes first! It's not [x,y].
if you follow the universal convention of x being the horizontal (column) direction, and want to use x,y nomenclature instead of row, column nomenclature.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by