Grid through a center point

2 views (last 30 days)
DI
DI on 31 Mar 2015
Commented: Image Analyst on 31 Mar 2015
I need do a grid that adaptes to my structure like the figure in attach. However i need establish a metric for the point in red that varies for different cases to stay always in the center of a bin, so I need construct the grid through the coordinates of this point. Can you help me?
Thanks.

Accepted Answer

Image Analyst
Image Analyst on 31 Mar 2015
I'm not sure what you're asking. Do you want that blue region to be like a solid region, and then find the centroid of it??? If so, use poly2mask(), activecontour(), bwconncomp(), and then regionprops().
  2 Comments
DI
DI on 31 Mar 2015
No, I want construct a grid in the blue region but the point in red need to be in the center of a bin. So I give the coordinates of the point and then I need do a grid so that the red point be in the center of a grid bin.
Image Analyst
Image Analyst on 31 Mar 2015
So you can use linspace() or just start:increment:stop to define coordinates.

Sign in to comment.

More Answers (0)

Categories

Find more on Sparse Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!