![](/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.