Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Size of executable when static

Hi,

I use openCV without extra modules in static mode install. I compile my own application with cmake and -03 option.

My program work but the size of my executable is very hight > 60Mo.

I analysed process of compilation and do step by step compilation program and I see than when I add a filter such as "Blur" and "medianBlur" my programme take 40Mo of size.

What is the way to reduce size of program ?

Size of executable when static

Hi,

I use openCV without extra modules in static mode install. I compile my own application with cmake and -03 option.

My program work but the size of my executable is very hight > 60Mo.

I analysed process of compilation and do step by step compilation program and I see than when I add a filter such as "Blur" and "medianBlur" my programme take 40Mo of size.

What is the way to reduce size of program ?

EDIT: See my option compilation:

OpenCV modules:
--     To be built:                 core flann imgproc ml objdetect photo video imgcodecs shape videoio highgui superres ts features2d calib3d stitching videostab
--     Disabled:                    java world
--     Disabled by dependency:      -
--     Unavailable:                 cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev python2 python3 viz