I did a project at school where I had to classify objects into cats and dogs. I used SVM and logistic regression to achieve this.
The images were given to us in the form of features. So we did not have to handle things like image centering and so on...
My questions is, how do you center all the images so my classifier can learn better? I know CNN are good for this, but I would like to know just how to center the images before classification?
Thanks!
I don't know this is the best solution or not, but You can try by find the center of the object, then shift the image so the center of the object become the center of the image.
Step by step:
findContours from OpenCV. But this is the hardest part, it really depends on your image and may need more advance technique.moments from OpenCV or just manually compute using Centroid methodwarpAffine or compute it manually using Affine TransformI found nice tutorial for step 1 and 2 in OpenCV documentation:
http://docs.opencv.org/2.4/doc/tutorials/imgproc/shapedescriptors/moments/moments.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With