I wrote this Code fragment
Which is a E (quarter) note in Treble Clef. Instead Mathematica simply classified it as a "musical note" Can we do better?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityHere is my humble approach.
sheet = Import["https://rmurta.s3-sa-east-1.amazonaws.com/mathematica-playground/sheet.png"];
note = Import["https://rmurta.s3-sa-east-1.amazonaws.com/mathematica-playground/note.png"];
examples = Map[ImageResize[#, 100]&]/@ <|
"mi" -> (ImageCompose[sheet, note,{200,235} + #]&/@RandomReal[{-5,5},{4,2}]),
"fa" -> (ImageCompose[sheet, note,{200,280} + #]&/@RandomReal[{-5,5},{4,2}]),
"sol" ->(ImageCompose[sheet, note,{200,360} + #]&/@RandomReal[{-5,5},{4,2}]),
"la" ->(ImageCompose[sheet, note,{200,400} + #]&/@RandomReal[{-5,5},{4,2}]),
"si" ->(ImageCompose[sheet, note,{200,430} + #]&/@RandomReal[{-5,5},{4,2}]),
"do" ->(ImageCompose[sheet, note,{200,490} + #]&/@RandomReal[{-5,5},{4,2}])
|>;
c = Classify[examples];
Copying your example into Mathematica, and applying c
into It:
ImageCompose[sheet, note,{200,360}]
$\endgroup$
ImageIdentify
) can do is identify it as a musical note. I look at it in the context of a bass clef and see either a low G, G-sharp, or G-flat. $\endgroup$