How can I find the x and y coordinates of some objets into an image?

2 次查看(过去 30 天)
I have the following image
and I need to find de x and y coordinates of every music note into the image. I have tried with the function normxcorr2 using the mask of a head of one note, but I only am able to detect one of the notes (the most similar to my mask). Could anyone help me or give me another point of view?. Thank you in advance for your time and support.

回答(1 个)

Image Analyst
Image Analyst 2014-5-7
See this section:
23.2.7.3 Analysis of Music, Musical Notation, Music Scores
That will have the good methods. What I might propose might not be as robust for all note shapes. But that would be to find the QR codes in the corner and crop the image to the center, assuming the notes only appear there. Then I'd call imfill() to fill in note heads. You could then use normxcorr() for each note template. Or else see if each note has a unique area and classify notes based on area. Or skeletonize it and classify based on number of endpoints. But the papers will have a lot better methods so read the abstracts and code up the best sounding one.
  2 个评论
Alberto
Alberto 2014-5-10
编辑:Alberto 2014-5-10
Thank you for your ideas. I am trying with the regionprops() method, because with some instructions like BoundingBox and Centroid before delete the QR codes, I can obtain the center and area of each note. Apparently it is working, but I need to do a better test. Thank you for the documentation and biography. It looks a great resource!!.
Image Analyst
Image Analyst 2014-5-10
You're welcome. If you need any help with the code once you have it more developed, come back. Could you mark the answer as Accepted then, to close it out?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Segmentation and Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by