How to divide a shape into 4 areas, using the diagonals of its bounding box?

4 visualizaciones (últimos 30 días)
ziggy
ziggy el 19 de Sept. de 2016
Comentada: ziggy el 19 de Sept. de 2016
Hi, I have a big blob with a small blob within it and I am trying to detect in which area of the big one the small one (its centroid) lies. By comparing the coordinates of the centroid of the small blob against coordinates of the centroid of the big blob, I did detect where it lies within the 4 "quadrants" you get when you divide the big blob with a cross-section (top right, top left, bottom right, bottom left), see black lines in image.
I would like to divide the big blob in a different way, similar to the one above but rotated by 45 degrees. I would like to get the 4 sections separated by the red lines (forming an X) in the image, numbered '1','2','3','4'. I thought of getting the bounding box of the big blob and then the diagonals of the box.
BigBlobBox = regionprops(BigBlob, 'BoundingBox' );
How would I get the areas of the big blob within each of the 4 areas created by the intersection of the diagonals? Any ideas/suggestions would be very appreciated. Thanks!

Respuestas (1)

Image Analyst
Image Analyst el 19 de Sept. de 2016
Why not just get the centroid of the small one? Why do all this stuff about dividing the big one up in to slanted quadrants and messing with bounding boxes and all that??? If you want to know there the small one is, just get its centroid or a list of all the pixel coordinates it occupies. Perhaps if you showed the original gray scale image it might be more clear.
Why do you want to know where the small one is anyway? For example, maybe you really need to know the average radial profile of the small blob but came up with this quadrant/bounding box scheme thinking you had to do it that way, but if you just let us know what you really need to know, we'd come up with a better approach.
  1 comentario
ziggy
ziggy el 19 de Sept. de 2016
Hi Image Analyst, thanks for your answer. I did use the centroid of the small one and by comparing with the centroid of the large one I found where it was, but among the "Quadrants" shown within the black lines in the image. This way works well and I have saved the results.
The reason I am trying to also achieve the alternative and very specific division is that I am dealing with CT/MRI data and this is the way clinicians describe where something is found anatomically (anterior, posterior etc.). I just want to extract this information as a descriptive label of the anatomical position of my small area within the large one; mainly to try and follow the "standardised" way this is communicated in inter-disciplinary projects.
I wondered if there was a straightforward way I hadn't thought of. If you believe it is very complicated to implement though, I might stick to my original cross-quadrants.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by