Add new function signature for python and js in OpenCV

asked 2019-03-17 04:42:14 -0600

ansh gravatar image

updated 2020-10-05 23:22:58 -0600

I've updated the grabCut function (opencv-master/modules/imgproc/src/grabcut.cpp) and also added some new functions in the imageproc module. For that I've updated the opencv-master/modules/imgproc/include/opencv2/imgproc.hpp file as:

CV_EXPORTS_W void grabCut( InputArray img, InputOutputArray mask, OutputArrayOfArrays contour, Rect rect,
                           InputOutputArray bgdModel, InputOutputArray fgdModel,
                           int iterCount, int mode = GC_EVAL );

CV_EXPORTS_W void grabCut_slim( InputArray img, InputOutputArray mask,OutputArrayOfArrays contour, Rect rect,
                               InputOutputArray bgdModel, InputOutputArray fgdModel,
                               int iterCount, int mode = GC_EVAL );


CV_EXPORTS_W void paintselection( InputArray img, InputOutputArray mask,OutputArrayOfArrays contour,
                          InputOutputArray bgdModel, InputOutputArray fgdModel,
                          int iterCount, int mode = GC_EVAL );

CV_EXPORTS_W void paintselection_slim( InputArray img, InputOutputArray mask,OutputArrayOfArrays contour,
                               InputOutputArray bgdModel, InputOutputArray fgdModel,
                               int iterCount, int mode = GC_EVAL );

Doing that I'm able to use the updated function in c++. Now I want to use these updated functions in both python and js, how to do that ?

edit retag flag offensive close merge delete