# what could it be a good descriptor for simple greyscale symbols?

I need to find a good method to extract key points from drawing symbols like elements in CAD drawings (eg in 2D objects for the bathroom that can be placed on a floor plan).

I've already tried all type available in openCV/accord (FAST, SURF, Harris, ..) but all of them failed to give me any point.

The images are blank and white (with some sort of grey scale) and I'd like to find the position of a limited set of symbols inside bigger images containing other unknown objects/shapes (that I'm not interested in anyway).

The basic idea is to get the descriptors for my symbols and check if the target image contains similar descriptors.

If I have a good method for descriptors then I can train a classifier to check all the descriptors from the input images and so I can also know the position related to the recognized object.

Framework can be any with preference on OPENCV, Accord.net, tensorflow

• Are you preprocessing your images for noise and rectification? Can you post image samples?
– Emre
Apr 13 '17 at 23:11
• I completely abandoned the descriptor way and went for a deep learning solution and getting good results with inception model Apr 14 '17 at 9:43

If you can take a quick look with photoshop and get information on the shade of gray and zoom into the objects and count a pixel pattern.

You would be able to build an algorithm around the color 0-255 in 8-bit grayscale and create a simple matrix for each symbol based on the number of pixels you counted.

 110, 0,   0,   0,   0
110, 0,   0,   0,   0
0,  110, 110, 110,  0
0,   0,   110, 110, 0
0,   0,   110, 110, 0


You can see a shape emerge from the matrix...that is what you train on, but you do so by having the script read pixel by pixel and create a matrix.

This would be a gray (110) on black (0) shape. If you only have a few, you could go into photoshop and cut the symbols out at the exact shape and feed the shape into your model and train it to look for that specific color and shape.

You might need to build an equation to scale it up or down so that it could account for using the identifier at different sizes or on files with different pixel depth.

you could also do this in R or python by reading a file in and localizing that data, but it would be easier to bring in exactly the shapes as separate files. You might also need to give the model some leeway as to the darkness like from 100-120 depending on how the images enter the system.

If they are digital and unmodified straight out of CAD this is likely unnecessary, but if they are scanned or grabbed online, you will not have consistent exact numerical color-depth and need to account for the variation in your algorithm.

For that scenario i think training a classifier like viola-jones/adaboost for segmentation would lead to a region of interest you can use.