How do i fit a square around a point in an image?

조회 수: 1 (최근 30일)
burges
burges 2017년 3월 18일
댓글: Image Analyst 2017년 3월 19일
I have the image:
I = [1 1 1 3 3 3 3 3
1 1 1 1 3 3 3 3
1 1 1 1 3 3 3 3
1 1 1 1 2 2 2 3
1 1 1 1 2 2 2 3
1 1 1 1 2 2 2 3
1 1 1 1 2 2 2 2];
How can i fit a square of size say two pixels around the point (4,6)? Many thanks for your help/suggestions.

답변 (1개)

Walter Roberson
Walter Roberson 2017년 3월 18일
If you are asking to draw a square on the screen then use rectangle()
  댓글 수: 1
Image Analyst
Image Analyst 2017년 3월 19일
"i fit a square of size say two pixels"
"my actual intention is to get the area of the square"
So if your square is 2 pixels by 2 pixels, then your area will be 4 pixels. Why do you even need to ask?

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

카테고리

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