Ask Your Question
-1

How hard is it to only extract specific class and functions?

asked 2019-06-24 12:57:25 -0600

opencvddddd gravatar image

OpenCV have many modules in which I only need a few classes and functions. I know I can only build libs like core, highgui, imageproc by turning on these Macro and off all other Macro when build libs using the opencv official github.

However it may be still too much, I only need like cv::Mat, videocapture, colorconversion, encoder/decoder, gui. Can I just extract these functions from opencv, and directly use source code of these extracted opencv functions in my project. Even I only need these functions, but these functions may also depend on other libs/functions. So I am evaluating how hard it is to extract these specific functions/classes from opencv source code.

Thanks in advance for your answers and comments.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-06-24 17:23:54 -0600

Tetragramm gravatar image

Pretty hard. However, you can build and link the static libraries instead of DLLs, and it should, maybe, possibly remove unused symbols (IE: functions and classes) at the link time.

It involves setting your own compiler settings, which depending on your comfort level, may be a bad idea.

https://stackoverflow.com/questions/6...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-06-24 12:57:25 -0600

Seen: 300 times

Last updated: Jun 24 '19