Ask Your Question
1

include highgui within opencv function

asked 2018-09-18 05:10:02 -0600

ronan gravatar image

I like to use imshow in opencv function for debugging. in my case in ecc.cpp my guess is that I should include highgui.hpp, but I cannot figure out how to do it.

edit retag flag offensive close merge delete

Comments

there is no ecc.cpp in the opencv codebase. and we don't know, what you're talking about.

can you show the code you're trying with ?

berak gravatar imageberak ( 2018-09-18 05:18:52 -0600 )edit
1

https://github.com/opencv/opencv/blob... for example I like to plot imageMask at line 486 after the if/else

ronan gravatar imageronan ( 2018-09-18 05:24:03 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-09-18 05:32:18 -0600

berak gravatar image

i somehow doubt, that this is a good idea, but technically it is not a problem.

you can #include <opencv2/highgui.hpp> in the ecc.cpp code (before the namespace), but you also have to add a dependancy to the highgui lib so it looks like:

ocv_define_module(video opencv_imgproc opencv_highgui OPTIONAL opencv_calib3d WRAP java python js)

then you have to re-run cmake (mandatory, because you changed the module dependancies !) and rebuild the opencv libs.

edit flag offensive delete link more

Comments

thanks for the answer. would you recommend another way to display array?

ronan gravatar imageronan ( 2018-09-18 05:50:55 -0600 )edit

no real idea, sorry.

above procedure will just cost you an hour or so ....

berak gravatar imageberak ( 2018-09-18 06:15:01 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-18 05:10:02 -0600

Seen: 357 times

Last updated: Sep 18 '18