1 | initial version |
You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins are readable such as they have a sense. If all the coin are the same or a small set, then you can take one for each kind as a reference and compute the homography for the others: this can be an idea to fastly do it. If you have more than one coin you can do de following.
A training phase:
This is your database of features, it need to be quite accurate so I suggest you to use a nice feature detector (SIFT probably can do the job) and a nice matcher (take a look at GMS, in my honest opinion one of the best so far)
For every coin you would like to align you should:
That should do the job. For the coin for which there is uncertainty you can propose a rotation angle and let the user decide which one should be applied.
HINT: You can detect feature just inside the coin detacting the circle shape of the coin first and discarding all the feature outside the coint to avoid some noise. This can be an improvement
Sorry for my english, I'm in a rush, but I hope that you understood.
2 | No.2 Revision |
You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins are readable such as they have a sense. If all the coin are the same or a small set, then you can take one for each kind as a reference and compute the homography for the others: this can be an idea to fastly do it. If you have more than one coin you can do de following.
A training phase:
This is your database of features, it need to be quite accurate so I suggest you to use a nice feature detector (SIFT probably can do the job) and a nice matcher (take a look at GMS, in my honest opinion one of the best so far)
For every coin you would like to align you should:
That should do the job. For the coin for which there is uncertainty you can propose a rotation angle and let the user decide which one should be applied.
HINT: You can detect feature just inside the coin detacting the circle shape of the coin first and discarding all the feature outside the coint to avoid some noise. This can be an improvement
I can't provide to you Python code because I use OpenCV in C++, but you can find many tutorial of every point of the bullet list. Just fuse everything together!
I hope that helped, let me know! Sorry for my english, I'm in a rush, but I hope that you understood.
3 | No.3 Revision |
You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins are readable such as they have a sense. If all the coin are the same or a small set, then you can take one for each kind as a reference and compute the homography for the others: this can be an idea to fastly do it. If you have more than one coin you can do de following.
A training phase:
This is your database of features, it need to be quite accurate so I suggest you to use a nice feature detector (SIFT probably can do the job) and a nice matcher (take a look at GMS, in my honest opinion one of the best so far)
For every coin you would like to align you should:
That should do the job. For the coin for which there is uncertainty you can propose a rotation angle and let the user decide which one should be applied.
HINT: You can detect feature features just inside the coin detacting detecting the circle shape of the coin first and discarding all the feature features outside the coint coin to avoid some noise. This can be an improvement
I can't provide to you Python code because I use OpenCV in C++, but you can find many tutorial of every point of the bullet list. Just fuse everything together!
I hope that helped, let me know! Sorry for my english, I'm in a rush, but I hope that you understood.