๐ Report | ๐ Explanation Notebook with Code | โญ Results
- Introduction
- Current Method
- My Method (Novel Idea)
- A Few Results
- Running it On Your Machine
- Bibliography
There are several methods to extract edges from images. There are also several other methods for object detection and region segmentation. In this project I propose a novel method for Feature extraction from Images and use this method to create sketch composite for the given Image.
The current State of the art method is the Gaussian Blur-Blend Method which has the following algorithm:
def gaussian_blend_blur(I: image, k: Kernel Size):
J = grayscale_of_image(I)
K = gaussian_kernel_of_size(k, k)
B = gaussian_blur_of_image_with_kernel(J, K)
result = J / B
return result
We introduce a new method for feature extraction, the Orthogonal Gaussian Lattice Method which takes 3 Gaussian and computes teh inverse of the grayscale of the image with these 3 Gaussian and then uses a connectivity bound parameter alpha to create 3 Simple Graphs from these inverse gaussian. These graphs are then used to extract Lattices from the image and these lattices are then used as features and for image sketching.
The algorithm is as follows and for full details please reefr to the Jupyter Notebook with Complete Explanation.
The program requires the following dependencies:
Clone and install all dependencies:
git clone https://github.com/anishLearnsToCode/image2sketch.git
cd image2sketch
mkdir results
mkdir data
pip install -r requirements.txt
To test this program on some sample images see src/test.py
. Create a directory
/data
under the project root and add some sample images there for testing purposes.
Preferably add PNG Images as they store full data without compression. Inside
src/test.py
set the path to yor image and you can also further change Hyper-parameters
from the file src/control_parameters.py
and run it as
cd src
python test.py
Results will be displayed and also saved under the directory results/{image_name}
where image_name
comes from src/test.py
.