Realtime pixel sorting

This is a realtime pixel sorting algorithm. The pixels on the image are sorted by hue or saturation or brightness.

It’s possible to add interactivity with a camera image which forces the algorithm to re-organize again, and again.