简体   繁体   English

通过算法进行简单的形状识别和分类

[英]Simple shape recognition and classification by algorithm

I'd like to classify simple shapes (see the attached "sample resource of shapes") algorithmically (automatically).我想通过算法(自动)对简单形状进行分类(请参阅随附的“形状示例资源”)。 Does anyone know how to do that?有谁知道这是怎么做到的吗?

The intended result would be a text such as "line", "circle", and "triangular" etc.预期的结果将是文本,例如“线”、“圆”和“三角形”等。

形状样本资源

Make sure that the shapes are always aligned the same way (for instance bottom-right justified) and decompose the space with a grid (say 6x6).确保形状始终以相同方式对齐(例如右下对齐)并使用网格分解空间(比如 6x6)。 In each grid cell, determine the length of the stroke that traverses it, and possibly a dominant direction.在每个网格单元中,确定穿过它的笔划的长度,以及可能的主导方向。

For recognition, perform the same decomposition of the shape and try a matching with all templates.对于识别,执行相同的形状分解并尝试与所有模板匹配。 You need to define a distance function that is minimized when the lengths and directions are identical and smoothly decreases otherwise.您需要定义一个距离 function,当长度和方向相同时该距离最小化,否则平滑减小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM