Message Boards Message Boards

GROUPS:

Pixel sorting according to different methods

Posted 6 years ago
4579 Views
|
1 Reply
|
4 Total Likes
|

Inspired by a tweet from Wolfram Research and their link to this, I made this Manipulate. Hopefully it will inspire others to do better?

Manipulate[
 Image[RotateLeft[#, t] & /@ 
   RotateLeft[SortBy[ImageData[im], fun[#[[All, c]]] &], s]],
 {{fun, First, "function applied"}, {First, Last, Mean, Median, Norm, 
   Normalize, StandardDeviation, Total, Accumulate, 
   Flatten@Gather[#] &, Sort, Commonest, Differences, 
   TrimmedMean[#, .35] & -> "trimmedMean", 
   TakeLargest[#, 1] & -> "takelargest", Nearest[#, {0, 0, .5}] &}, 
  PopupMenu},
 {{c, 1, "color"}, {1 -> "red", 2 -> "green", 3 -> "blue"}, SetterBar},
 {{s, 0, "shift up-down"}, -200, 200, 1},
 {{t, 0, "shift right-left"}, -200, 200, 1}]

The original pic is here One result of pixel sort is here

enter image description here

Attachments:

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract