codeboost / opencv-node

Use OpenCV with node.js
54 stars 9 forks source link

minMaxLoc() and minMaxIdx() #18

Open ayapi opened 10 years ago

ayapi commented 10 years ago

I felt something is a little off about cv.minMaxLoc().

http://docs.opencv.org/modules/core/doc/operations_on_arrays.html?highlight=minmaxloc#minmaxloc Python: cv2.minMaxLoc(src[, mask]) → minVal, maxVal, minLoc, maxLoc C: void cvMinMaxLoc(const CvArr* arr, double* min_val, double* max_val, CvPoint* min_loc=NULL, CvPoint* max_loc=NULL, const CvArr* mask=NULL )

So I thought about how I wish I could write (src, minVal, maxVal, minLoc, maxLoc, mask) style args like Python. And minMaxIdx() can be substituted for minMaxLoc(src, minVal, maxVal, minIdx, maxIdx).

Please consider it.

codeboost commented 10 years ago

Still on vacation now, will take a look when I get back to my dev machine. Thanks for contributing !

ayapi commented 10 years ago

Thank you! Have a nice vacation : )