Image classification in video stream with contours
Please I need your help with this problem, I want to create a program to differentiate between the two forms(2 images), with a camera in real time, here are the methods. I found but I’m not sure they’re going to work because I want the detection to be feasible if the object is inclined by 90 degrees or 180 degrees by example, I have to use machine learning in this problem but I am open to any proposition, also I do not have many images in the database.
Here are the methods I found but I'm not sure they will work;
1 - Apply Canny filter to extract contours.
2 - Use a features extractors such SIFT, Fourier Descriptors, Haralick's Features, Hough Transform to extract more details which could be summarised in a short vector.
3-Then train SVM or ANN with this vector.
Also the backgroud of the image can change.
And thank you.
can you explain it a bit more ? what exactly is the goal here ?
The goal is to detect two cases : Open or Close
Maybe contours are not the best way to solve this problem because the background changes a lot, I also tried Hough Transform to detect lines, but it's not working very well, I don't know what kind of methods I gonna use
You may want to look at template matching
https://docs.opencv.org/4.0.0/df/dfb/...
It is sensitive to rotation and scale but if the camera is consistently positioned and you only care about 2 orientations, template matching may work
Thank you Chris for your answer but I already tested it and it didn’t give me good results.
Can you share some original images that have not been Canny filtered? I would like to see why template matching would not work here.
Thank you @Chris for your help, but i give up using Template Matching, i am using HOG + SVM