Coding Challenge #47: Pixel Sorting in Processing
In this coding challenge, I implement “Pixel Sorting” in Processing (Java). Using a “selection sort” algorithm, I sort the pixels of an image by brightness and hue. Code: https://thecodingtrain.com/challenges/47-pixel-sorting-in-processing
🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/zxruKuft9
🎥 Previous video: https://youtu.be/hacZU523FyM?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Next video: https://youtu.be/UrznYJltZrU?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
References:
🔖 Sorting Algorithms Visualized: https://bost.ocks.org/mike/algorithms/
Videos:
🎥 Livestream Archive: https://youtu.be/VFnF87-JNtY
Related Coding Challenges:
🚂 #114 Bubble Sort Visualization: https://youtu.be/67k3I2GxTH8
Timestamps:
0:00 Introduction to Pixel Sorting!
0:38 You can download image and code from the code examples
1:00 Starting to Code!
1:27 Creating a blank image
1:50 Manually adding each pixel to a blank image
4:20 Discussing sorting algorithms!
5:18 Implementing the selection sort algorithm to sort the pixels by their brightness
12:23 Sorting by hue
13:12 Things you could do!
13:45 Animating the sorting process!
15:32 Testing and refactoring!
19:36 Conclusion!
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
💡 GitHub: https://github.com/CodingTrain
💬 Discord: https://discord.gg/hPuGy2g
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
🖋️ Twitter: https://twitter.com/thecodingtrain
📸 Instagram: https://www.instagram.com/the.coding.train/
🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org
📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#pixelsorting #selectionsort #processing #java