Ask Your Question

Revision history [back]

Need suggestion for building only one class

I am new to opencv and cmake. I really need some instructions on building modified source code. I cloned master branch from github.

I need to add some output functions to opencv/modules/imgproc/src/grabcut.cpp. Let's say I just added some print functions in the source code. How could I build it without having to build the entire imgproc module? Which cmake file should I modify to implement this?

Another question is after I build source code, how could I use grabcut.cpp outside opencv library? It uses some "private headers" which prevent me from using it outside opencv's library.

Thanks so much for your help!

Need suggestion for building only one class

I am new to opencv and cmake. I really need some instructions on building modified source code. I cloned master branch from github.

I need to add some output functions to modified opencv/modules/imgproc/src/grabcut.cpp. Let's and wants to write another class lets say class run_grabcut in opencv/test.cpp using the modified version. Would you please give me 2 examples:

  1. what files should I just added some print functions include in the source code. How could I build it without having to build the entire code imgprocopencv/test.cpp?

  2. Which CMakeList module? Which cmake file should I modify to implement this?

    Another question is after I build source code, how could I use a grabcut.cpptest.cpp outside opencv library? It uses some "private headers" which prevent target so that I can only run this file? Would you please give me from using it outside opencv's library.an example of this CMakeList?

Thanks so much for your help!

Need suggestion for building only one classrunning modified source code

I am new to opencv and cmake. I really need some instructions on building modified source code. I cloned master branch from github.

I modified opencv/modules/imgproc/src/grabcut.cpp and wants to write another class lets say class run_grabcut in opencv/test.cpp using the modified version. Would you please give me 2 examples:

  1. what files should I include in the source code opencv/test.cpp?

  2. Which CMakeList should I modify to build a test.cpp target so that I can only run this file? Would you please give me an example of this CMakeList?

Thanks so much for your help!