How to add a new member function to the existing LDA class and recompile it?

asked 2017-07-09 06:40:19 -0600

sree gravatar image

Hi,

I am new to OpenCV. The version I use is OpenCV 3.1 My question has two parts.

  1. How to add a new member function to the existing LDA class?

I am trying to modify the lda.cpp source file in /modules/core/src/ My objective is to create a new member function in order to execute additional functions to the Sw and Sb matrices.

  1. How to recompile OpenCV after source file modification?

In order to confirm the procedure for recompiling, I added 'cout' command inside the source file for one of the matrices. What are the steps to recompile successfully, so that when I run my code (which uses the LDA class) I will get the prints of the matrix as specified?

Thank you in advance.

Sree

edit retag flag offensive close merge delete

Comments

you should probably make a copy of the LDA class in your own project, and modify that, not the one in the opencv library

berak gravatar imageberak ( 2017-07-09 06:53:47 -0600 )edit

Thank you berak. I will try to implement that way. I was trying to locate the class definition of LDA class but was unable to find it in lda.cpp. Is there any other file dependency for LDA class? Thank you

sree gravatar imagesree ( 2017-07-09 07:19:13 -0600 )edit