Skip to content

Image auto cropping havinfg black background based on opencvjs

Notifications You must be signed in to change notification settings

pavansai1122/imageautocrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imageautocrop

Image Auto cropping having black background & white subject based on opencvjs. Note it is in still development.

Step 1

import AutoCrop from 'imageautocrop';

Step 2

const cordinates = AutoCrop.getCropingCordinates(document.querySelector('img'), width, height); const cropedBase64 = AutoCrop.cropImage(document.querySelector('img'), cordinates);

Note

1.This package is based on opencv Contours. So it Crops image having black background & White subject. 2.This one is still under development. Sometimes it throw error new cv.Mat is not a constructor. Kindly use setTimeout to fixit. In future it will be fixed.

About

Image auto cropping havinfg black background based on opencvjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published