Ask Your Question
0

error: use of undeclared identifier 'cv'

asked 2019-11-13 02:56:02 -0500

Sandeep Kumar gravatar image

updated 2019-11-13 03:16:05 -0500

berak gravatar image

When I am trying to run VARLBP.cpp from https://github.com/carolinepacheco/lb... in online jupyter notebook using

#pragma cling add_library_path("https://github.com/opencv/opencv/blob/master/include/opencv2/opencv.hpp")

pragma cling add_library_path("https://github.com/carolinepacheco/lbplibrary/blob/master/lbplibrary.hpp")

I am getting an error "error: use of undeclared identifier 'cv' "

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-11-13 03:15:06 -0500

berak gravatar image

you cannot run opencv c++ code in a notebook (only python or R or such)

edit flag offensive delete link more

Comments

Hello Berak, we can run c++ code in online Jupyter that supports c++ code. You can try online jupyter. It has also support for ruby on rails.

Sandeep Kumar gravatar imageSandeep Kumar ( 2019-11-13 09:50:44 -0500 )edit

no way on colab

berak gravatar imageberak ( 2019-11-13 10:15:41 -0500 )edit

#pragma bla bla -- that's a python comment, nothing else

berak gravatar imageberak ( 2019-11-13 10:17:03 -0500 )edit

we can run c++ code in online Jupyter

chances, that your online notebook provider has opencv c++ libs installed are zilch

(if you're doing this locally, DON'T use notebooks, rather from a proper cmdline)

berak gravatar imageberak ( 2019-11-13 10:21:17 -0500 )edit

I have cloned https://github.com/opencv/opencv to my online jupyter and then selected C++ as my kernel, still I am getting errors.

Sandeep Kumar gravatar imageSandeep Kumar ( 2019-11-13 22:36:45 -0500 )edit

can it be, you don't know c++ at all ?

you would have to build and install libraries, before you can use opencv

berak gravatar imageberak ( 2019-11-14 01:36:37 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-11-13 02:56:02 -0500

Seen: 40 times

Last updated: Nov 13