필터 지우기
필터 지우기

From Image to Pixel

조회 수: 1 (최근 30일)
Giovanni Soldi
Giovanni Soldi 2011년 3월 31일
Hi!
I have a binary image that represents the map of a building. The white part represents the walkable area, while the black area represents the walls and non-walkable parts. Also in the white area I have 38 small points which represent some location inside the building. Given this image I would like to get the position in the binary matrix of these points(The pixel coordinates). Does anyone have an idea on how to do it in an efficient way? I am not really expert in handling images.
Thanks, Giovanni

답변 (2개)

Jan
Jan 2011년 3월 31일
How do you distinguish the "points" and the "walls/non-walkable area"? If your image is binary, both are black - correct?
Then the "points" have only one pixel, but no connection to another black pixel? Or are the "points" allowed to touch a wall on a side or diagonal?
I assume IMERODE can help you - if you have the image processing toolbox.
Inother words: Please explain the problem with more details.

Giovanni Soldi
Giovanni Soldi 2011년 3월 31일
Yes, my image is binary so both the points and the walls are black. The locations points are inside the white part and they are not allowed to touch the walls. They are small points so i presume they are like small matrices of 0 surrounded by all 1's, right? For each point (so for each of these small matrices of 0) I would like to find the indexes (the pixel) of one of these zeros. The other ones I guess will be around. Not sure to have explained well yet.
Thanx, Giovanni
  댓글 수: 1
Giovanni Soldi
Giovanni Soldi 2011년 3월 31일
Is there a method to upload the image maybe?

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

카테고리

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