Coding Challenge #90: Floyd-Steinberg Dithering
The Coding Train The Coding Train
1.68M subscribers
433,181 views
0

 Published On Jan 16, 2018

In this coding challenge, I attempt to implement the Floyd-Steinberg Dithering algorithm and create a "image stippling" effect on an image (kitten, of course) using Processing. Code: https://thecodingtrain.com/challenges...

šŸ•¹ļø p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...

šŸŽ„ Previous video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #89:Ā Langton'sĀ AntĀ Ā 
šŸŽ„ Next video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #91:Ā SnakesĀ &Ā Ladder...Ā Ā 
šŸŽ„ All videos: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 

References:
šŸ““ DHALF.txt: https://github.com/SixLabors/ImageSha...
šŸ“š Processing Tutorial on 2D Arrays: https://processing.org/tutorials/2dar...
šŸ”— Dither on Wikipedia: https://en.wikipedia.org/wiki/Dither
šŸ”— Floydā€“Steinberg dithering on Wikipedia: https://en.wikipedia.org/wiki/Floyd%E...

Videos:
šŸš‚ My Tutorial on Pixels in Processing: Ā Ā Ā ā€¢Ā 10.4:Ā Pixels!Ā (TheĀ PixelsĀ Array)Ā -Ā Pr...Ā Ā 
šŸš‚ My Video on 2D Arrays: Ā Ā Ā ā€¢Ā 9.15:Ā 2DĀ ArraysĀ inĀ JavaScriptĀ -Ā p5.js...Ā Ā 
šŸ”“ Coding Train Live 114: Ā Ā Ā ā€¢Ā CodingĀ TrainĀ LiveĀ 114:Ā NeuralĀ Network...Ā Ā 

Related Coding Challenges:
šŸš‚ #50 Circle Packing: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #50.1:Ā AnimatedĀ Circ...Ā Ā 
šŸš‚ #85 The Game of Life: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #85:Ā TheĀ GameĀ ofĀ LifeĀ Ā 
šŸš‚ #107 Sandpiles: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ #107:Ā SandpilesĀ Ā 

Timestamps:
0:00 Introducing today's topic
1:20 Let's start coding!
2:44 An image is a grid of pixels
3:25 Quantizing an image to reduce the number of possible colors
6:24 Pull the red, green, and blue values of the pixel
7:11 Quantize the r, g, b values
8:21 Add loadPixels() and updatePixels()
9:11 Filter the image to make it greyscale
11:01 Add more color possibilities
13:01 Quantization of the error
16:01 Funnel the error
17:10 Write an index function
21:08 Update r, g, b values
24:13 Deal with the edges
26:55 Conclusion and suggstions for variations

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

šŸš‚ Website: http://thecodingtrain.com/
šŸ‘¾ Share Your Creation! https://thecodingtrain.com/guides/pas...
šŸš© Suggest Topics: https://github.com/CodingTrain/Sugges...
šŸ’” GitHub: https://github.com/CodingTrain
šŸ’¬ Discord: Ā Ā /Ā discordĀ Ā 
šŸ’– Membership: http://youtube.com/thecodingtrain/join
šŸ›’ Store: https://standard.tv/codingtrain
šŸ–‹ļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā 
šŸ“ø Instagram: Ā Ā /Ā the.coding.trainĀ Ā 

šŸŽ„ Coding Challenges: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 
šŸŽ„ Intro to Programming: Ā Ā Ā ā€¢Ā StartĀ learningĀ here!Ā Ā 

šŸ”— 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-o...

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...

#dithering #stippling #floydsteinbergdithering #processing

show more

Share/Embed