I have a Minos classifier with which I can find the object that I have trained reasonably well but as soon as I rotate the object it won’t be found any more. Also I can’t find where I can read the rotation from the result.
Sorry to break bad news on you: Minos is not per se working rotation invariant…
There are different ways to work around that, though:
- If you only need to cover a small range of rotations (something like up to 5°) and are not interested in retrieving the rotation as part of the search result, then you can just use the Invariants feature ( inside TeachBench) to generate slightly rotated variations of your training set images. Learning from a thusly modified training set will yield a classifier that’ll also be able to robustly find slightly rotated versions of your objects.
- If, however, you want to measure the rotation of your object as accurately as possible, then generate a classifier that has no invariants and shows the object always accurately oriented, then use that classifier in a loop over the image, rotating the coordinate system of the image as you go. The classifier should yield the best result at the correct rotation.
If the loop takes too long for your application, you could use the approach with the invariants to generate a more relaxed classifier that you can use to predefine the orientation in a first loop (e.g. with an increment of 10°) and then use the precise classifier only around the previously best result, thus reducing the total amount of steps.
(the CSRotOcr tutorial shows how to rotate the coordinate system in a loop)
Ultimately, if you want to make rotation invariant search and orientation measurement easier you might also want to have a look at ShapeFinder and Polimago - both support this out of the box.