pattern recognition Assignment 07 k-means clustering consider image intensity and spatial location object function $$ \sum_k \sum_{ x \in I(k) } [ | f(x) - m_k |^2 + a * | x - c_k |^2 ] $$ visualize clustering image visualize intensity energy and spatial energy