We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi All,
I'm new to processing but have been trying to pick it up lately. I am a painter and know next to nothing about code but I did successfully use a code this month to write video to LEDs. I am now really interested in the possibility of being able to abstract a video by assigning pixels to certain areas of a screen. I'd like to be able to sort the pixels of each frame of a video by color so that each frame still contains its original pixels but not in their original order. Any chance theres a code that will somehow do this for me out there? :)
Currently trying to consult people in the engineering school of my university but they're not very familiar with processing.
Anything would help, thanks !!
Answers
Even if theres a way to sort pixels of an image in such a way that would be pretty helpful... I could edit the images together myself into a video if that was a possibility but it does seem like an arduous process.
how exactly? rgb? hsb? horizontally? vertically?
@Alment -- These examples of code that sort pixels might be helpful:
Keep in mind that in Processing there is a pixels[] array for the screen and for any PImage or PGraphics buffer
...so one of the simplest ways to do this is just to sort those numbers
https://www.reddit.com/r/processing/comments/44wt07/code_to_sort_pixels_by_colour/
-- although the results may be unexpected depending on your color expectations. This is why it is important to think through the questions from @koogs.
If you want a pre-made tool for doing this and don't want to write your own, try sorty:
thank you @jeremydouglass and @koogs. That is very helpful! Some of those entries seem like they're not working because they're for an older version of processing but I'm very excited at the possibilities here. I think I am mostly hoping for horizontal hsb organization and actually that image of the processing logo looks like what I had imagined. The ultimate sort looks promising but is not working properly so I'm going to go ask some folks for a bit of assistance with it.
The bit of code above that processing logo may be the easiest way to start and I suppose adding the information in the reddit forum as criteria to sort by would help me in making images that I could compile into a video. I was considering a pretty lengthy video so maybe i will have to settle for some slow transitions if theres no code to apply the same action to a moving image.
So helpful though!