Minecraft Redstone Lamp Display Emulator
Website for converting images to Minecraft redstone lamps (1 bit). Upload an image and choose binarization and dithering algorithm to turn it into the lamps.
Screenshot from the game “Return of the Obra Dinn” by Lucas Pope processed by this tool
So far I've implemented those local binarization algorithms:
- Niblack method
- Sauvola method
- Wulff method
- Bradley-Roth method
and those ordered dithering algorithms:
- White noise
- Blue noise
- Interleaved Gradient noise
- R2
- Plus
- Bayer level 1-3
- Pattern Halftoning
- Cluster dot
and those error diffusion dithering algorithms:
- Floyd-Steinber
- Jarvis-Judice-Ninke
- Atkinson
- Stucki
- Burkes
- Sierra
- Two-Row Sierra
- Sierra Lite
- Stevenson-Arce
If you wish to know how exactly dithering and binarization works I provided a lot of useful resources later in this article. What I haven't seen anyone else do is combine binarization and dithering. Let me explain on this random image from the internet:
input image
The main goal of dithering is to preserve monochrome colour:
dithered with R2 algorithm threshold=128
But this comes with the loss of detail, for example text is not readable now. The main goal of binarization is to preserve detail, is it mainly used in OCR:
binarized with Sauvola method m=7, k=0.25
As you can see now we lost all the colour. So my method is to process original image with binarization and dithering algorithms separately and later combine by multiplying corresponding pixels together. This way we preserve both colour and detail information:
both algorithms combined
Here are some examples of it working, for input I took pixelarts from sexypixelize and processed them:
Dithering algorithm: Jarvis-Judice
Global binarization: threshold
Dithering algorithm: Floyd-Steinberg
Dithering algorithm: Bayer 8x8
Dithering algorithm: Jarvis-Judice
Dithering algorithm: Jarvis-Judice
Atricles:
Ditherpunk — The article I wish I had about monochrome image dithering
Image Dithering: Eleven Algorithms and Source Code
Image segmentation (ru)
Tools:
dithering demo
binarization demo
dithering
How to launch yourself using Node.js and Visual Studio Code
# install yarn
npm install --global yarn
# now install all modules
yarn
# now start project
yarn dev
# build ssg version
yarn generate
This program is licensed under the GPL-3.0 License. Please read the License file to know about the usage terms and conditions.