Skip to content

Dithering with Pascal Cellular Automata as probabilistic rules

License

Notifications You must be signed in to change notification settings

GovYvanR/Dithering-with-Pascal-Triangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dithering-with-Pascal-Triangle

In this article, I present a cellular automaton (CA) which evolve according to a set of rules derived from a well known combinatorial structure, the Pascal's Triangle. With only 2 neighbour cells, this probabilistic cellular automaton (PCA) produces point sampling commonly observed in high-quality digital dithering and halftoning techniques.

Feel free to play and share your discoveries :)

Related article to come...

Note: this version already implement int8 vs uint8, or just to fix the Threshold at 127 or to play with threshol modulation and negative values < maybe > the halftone result is uint8

Note: it's not completly discrete since it sample from an random uniform distribution U(0, 1), but.. ;)

#USAGE PCADithering.py <image_path>

#Dithering python3.9 PCADithering.py IMAGE_PNG/Lion.png 1 255 #Smoothing with temporal dependencies
python3.9 PCADithering.py IMAGE_PNG/Lion.png 2 255 #Smoothing without temporal dependencies ß python3.9 PCADithering.py IMAGE_PNG/Lion.png 3 255

Releases

No releases published

Packages

No packages published

Languages