How to find center of many objects included in single image
4 views (last 30 days)
Show older comments
Hello, I need some solution to find the center of the discs in the next image automatically. then i have to draw the profile of the line that crossing these points. I have the attached reference, i really don't understand what they did when telling about the step of "Locating the Central Sagittal Cross-section". So can anyone help me PLEASE :(
0 Comments
Answers (1)
Florian Morsch
on 11 May 2018
They used a canny edge detection and then compared the found objects with a reference.
What you want to do is to check for the "disks", use a edge detection ( e.g. canny https://de.mathworks.com/help/images/edge-detection.html?searchHighlight=edge%2520detection&s_tid=doc_srchtitle ) and then use regionprops() ( https://de.mathworks.com/help/images/ref/regionprops.html?s_tid=srchtitle ) to find the center of the found objects. After that you can draw a line from point to point.
2 Comments
Florian Morsch
on 17 May 2018
Edited: Florian Morsch
on 17 May 2018
If you check the documentation on regionprops() you will see different properties you can use. Try to figure out which combination suits your case.
For exsample you could take a look on all found objects. The vertebras should be bigger (pixelwise) then other objects, maybe even the bigges. So you could filter regionprops() for only the biggest objects.
Maybe you have to do some image processing first, e.g. if you know that the spine will be on the same position in multiple images you could try to create a mask so you see only a part of the image, then check that part, which will erase some false objects.
EDIT: After i have taken another look on the paper you gave, they find the vertebrae with a canny edge detector and then run a comparison to a predefined model. So they know what the vertebrae looks like and find all objects looking the same found with the canny per correlation.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!