Solved – Use Edge detection in Image classification

image processingmachine learningneural networks

I am having five types of objects (flower, building, face, pair of shoes and a car) in my object recognition and i need to classify these. Identifying through edges in this type of data set seems to be a valid and distinguishable approach. So i have used canny edge detector(read it somewhere as a good approach) to find the edges in the image. Now i want to use this edged image to classify my objects. But since i am new to image recognition, i really couldn't figure how should i be selecting the features from this edged image for classification.

  1. Will it be a good approach to use all the pixels in the image(after canny edge detector) as features to any ANN classifier, but i think that would give a lot of redundant features (as most of the image is black except the edges) and there might be a possibility to reduce these. Is there any algorithm to select appropriate features from the image formed after canny detector?

  2. Second possibility could be to use any feature matching algorithm that could calculate the distance of the pixels between training and test data set(both edged) and predict the result with minimum distance. This is my approach but not sure about any existing algorithm. So needed some help on this.

Also i tried considering CNN(since they intrinsically use the edged approach) but these seem to be really computationally expensive.

Best Answer

Your approach goes in the line of the popular histogram of gradients approach. See here and the corresponding Wikipedia entry. Now unless you have some already labelled data, training such a system is quite laborious. If possible, I would start by using some available implementation to experiment with, like the one offered by scikit-image.

There are some other features, like Linear Binary Pattern, but they're not as powerful as HOG. See in the module corresponding of scikit-image for a list of features and their implementations.

As for CNN, you should not need to extract any features. The system learns the features automatically. That is one of the nice properties of deep architectures. A huge number of papers show that these systems learn some edge oriented filters features (in the same line as the idea you are considering).

Note that these features do not consider color. That may be an interesting feature for you to consider. Or extract the features for each of the color channels.

Hope this helps.

Related Question