Skip to content

Make node-opencv compile against OpenCV 3.0.0#259

Closed
svogl wants to merge 2 commits intopeterbraden:masterfrom
svogl:master
Closed

Make node-opencv compile against OpenCV 3.0.0#259
svogl wants to merge 2 commits intopeterbraden:masterfrom
svogl:master

Conversation

@svogl
Copy link
Copy Markdown

@svogl svogl commented Jun 11, 2015

I pulled in all required header files to make the module compile against OpenCV 3.0.0 on my Linux machine.
The stereo matching changed, I updated the data types to the new instantiation scheme, but this needs testing.
As a quick resolution against legacy headers, I disabled the StereoGC part - anyone savvy with this?

@peterbraden
Copy link
Copy Markdown
Owner

Hi, this looks good, but I can't merge it until it plays nicely with the back compatable unit tests.

I took a stab at fixing these: https://github.com/peterbraden/node-opencv/compare/svogl-master?expand=1

Can you take a look and see if the remaining build warnings with OpenCV < 3 are easily fixable?

Thanks!

@careystevens
Copy link
Copy Markdown

I have tried building this against opencv 3.0 and it does compile. However features that appear to be intended in the build are excluded, eg I'm interesting in the BackgroundSubtractor which is wrapped with
#if CV_MAJOR_VERSION >= 2 && CV_MINOR_VERSION >=4
Despite version 3.0 being >= 2.4 it is excluded because CV_MINOR_VERSION = 0 not >=4

If I modify the above to include the BackgroundSubtractor I get the following error.

./src/BackgroundSubtractor.cc: In static member function ‘static v8::Handlev8::Value BackgroundSubtractorWrap::ApplyMOG(const v8::Arguments&)’:
../src/BackgroundSubtractor.cc:107:32: error: ‘class cv::BackgroundSubtractor’ has no member named ‘operator()’
self->subtractor->operator()(mat, _fgMask);
^
opencv.target.mk:105: recipe for target 'Release/obj.target/opencv/src/BackgroundSubtractor.o' failed
make: *** [Release/obj.target/opencv/src/BackgroundSubtractor.o] Error 1

@jacksontbryan
Copy link
Copy Markdown

Is there an intent to pull this into master at some point and officially support OpenCV 3.0?

@SellJamHere
Copy link
Copy Markdown

Bump OpenCV 3.0

@peterbraden
Copy link
Copy Markdown
Owner

I'd love to test this, and get it in, but I haven't got a box with opencv3 on it - does anyone have good installation instructions or ideally a dockerfile for a machine with opencv3?

@borromeotlhs borromeotlhs mentioned this pull request Sep 23, 2015
@fusionticket
Copy link
Copy Markdown

@kraenhansen
Copy link
Copy Markdown

@peterbraden - I've used https://github.com/jayrambhia/Install-OpenCV/ to get opencv installed in various versions, simply cloning the repository onto a fresh Ubuntu 14.04 and running the Install-OpenCV/Ubuntu/opencv_latest.sh will install opencv 3.0.0 at the moment of writing this message.

@jainanshul
Copy link
Copy Markdown
Contributor

@svogl As per http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html it seems like we need to use UMat to take full advantage of Transparent API. I don't see that as part of your change and wondering if you don't plan to make that change here?

Comment thread src/Stereo.h
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html#gsc.tab=0 we should be using CV_MAJOR_VERSION instead of CV_VERSION_MAJOR if my understanding is correct.

@jainanshul
Copy link
Copy Markdown
Contributor

@svogl I am evaluating the usefulness of opencv 3.0 and your work here is a prerequisite. Do you have a tentative date in mind for when you can finish up the work?

@jainanshul
Copy link
Copy Markdown
Contributor

@peterbraden where are we w.r.t this PR? Node-opencv can greatly benefit from moving to more recent versions of opencv.

@aichholzer
Copy link
Copy Markdown

I agree with @jainanshul OpenCV 3 support would be a great improvement. Any ideas?

@peterbraden
Copy link
Copy Markdown
Owner

Work has continued in #367

@peterbraden peterbraden closed this Feb 8, 2016
@aichholzer
Copy link
Copy Markdown

👍

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants