Skip to content

Selenium automation script to draw any image into HTML canvas using edge detection algorithm

Notifications You must be signed in to change notification settings

sudharsan-selvaraj/selenium-image-sketch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Selenium Image Sketch:

Have you ever wondered drawing any image on html canvas using selenium is possible? Yes, it's totally possible with the help of image processing.

I have used canny edge detection algorithm to extract the outline coordinates from the input image.

Algoritm courtesy: http://people.ece.cornell.edu/

Setup:

  1. Install python
  2. Install the dependencies from requirement.txt
  3. Downlaod chromedriver file

How to run?:

Enter the below command in terminal:

python draw.py --image /path/to/any/image

This will open the chrome browser ans start sketching the image provided.

Sample:

sample

Demo:

Youtube: https://www.youtube.com/watch?v=vJRyGTcqZfM

About

Selenium automation script to draw any image into HTML canvas using edge detection algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages