Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencvJS doesn't support boxPoints API. I hope it does #20133

Closed
changy1105 opened this issue May 21, 2021 · 2 comments · Fixed by #26387
Closed

opencvJS doesn't support boxPoints API. I hope it does #20133

changy1105 opened this issue May 21, 2021 · 2 comments · Fixed by #26387

Comments

@changy1105
Copy link

Opencv compiler version 3.4, using opencvjs page error:
image

@alalek
Copy link
Member

alalek commented May 21, 2021

@sturkmen72
Copy link
Contributor

sturkmen72 commented Nov 16, 2024

i think boxPoints function implemented as named rotatedRectPoints in OpenCV.js

you can see sample usage in https://docs.opencv.org/4.x/df/def/tutorial_js_meanshift.html

        // apply camshift to get the new location
        [trackBox, trackWindow] = cv.CamShift(dst, trackWindow, termCrit);

        // Draw it on image
        let pts = cv.rotatedRectPoints(trackBox);
        cv.line(frame, pts[0], pts[1], [255, 0, 0, 255], 3);
        cv.line(frame, pts[1], pts[2], [255, 0, 0, 255], 3);
        cv.line(frame, pts[2], pts[3], [255, 0, 0, 255], 3);
        cv.line(frame, pts[3], pts[0], [255, 0, 0, 255], 3);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants