sightmachine / simplecv-js

A Javascript/Coffeescript companion library to SimpleCV
247 stars 37 forks source link

Does simplecv-js support contour detection #55

Open shamelmerchant opened 11 years ago

shamelmerchant commented 11 years ago

I have an image with multiple rectangles and am trying to detect them, I am new to opencv/simplecv and dont quite fully understand how to use this tool, is there some examples I could refer to?

chaithuzz2 commented 11 years ago

Hi there, simplecv-js is currently under development and we don't have a findContours method yet. I don't know what type of rectangles (overlapping or distinct) you are looking for .However The Blob class in SimpleCV has a isRectangle() method which might help you. The instructions for installing SimpleCV are given here

https://github.com/sightmachine/SimpleCV?source=cc

You can refer to the blob.py in "Features" module of SimpleCV source . Look for isRectangle() method and then you may write a small snippet to extract only the rectangular blobs. The instructions on how to use a particular method is given in the code. Let me know how it goes.

cheers

shamelmerchant commented 11 years ago

Thank You, I am looking for distinct (but blurred) rectangles. I am trying to implement this on a existing webpage and was looking for a javascript library to help me out.