Input : LBP Feature extracted from an image with dimension 75520, so the input LBP data contains 1 row and 75520 columns.
Required Output: Apply PCA on input to reduce the dimension,
Currently my code look like,
void PCA_DimensionReduction(Mat &src, Mat &dst){
int PCA_DIMENSON_VAL 40
Mat tmp = src.reshape(1,1); //1 rows X 75520 cols
Mat projection_result;
Mat input_feature_vector;
Mat norm_tmp;
normalize(tmp,input_feature_vector,0,1,NORM_MINMAX,CV_32FC1);
PCA pca(input_feature_vector,Mat(),CV_PCA_DATA_AS_ROW, PCA_DIMENSON_VAL);
pca.project(input_feature_vector,projection_result);
dst = projection_result.reshape(1,1);
}
Basically I am using this features to match similarity between two images, but I am not getting proper result as without applying PCA.
Any help will be appreciated...
Regards
Haris...