6

I have some images of tags with shapes on them (circle, rectangle and blank). After processing the images with median blur and Gabor filters I can eliminate most of the effect that variable illumination had on the images and they look like this:

tags

I've tried training an SVM using HOG, LDA, PCA and the pixels themselves but I can barely get past 40-60% accuracy. What I really want to do is use in the information in the shapes of the images. I had Fourier descriptors recommended to me, and while I've found a good tutorial about applying Fourier transform to images using NumPy and OpenCV, I'm not sure how to go about extracting Fourier descriptors from an image and then identifying the ones that are unique to the different shapes. Does anyone know how to do this or can recommend an alternative technique to get features from these images that would allow an SVM to distinguish between them?

Jack Simpson
  • 1,681
  • 3
  • 30
  • 54
  • 5
    Google will help massively here - you need to search for "Fourier descriptors" rather than Fourier transform. Fourier descriptors are made from a Fourier transform of the contours of the shape - so you would first need to extract the contours as sequences of xy positions, then transform those as if they were functions of x and y. This is not the same as transforming the image itself (as described in your linked tutorial). For example, [see this pdf](http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MORSE/boundary-rep-desc.pdf) from page 5 onward. – Roger Rowland Aug 18 '15 at 07:12
  • This would be quite easy to do with a pretrained Resnet if you have some labeled data. If you want to give it a try, I would highly recommend fastai videos. I guess videos 1 and 2 would guide you through your need. – Fred Guth Aug 10 '18 at 12:52
  • With augmentation (adding different type of noise, blurring, rotating, manipulating brightness/contrast, skewing, ...), and a MNIST-solver architecture you can do it simply solve this problem. However you can transform learning but with cost of performance (in terms of computational time) – Babak.Abad Apr 09 '20 at 09:47

0 Answers0