node-opencv icon indicating copy to clipboard operation
node-opencv copied to clipboard

Add distanceTransform and watershed

Open bradrisse opened this issue 9 years ago • 1 comments

For my project I need distanceTransform and watershed. I am willing to implement and pull request myself, but need some direction on how to integrate. Any assistance is much appreciated.

Essentially its this code here: http://docs.opencv.org/3.0-rc1/d2/dbd/tutorial_distance_transform.html

What Im looking for is maybe a basic implementation of "AddSkill" where there is a small amount of sudo code that explains what the required files are and the basic structure to add new opencv skills.

From what I I have gathered I need to create a DistanceTransform.cc, DistanceTransform.h and in the init.cc include the #include "DistanceTransform.h" and DistanceTransform::Init(target);

The target includes the image and any parameters and the DistanceTransform.cc executes the code and returns the modified target.

OR

Do I add Nan::SetPrototypeMethod(ctor, "distanceTransform", DistanceTransform); to the Matrix.cc and the related function and add JSFUNC(DistanceTransform) to the Matrix.h?

bradrisse avatar Jul 14 '16 17:07 bradrisse

Did you have any luck with this? Looks like distanceTransform was added, but not Watershed.

ClaudeSutterlin avatar Jan 30 '18 02:01 ClaudeSutterlin