![](/img/trans.png)
[英]How to merge content from files with same name but in different folders by Python?
[英]How to cluster a set of image files to different folders based on their content
您可以按照以下方法:
1. Create a look-up tables with shape you are using in the images
2. Do template matching on the images stored in a single folder
3. According to the result of template matching just store them in different folders
4. You can create folders beforehand and just replace the strings in program according to the usage.
我希望这有帮助
这实际上取决于数据集的外观(例如,形状图像的外观)以及解决方案的稳定性。 棘手的部分是从每个形状图像中提取特征,以产生您满意的聚类结果。 一些想法:
您可以为每个图像计算SIFT功能 ,然后基于这些功能对图像进行聚类: http : //en.wikipedia.org/wiki/Scale-invariant_feature_transform
如果您不想走SIFT路线,则可以尝试类似HOG的方法 : http : //en.wikipedia.org/wiki/Histogram_of_ 取向_gradients
一种比较幼稚的方法-如果形状总是相同的比例,并且背景颜色是固定的,则可以基于形状区域 (例如,形状所占据的像素数)来消除背景群集图像。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.