CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    53

    OpenCV in MFC App

    Hey there,

    I have a C++ app that uses OpenCV. Currently i am statically linking the OpenCV libs into my app. This is adding an extra overhead of 6+ MB.

    Ideally i would like to remove some of the features that i am not using in OpenCV. The features am using are,

    Capture frames from Webcam.
    Face detection.
    Image formats (JPEG, PNG).
    Image rotation & resizing.
    Is it possible to remove other features and trim down the libs?

    My C++ app is developed in Visual Studio 2012.

    Thanks in advance.

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: OpenCV in MFC App

    The linker should have features to remove unneeded stuff from the libraries you're importing (it may not do this by default to speed up the linking process).

    Note however that you are stuck with how the library was made. If the library itself is causing interdependencies from one compiled module (usually a single C++ source file) to another and causing all the modules to be pulled into your exe, you're kinda stuck with that. It takes quite a bit of effort to make libraries that minimize these inter-lib-dependencies.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured