Publications / 2025 / A Reversible Grayscale Method Based on Bit-Field Multi-Channel Fusion Encoding

A Reversible Grayscale Method Based on Bit-Field Multi-Channel Fusion Encoding

Teng Wang, Wei Pan, Yong Yang, Pascal Lef\`evre
2025 10th International Conference on Image, Vision and Computing (ICIVC), 555-560

In one sentenceInstead of training a network, this method packs an image’s hue, saturation and value into the bit fields of one 16-bit grayscale pixel, so colour comes back with a few bit shifts in milliseconds.

The problem

Grayscale images are widely used because they cut computational complexity, storage and transmission cost. In many applications, though, the original colours are needed again later, so the conversion should be reversible: the grayscale image has to carry enough colour information to restore the RGB image.

Traditional reversible grayscale methods, such as histogram shifting and wavelet-packet data hiding, embed colour cues into the luminance channel. They usually impose extra transform-domain constraints or need several auxiliary channels, which adds computation and memory. Deep-learning methods reach high reconstruction fidelity but bring high inference latency, large models, limited interpretability and a strong dependence on training data.

How it works

The method needs no training. Each RGB pixel is converted to the HSV colour space, which separates the chromatic part (hue H, saturation S) from the luminance part (value V). The three components are quantized to a, b and c bits with a + b + c = 16 and written side by side into the bit fields (H in the high bits, V in the low bits) of one 16-bit grayscale pixel. Decoding reads the fields back with shifts and masks. The whole pipeline uses only quantization and bitwise operations, and it is exactly invertible except for the quantization error.

  1. Normalize. The three channels of an 8-bit RGB pixel are divided by 255, so they lie in [0, 1].
  2. RGB to HSV. The standard conversion gives hue H as an angle from 0° to 360°, saturation S and value V; H is then scaled to [0, 1).
  3. Allocate the 16 bits. The output pixel’s 16 bits are split into a bits for H, b for S and c for V. The split can follow the image statistics, with a and b proportional to the variances of H and S and c taking the rest. The paper also gives four example schemes; the balanced Scheme 1 uses (6, 4, 6).
  4. Quantize and pack. H, S and V pass through a non-linear (gamma) mapping that favours perceptually sensitive ranges, are quantized to 2a, 2b and 2c levels, and are packed as IG = (Hq ≪ (b + c)) | (Sq ≪ c) | Vq. The result is a single-channel 16-bit grayscale image.
  5. Decode. Bit masks and shifts recover Hq, Sq and Vq; inverse quantization and the standard HSV-to-RGB transform give the 8-bit RGB pixel back.
Pipeline diagram. Top row: an original RGB photo of half-timbered houses passes through Normalize, RGB to HSV and Bit-field Encode blocks to an invertible grayscale image. Bottom row, in red: the grayscale image passes through Bit-field Decode, Fusion to HSV and HSV to RGB blocks to the reconstructed RGB image.
The reversible grayscale framework: encoding (normalize, RGB to HSV, bit-field encode) turns the RGB image into an invertible grayscale image; decoding (bit-field decode, fusion to HSV, HSV to RGB) restores the colour image. Fig. 1 of the paper.

The choice of (a, b, c) trades accuracy between the channels. Because people are sensitive to hue changes, the authors recommend a ≥ 5 (32 hue levels) to avoid visible colour shifts, and c ≥ 6 (64 value levels) to prevent banding; b can be reduced for images with little colour. Hue is circular, so a non-linear quantization keeps errors small near 0°/360°, and Floyd–Steinberg error diffusion spreads the remaining quantization error spatially.

Results

The method was evaluated on four datasets: Kodak PhotoCD (24 images), Urban100 (100 urban scenes), BSD500 (500 natural landscapes) and McMaster (18 images). It was compared with two learning-based invertible grayscale methods, IDN and a CNN-based method, using MAE, PSNR, SSIM, FSIM and LPIPS, and timed on an AMD Ryzen 9 7945HX with an NVIDIA GeForce RTX 4060. Of the four bit-allocation schemes, Scheme 1 (6, 4, 6) gives the best balance; Scheme 2 (5, 5, 6) reaches the highest SSIM of the four on Kodak (0.9779), and Scheme 4 (6, 5, 5) is the fastest at 3.21 ms encoding and 4.49 ms decoding. The 16-bit files are also slightly smaller on Kodak: 633.20 KB for Scheme 1, against 721.47 KB for IDN and 660.87 KB for the CNN-based method (Table II).

The speed comes at a cost in fidelity. On Kodak, IDN reaches 42.16 dB PSNR and the CNN-based method 37.40 dB, against 34.80 dB here, and the authors note that a recent reversible data-hiding method reports 43.69 dB. They see the method as a lightweight, interpretable alternative for resource-constrained settings such as edge and embedded systems, and plan adaptive allocation algorithms and reversible compression to close the quality gap, and FPGA/ASIC implementations to further cut latency.

Three rows of Kodak photos (a mountain stream, a yellow raft with paddlers, a painted house), each shown as original, the method's grayscale image, and colour reconstructions by IDN, the CNN-based method and the proposed method with Scheme 2.
Visual comparison on three Kodak images: (k) original, (l) the method’s grayscale image, (m) IDN, (n) CNN-based, (o) the proposed method with Scheme 2. Fig. 2 of the paper.

Cite

@inproceedings{wang2025reversible,
  title={A Reversible Grayscale Method Based on Bit-Field Multi-Channel Fusion Encoding},
  author={Wang, Teng and Pan, Wei and Yang, Yong and Lef{\`e}vre, Pascal},
  booktitle={2025 10th International Conference on Image, Vision and Computing (ICIVC)},
  pages={555--560},
  year={2025},
  organization={IEEE},
  doi={10.1109/icivc66358.2025.11200402}
}
Type
Paper Conference
Topic
Optics & Image Processing
Venue
2025 10th International Conference on Image, Vision and Computing (ICIVC), 555-560
Year
2025
DOI