Opencv4nodejs: Could not find cv::reduce equivalent

Created on 16 May 2018  路  4Comments  路  Source: justadudewhohacks/opencv4nodejs

Hello.
I would like to use the fast OpenCV cv:reduce function for the sake of speed instead instead of looping on eatch col and eatch row to compute the sum of pixel for all row and sum of pixel for all column.

Question: is the function missing from this opencv4nodejs binding ?

the fucntion: https://docs.opencv.org/3.4.1/d2/de8/group__core__array.html#ga4b78072a303f29d9031d56e5638da78e

image

good first issue help wanted

Most helpful comment

Looking to implement this. I was thinking we could simply add this to the Mat class? Something along the lines of const reducedMat = mat.reduce(0, cv.REDUCE_SUM, cv.CV_32F);

@justadudewhohacks ?

All 4 comments

Yep, it's currently not implemented.

Looking to implement this. I was thinking we could simply add this to the Mat class? Something along the lines of const reducedMat = mat.reduce(0, cv.REDUCE_SUM, cv.CV_32F);

@justadudewhohacks ?

Yep every method that operates on a Mat should be added as a class method to allow chaining.

This has been resolved with PR #340 and released in 4.6.0.

Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YaronHershkovitz picture YaronHershkovitz  路  6Comments

karlbernard2 picture karlbernard2  路  4Comments

bgsuello picture bgsuello  路  6Comments

ShadabFaiz picture ShadabFaiz  路  7Comments

goulash1971 picture goulash1971  路  7Comments