justadudewhohacks / justadudewhohacks/opencv4nodejs

Mat .setTo() not working

Open
#756 0 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

I am currently trying to mask frame of a video using the setTo function. I have tried the following variations

```
bgFinal.setTo(255)

bgFinal.setTo(255 as number)

bgFinal.setTo(Number(JSON.stringify(255)))

bgFinal.setTo(255, bgMask)

bgFinal.setTo(new Vec3(255, 255, 255))

bgFinal.setTo(new Vec3(255, 255, 255), bgMask)
```

And i get the following error:

`ERROR Error: Could not call remote method 'setTo'. Check that the method signature is correct. Underlying error: undefined
Underlying stack: undefined

at electron/js2c/browser_init.js:6734
at EventEmitter. (electron/js2c/browser_init.js:6585)
at EventEmitter.emit (events.js:203)
at WebContents. (electron/js2c/browser_init.js:3904)
at WebContents.emit (events.js:203)`

I am using Angular + Typescript + Electron. Any help with the syntax of this would be much appreciated.

Contributor guide

Open the contributing guide

Research direction

Start at the setTo entry point and inspect its accepted arguments, reproducing the call in the reported Angular, TypeScript, and Electron setup. Done means the supported invocation is identified and the masked frame is updated without the reported remote-method error.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, electron, nodejs, opencv, typescript
Domain
api, computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.