Skip to content

A program that takes raster image data values from any image and renders the image in black-and-white, pseudocolor, and grayscale dots.

Notifications You must be signed in to change notification settings

jasmin-singh/dot-matrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

dot-matrix

A Python3/Python Turtle program that takes raster image data values from any image and renders the image in black-and-white, pseudocolor, and grayscale dots.

How Does It Work?

This program first uses a function to get raster values from any image. Then, it takes that data and makes a sublist of values from each block of pixels by separating the blocks into rows and columns. The average pixel value is calculated from the block sublist. The average pixel value is then converted to a circle radius by dividing the block size in half. The program scans through the image data block by block and represents each with a circle depending on render style.

Input

              Example image file that depicts a flower of orange and yellow shades against greenery comprised of cool colors.

The example image (file.png) is uploaded as a test image for the program (credit: University of South Florida).
Upload your own file by replacing image_path = "file.png" with the file path to your image.

Output

Black-and-White Render

The image file is rendered in black-and-white with four different blocksize dimensions.

Pseudocolor Render

The image file is rendered in pseudocolor with four different blocksize dimensions.

Grayscale Render

The image file is rendered in grayscale with four different blocksize dimensions.

Purpose and Applications

I made this as an experimental tool to render important image information with the least amount of detail. It's fascinating to see what information our eyes and brain need to understand what an image is trying to convey. The grayscale mode reveals the depth of the image. Seeing an image in pseudocolor can help with understanding lighting, especially within low-light images (think of a heat signature). Black-and-white rendering can help with identifying silhouettes. Different rendering sizes help with interpreting how much detail is needed to see information in an image.

This is also important to learn when creating art. I aim to improve this program to become a tool (a helping eye) for artists — since it reduces the image to barebones information, this program can help artists understand what information is important when they look at reference images.

About

A program that takes raster image data values from any image and renders the image in black-and-white, pseudocolor, and grayscale dots.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages