Blue Noise Generator Library
Blue noise, originally used in digital halftoning, has attracted renewed attention as its applications have expanded beyond image processing.
The images below compare white noise generated from random numbers with blue noise.
If you notice regular noise patterns, reset your browser zoom level to 100% before viewing.
| Animated GIFs of white noise and blue noise using the same threshold | |
|---|---|
![]() |
![]() |
| White Noise | Blue Noise |
| White Noise | Blue Noise | |
|---|---|---|
| Whether values are random | Random numbers | Processed random values (not random numbers themselves) |
| For example, when 30,000 values are generated, whether duplicate values occur | Duplicates occur | No duplicates |
| Average value within a rectangular region | Varies | Nearly constant |
| Visual characteristics | Uneven distribution | Uniform distribution |
Our library supports two-dimensional blue noise, which is used in the following fields (click to expand)
- digital halftoning Halftoning quality comparable to error diffusion can be achieved with a simple, fast array lookup.
- Route Finding in Navigation Systems and Communication Networks Alternative routes unaffected by congestion on the original route can be found quickly.
- Faster, Higher-Quality AI Image Generation Using correlated random values to initialize parameters can improve image-generation efficiency in GANs (generative adversarial networks). Blue noise is also a form of correlated random sequence (and, in this description, is not considered mathematically random once correlations are introduced).
- Game Character Placement and Gacha Probability Control The placement of game characters on a two-dimensional map can be controlled as desired.
Many printers reproduce full-color images using approximately three to eight ink colors, or grayscale images using only black ink.
Blue noise is used in printer drivers because it can provide quality comparable to error diffusion with much simpler circuitry.
Winning probabilities in lotteries or gacha systems can be adjusted as desired.
The library source code is published on GitHub as open-source software under the MIT License.
Download the source code (free) here (https://github.com/TakanobuSaito/huge-bluenoise-generator).
Features
(1) Performance
The library generates blue noise as a two-dimensional matrix.
Unlike ordinary random-number generation, the generated values contain no duplicates.
The average value in any rectangular region of the matrix is approximately the same regardless of its position.
With the original void-and-cluster algorithm, generating even a 1024×1024 matrix could take several days. This library generates one in 52 seconds on a typical laptop.
| Matrix Size | Blue-Noise Value Range | File Size | Memory Required | Generation Time (Typical Business Laptop) |
|---|---|---|---|---|
| 256×256 | 0~0x0000ffff(0~ 65,535) | 256KB | 8 MB approximately | 1.0 seconds |
| 512×512 | 0~0x0003ffff(0~ 262,143) | 1MB | 32 MB approximately | 5.8 seconds |
| 1024×1024 | 0~0x000fffff(0~ 1,048,575 | 4MB | 128 MB approximately | 52.2 seconds |
| 2048×2048 | 0~0x003fffff(0~ 4,194,303) Sufficient for most images | 16MB | 512 MB approximately | 388.5 seconds |
| 4096×4096 | 0~0x00ffffff(0~ 16,777,215) Sufficient for inkjet control in ordinary printers | 64MB | 2just under GB(Limit for a 32-bit build of the library) | 2315.6 seconds |
| 8192×8192 | 0~0x03ffffff(0~ 67,108,863) Sufficient even for halftoning on very large printers | 256MB | 8just under GB | 13425.4 seconds |
| 16384×16384 | 0~0x0fffffff(0~268,435,455) So large that practical applications are hard to imagine | 1024MB(1GB) | 32just under GB(Limit of the test laptop) | 24 hours or less |
(2) Applications in Dithering
Blue noise was originally used for dithering. Dithering, or digital halftoning, is used to print grayscale images with a single black ink or full-color images with three to eight ink colors.
(3) Source Code
Download the source code (free) here (https://github.com/TakanobuSaito/huge-bluenoise-generator).
The library source code is available free of charge.
It is open-source software under the MIT License and may be used commercially, modified, and redistributed freely.
The complete source code is included, as detailed below.
- Library Source Code (C++/C) There are no external library dependencies (such as OpenCV). The library can be built using only the supplied source code.
- Python Sample Programs Console version of a dynamic-link library import test program
The library can be built on Windows. Since the core has no Windows dependencies, the static library should also be linkable on Linux (not yet verified).
The dynamic-link library component is Windows-dependent, but should be straightforward to port to Linux.
GUI version of a dynamic-link library import test program
C++ Class Library Reference Manual
Provided as HTML files
Multilanguage Dynamic-Link Library Reference Manual
Provided as HTML files

