Skip to content

anurag-dalal/ImageProcessingOpenCVPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageProcessingOpenCVPython

Some simple implementation using OpenCV in python

Requirements:

$ pip install numpy
$ pip install matplotlib
$ pip pip install opencv-python

1. kMeans clustering of colors in an image

k-means wiki k-means pyimagesearch

The input image used is:
Lenna Image

The output is:
kmean Image

To achieve this the scikit-learn library is used Five clusters are used and so we find how much percent of color are there in the 5 most used colors in the bar.

2. Splitting or decomposing image

An image(grayscale) is splitted into n number of images by iterating over the rows and columns of the original image and randomly copying the pixel value to any of the n images.

3. Simple encryption of grayscale image using XOR

This example producaes a random key of the same shape as image and XOR it with the input image to encrpyt.
Then to decrpt the key is XORed with the encrypted image.
Output Image

4. Edge detection using fourier transform

Read this blog for details about using filters in fourier domain in Image Processing.

A high pass filter is used to detect the edges in an grayscale image.

The output is:
Edge Detection Image

About

Some simple implementation using OpenCV in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages