liveBook · Manning

Grayscale image

A grayscale image represents each pixel with a single achromatic intensity value rather than separate color components.

How 3 Manning books explain it

Learn Generative AI with PyTorch

Images represented only by intensity values rather than color channels, used here as a simpler target for generation.

How it is used
Uses single-channel images as approachable inputs and targets for classification, autoencoders, and generative models.
How deep it goes
Explains one-channel structure, 784-pixel dimensions, preprocessing, visualization, and dense GAN generation, while deferring high-resolution image modeling to CNNs.
Examples
Uses Fashion-MNIST clothing items, MNIST handwritten digits, 28 × 28 layouts, and a 784-output GAN generator.
What you can do after
Apply via PyTorch and Torchvision by loading, normalizing, reshaping, visualizing, classifying, or generating grayscale images.

Read how Learn Generative AI with PyTorch explains grayscale image →

How Computers Make Books

Grayscale is a range of achromatic intensities between black and white.

How it is used
Uses intermediate gray tones to smooth low-resolution screen shapes and reproduce pictures with limited black-and-white media.
How deep it goes
Explains gray-based smoothing and names reproduction methods from thresholding through digital halftoning and Floyd–Steinberg dithering.
Examples
Compares low-resolution lines and a filled shape in black and white versus gray shades, alongside historical photograph reproduction.
What you can do after
Evaluate/understand how gray shades can make low-resolution edges smoother and simulate tones using limited media.

Read how How Computers Make Books explains grayscale image →

Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi

Grayscale is an image representation in which each pixel records a single intensity value rather than separate color components.

How it is used
Prepares camera images for face detection by reducing color pixels to intensity values.
How deep it goes
Defines single-channel intensities, shows image shapes and conversion code, then combines conversion with histogram equalization.
Examples
Uses a 640-by-480 face photograph, converts it with cv2.cvtColor, and marks the detected face on the original frame.
What you can do after
Apply it via the OpenCV cv2 library to prepare images for a face classifier.

Read how Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi explains grayscale image →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.