justadudewhohacks / justadudewhohacks/opencv4nodejs

Draw mat at postion into different mat?

Open
#640 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

Hi! I'm trying to draw a small image at position x/y into a big background image. I didn't find a way to do this with opencv4nodejs.

I'm aware of `copyTo()` ... but as both mats have to have the same size, it doesn't solve my problem.

```
const region = new cv.Rect(x, y, width, height)
small.copyTo(large.getRegion(region))
```

Any hints?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.