-
Notifications
You must be signed in to change notification settings - Fork 51
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
Working with Electron #4
Comments
Hi, After some test, I'm locked to electron V8. I'm not a C++ expert, I have bad time trying to configure my If you have some expertise about that you're welcome. |
Based on the above timeline, after explicit disable app.allowRendererProcessReuse = false; I've not worked on C++, but I'm trying some suggestions got from this topic. electron/electron#18397 PS: Checking on macOS |
@u4/opencv4nodejs@6.0.9 is out and fix electron 9 issue.
I think you know electron better than me, I do not know anything about Electron rendering thread, and non-rendering thread. |
@UrielCh I attempted I will invest more time tomorrow. Thank you in advance. |
[--vscode] is only a helper to build a visual studio code C++ environment, and the generated config is still uncomplete. so it's useless for your usage, I'm now diving into the C code of the project, I have started a new module Highgui. currently, my c_cpp_properties.json is: {
"name": "opencv4nodejs",
"includePath": [
// "${workspaceFolder}/cc/**",
"C:/Users/uriel/AppData/Local/node-gyp/Cache/16.13.1/include/node",
"C:/0/openCV/opencv-4.5.5/build/",
"C:/0/openCV/opencv-4.5.5/build/include",
"${workspaceFolder}/node_modules/nan",
"${workspaceFolder}/node_modules/native-node-utils/src",
"${workspaceFolder}/cc",
"${workspaceFolder}/cc/core",
"C:/0/openCV/opencv-4.5.5/opencv/modules/calib3d/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/core/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/dnn/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/features2d/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/flann/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/gapi/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/highgui/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/imgcodecs/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/imgproc/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/ml/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/objdetect/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/photo/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/stitching/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/ts/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/video/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/videoio/include",
"C:/0/openCV/opencv-4.5.5/opencv/modules/world/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/alphamat/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/aruco/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/barcode/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/bgsegm/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/bioinspired/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/ccalib/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cnn_3dobj/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudaarithm/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudabgsegm/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudacodec/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudafeatures2d/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudafilters/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudaimgproc/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudalegacy/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudaobjdetect/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudaoptflow/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudastereo/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudawarping/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cudev/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/cvv/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/datasets/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/dnn_objdetect/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/dnn_superres/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/dpm/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/face/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/freetype/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/fuzzy/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/hdf/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/hfs/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/img_hash/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/intensity_transform/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/julia/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/line_descriptor/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/matlab/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/mcc/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/optflow/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/ovis/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/phase_unwrapping/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/plot/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/quality/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/rapid/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/reg/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/rgbd/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/saliency/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/sfm/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/shape/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/stereo/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/structured_light/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/superres/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/surface_matching/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/text/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/tracking/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/videostab/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/viz/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/wechat_qrcode/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/xfeatures2d/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/ximgproc/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/xobjdetect/include",
"C:/0/openCV/opencv-4.5.5/opencv_contrib/modules/xphoto/include"
],
"defines": [
"CV_VERSION_MAJOR=4",
"CV_VERSION_MINOR=5",
"CV_VERSION_REVISION=5",
"OPENCV4NODEJS_FOUND_LIBRARY_CORE",
"OPENCV4NODEJS_FOUND_LIBRARY_HIGHGUI",
"OPENCV4NODEJS_FOUND_LIBRARY_IMGCODECS",
"OPENCV4NODEJS_FOUND_LIBRARY_IMGPROC",
"OPENCV4NODEJS_FOUND_LIBRARY_FEATURES2D",
"OPENCV4NODEJS_FOUND_LIBRARY_CALIB3D",
"OPENCV4NODEJS_FOUND_LIBRARY_PHOTO",
"OPENCV4NODEJS_FOUND_LIBRARY_OBJDETECT",
"OPENCV4NODEJS_FOUND_LIBRARY_ML",
"OPENCV4NODEJS_FOUND_LIBRARY_VIDEO",
"OPENCV4NODEJS_FOUND_LIBRARY_VIDEOIO",
"OPENCV4NODEJS_FOUND_LIBRARY_DNN",
"OPENCV4NODEJS_FOUND_LIBRARY_FACE",
"OPENCV4NODEJS_FOUND_LIBRARY_TEXT",
"OPENCV4NODEJS_FOUND_LIBRARY_TRACKING",
"WIN",
"_HAS_EXCEPTIONS=1"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64\\cl.exe",
"cStandard": "c11",
"cppStandard": "c++11",
"intelliSenseMode": "windows-msvc-x64"
} It looks to works on my Windows Desktop. |
Are you really a code addict? |
@UrielCh LMAO, pretty addict. |
Error output:
Current research I attempted to downgrade Maybe the main issue came from |
Updated: Upgrade native-node-utils to the latest version (2.15.0) solved the issue. Got another error messages.
|
will I need to fork it to ... |
In my environment, the plain-js sample has no compilation issue. It' also work using a local @u4/opencv4nodejs git project mkdir workdir
cd workdir
clone git@github.com:UrielCh/opencv4nodejs.git
cd opencv4nodejs
npm install
npm run do-install
cd ..
clone git@github.com:UrielCh/opencv-electron.git
cd opencv-electron/plain-js
npm install ../../opencv4nodejs
npm install electron@11-x-y
npm install
npm run install
npm run start my setup failed with |
@UrielCh I've checked on 2 Macbooks (Intel chipset). The same issue, let me figure out. Could you please give me your version of Node?
|
@UrielCh After changed https://github.com/UrielCh/opencv4nodejs/blob/master/_binding.gyp |
@UrielCh Now, get the new error on Electron 12 Output in Console:
It may be related to this problem. I will check tomorrow. |
|
So I should upgrade C++ build standard to C++14 ? |
@UrielCh Maybe I know how to fix it. Please wait for my Pull Request. |
@UrielCh I've never ever worked on C++ before 😅 |
Okey, I switch to some VueJS project :) |
@UrielCh Upgrade to C++14 standard in opencv4nodejs Also need to update version of opencv4nodejs in below repository before migrated as well. |
6.0.10 is out. |
@UrielCh I so appreciate your support. 🙇 I hope that the community will be grown and you carry on to improve this great library. |
As you may have noticed I only work in Typescript, So I tried to make webpack-reactjs-typescript work. but I'm not familiar with React. I try to update the project:
But I'm stuck with an Webpack Error:
changes to webpack: replace: contentBase: path.join(__dirname, 'public'), by static: {
directory: path.join(__dirname, 'public'),
}, replace:
by
|
I'm working on ReactJS right now. Maybe I can help. I will deep dive in next week. |
did you find all the methods you need in opencv4nodejs? and a lot's of method change from V3 to V4, so lots of methods are incorrectly mapped. |
@UrielCh Currently, I'm working on templateMatching API. Everything almost worked now. |
since current electron versions Working. |
So is this fork of opencv4nodejs context-aware by now? |
I know that this repo is not working with Electron. Do you have any suggestions to do that? I would like to join to contribute as well. Thank you in advance. 🙇
The text was updated successfully, but these errors were encountered: