# manual_kmeans
python手动实现图像像素的kmeans聚类分割
****
a.py:使用了像素的r,g,b三个特征值进行聚类。
b.py:使用了像素的r,g,b加上x,y坐标共五个特征值进行聚类。
原图:
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/test.jpeg" height="100px">
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/demo.jpg" height="100px">
聚类效果:
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/a.jpg" width="200px">
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/b.jpg" width="200px">
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/result_a.jpg" width="200px">
<img src="https://github.com/lizhiTech/manual_kmeans/blob/main/result_b.jpg" width="200px">
****
代码说明可以参考csdn博客:https://blog.csdn.net/Lizhi_Tech/article/details/128626203
我们也提供包括但不限于深度学习、计算机视觉、机器学习等方向的代码代做及辅导服务,有需求可以通过淘宝联系我们。
<img src="https://github.com/lizhiTech/pytorch_simple_teaching_example/blob/main/%E6%B7%98%E5%AE%9D%E5%BA%97%E9%93%BA.jpg" width="500px">