|
Algorithm 1: SP-k-Means Clustering Algorithm
|
| 1. Input: Pre-processed cryo-EM image
|
| 2. Return: Super-clustered image
|
| 3. Set number of clusters,
|
| 4. Generate the 2D super-pixel from the super-clustered image |
| 5. begin/* SLIC */ |
| 6. Initialize /* the cluster centers */ |
| 7. Move the cluster center cluster centers to the lowest gradient position in a 3 × 3 neighborhood. |
| 8. Set label for each pixel . |
| 9. Set distance for each pixel . |
| 10. repeat
|
| 11. for
to
do
|
| 12. for each pixel in region around
do
|
| 13. Compute distance D between and . |
| 14. if
then
|
| 15. set . |
| 16. set . |
| 17. end if
|
| 18. end for
|
| 19. end for
|
| 20. Compute new cluster center . |
| 21. Compute residual error . |
| 22. until
|
| 23. generate binary mask |
| 24. end/* SLIC */ |
| 25. repeat
|
| 26. for n = 1 to
do
|
| 27. Determine the closest representative, , for
|
| 28. Set label for data point to
|
| 29. end for
|
| 30. for k = 1 to K
do
|
| 31. Update cluster representative to the mean with cluster label
|
| 32.
|
| 33. end for
|
| 34. until change in cluster centers are small |
| 35. for k = 1 to to K do/* foe each clustered image */ |
| 36. /* extract the total number of the non-zero element in each cluster and select the cluster that has the minimum total number of the non-zero element */ |
| 37. end for
|