Work with 8-bit black and white images.


Full Script Functionality:

  • The system reads 3 black-and-white images with 8-bit grayscale in 512x512px working folder, or another with the absolute path we will work with.
  • Images must use an 8-bit black and white palette, and a black and white image from a 24-bit RGB palette will not load the image and compile it.
  • The system generates a random bit sequence to multiply the columns of each image. The column represents the given bit of each pixel in the image, from LSB -> MSB.
  • The system expresses each pixel via an unsigned int data type on eight bits [0-255], which determines the black value. Black = 0, white = 255.
  • The system generates 8 altered images, one column at a time - a given bit of the range 0-255 with weight (1, 2, 4, 8,16,32,64,128)
  • The system draws each modified image by the LSB (less significant bit) bit to the MSB (most significant bit), that is, a total of 8
  • Combine these 8 altered images into one - final, where the changed bit levels will show the most
  • The system then draws all transitions, original and final images into a window where the differences can be clearly seen.
  • Script also determines Peak-to-Noise (PSNR) performance and also determines the mean square error (MSE).
  • Source code on Github: Github repo