Skip to content

Bhuwan-24/Image-Processing-With-Numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I used Python and NumPy to manipulate images at the pixel level. It turns out that a photo is really just a giant 3D matrix of numbers and if you know how to slice an array then you can edit an image

I'm currently diving into Data Science and Machine Learning. Everyone talks about Computer Vision but I wanted to understand the basics first. I challenged myself to perform standard image editing tasks using only math and matrix operations.

I took an image and wrote scripts to:

Crop: I used array slicing to cut out specific parts of the image

Low Res: I learned a cool trick using step slicing to drop pixels and lower the resolution manually

Flip & Mirror: Reversed the array rows and columns to flip the image horizontally and vertically

Draw Shapes: I manually changed the pixel values in a specific region to draw a blue square on the image

Grayscale Conversion: This was the hardest part Instead of just averaging the colors I used the Dot Product with specific weights

Tech Stack

Python

NumPy (The math engine)

Matplotlib (Just to load and show the images)

About

This project demonstrates the mathematical foundations of Computer Vision. Instead of relying on functions from OpenCV, I used Pure NumPy to manipulate images at the pixel-matrix level.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors