필터 지우기
필터 지우기

How to know the number of bends in polygon of binary image?

조회 수: 2 (최근 30일)
saravanakumar D
saravanakumar D 2014년 1월 3일
편집: Matt J 2014년 1월 3일
I want to detect triangle and hexagon. But i cannot detect triangle and hexagon. i used to technique permeter^2/(4*pi*Area) ratio. The ratio valed changes with dimension of the image. So i want to is there any technique for count the number of bends in polygon?

채택된 답변

Matt J
Matt J 2014년 1월 3일
편집: Matt J 2014년 1월 3일
One approach might be to pass the known coordinates of the points in the polygon through VERT2LCON to obtain inequalities representing the polygon
A*x<=b
The A(i,:) will be the normals to the sides of the polygon so ideally the number of the A(i,:) will be the number of sides of the polygon.
Due to discretization error in the boundaries, it is possible that the routine might think a side of the polygon actually partitions into many more sides, but the false extra sides should have very similar normals. Assuming you know some lower bound on the angle between the sides of the polygon, it shouldn't be too hard to bin the false sides together.
  댓글 수: 2
Image Analyst
Image Analyst 2014년 1월 3일
Sounds like it could be interesting. Uploading a screenshot with a diagram/plot of the polygons might help people understand it better and get you more downloads. Just a suggestion because it is a bit abstract: "polyhedron can be specified as the intersection of a solid polyhedron A*x<=b and a sub-manifold Aeq*x=beq passing through its interior" after reading that, I think a diagram would help.
Matt J
Matt J 2014년 1월 3일
편집: Matt J 2014년 1월 3일
A fair point. I'll work on that.
For the matter at hand, though, it isn't necessary to understand how A,b interact with Aeq,beq. The polygons here are solid in R^2 and vert2lcon will only return inequality data A,b data (equality data Aeq,beq will be empty).

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

추가 답변 (1개)

Image Analyst
Image Analyst 2014년 1월 3일
The ratio does not change substantially with the dimension of the image. I don't know why you say it does. It is a dimensionless quantity. As long as you have a decent number of pixels it will be the same for a 1 megapixel image, or a 20 megapixel image. Sure it may be different if your triangle or hexagon is only 5 or 10 pixels big, because the shape is so quantized with such a small shape, but as long as you have a good number of pixels, the triangle should give you a higher ratio, like 2 or more. The more circular it gets (like a hexagon is more circular than a triangle), the close to 1 it becomes.
In your earlier post I think I gave you an answer to look in the FAQ for code to find "kinks" in the boundary. You can still use that if you want.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by