Skip to content

asztr/BlueNoise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlueNoise

Code repository for the paper:

Fast Blue Noise Generation via Unsupervised Learning
Daniele Giunchi*, Alejandro Sztrajman*, Anthony Steed
International Joint Conference on Neural Networks (IJCNN), 2022.

ijcnn2022-teaser

Training

Running the script bn_train.py will train the blue noise neural network model and save it as model128.h5 and model128.json, where 128 indicates the resolution of the square grayscale blue noise masks generated by the network.

Prediction

Run the following line to generate a blue noise texture using the model model128.h5:

python bn_predict.py model128.h5 --cpu

This will create an output file pred128.png with the grayscale blue noise mask.

Dithering

Use the script dither.py to perform dithering of an image with our generated blue noise:

python dither.py --images "img/meadow1.png" --noises "pred128.png" --bits 1

This uses the blue noise mask in pred128.png to dither the image meadow1.png, compressing it to a single bit per color channel, outputting the file dither_meadow1_pred128_bits4.png.


Left: original image. Right: dithering with 2 bits per channel.

BibTeX

If you find our work useful, please cite:

@article{giunchi2022bluenoise,
    author={Daniele Giunchi and Alejandro Sztrajman and Anthony Steed},
    title = {Fast Blue-Noise Generation via Unsupervised Learning},
    booktitle = {International Joint Conference on Neural Networks},
    year = {2022}
}

About

Code repository for the paper "Fast Blue Noise Generation via Unsupervised Learning" (IJCNN 2022)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages