lbph-algorithm

OpenCV C++ calcHist to Java

拟墨画扇 提交于 2019-12-08 17:25:34
I'm trying to get some c++ code to run on my Android device; however, I'm running into a small little problem with the type of Mat I'm using. The code I'm trying to convert is as follow (the second function calls the first): static Mat histc_(const Mat& src, int minVal=0, int maxVal=255, bool normed=false) { Mat result; // Establish the number of bins. int histSize = maxVal-minVal+1; // Set the ranges. float range[] = { static_cast<float>(minVal), static_cast<float>(maxVal+1) }; const float* histRange = { range }; // calc histogram calcHist(&src, 1, 0, Mat(), result, 1, &histSize, &histRange,

Local Binary Patterns original code and references in matlab

自古美人都是妖i 提交于 2019-12-07 13:13:57
问题 I'm founding lots of implementations of Local Binary Patterns with matlab and i am a little confusing about them. Wikipedia explains how the basic LBP works: 1- Divide the examined window into cells (e.g. 16x16 pixels for each cell). 2- For each pixel in a cell, compare the pixel to each of its 8 neighbors (on its left-top, left-middle, left-bottom, right-top, etc.). Follow the pixels along a circle, i.e. clockwise or counter-clockwise. 3- Where the center pixel's value is greater than the

Local Binary Patterns original code and references in matlab

自闭症网瘾萝莉.ら 提交于 2019-12-05 19:21:17
I'm founding lots of implementations of Local Binary Patterns with matlab and i am a little confusing about them. Wikipedia explains how the basic LBP works: 1- Divide the examined window into cells (e.g. 16x16 pixels for each cell). 2- For each pixel in a cell, compare the pixel to each of its 8 neighbors (on its left-top, left-middle, left-bottom, right-top, etc.). Follow the pixels along a circle, i.e. clockwise or counter-clockwise. 3- Where the center pixel's value is greater than the neighbor's value, write "1". Otherwise, write "0". This gives an 8-digit binary number (which is usually

how to improve LBP operator by reducing feature dimension

[亡魂溺海] 提交于 2019-12-02 17:35:31
问题 I am using LBP with MATLAB for extraction feature but the accuracy is too low how to reduce the feature bins in LBP? many thanks. 回答1: Use the pcares function to do that. pcares stands for PCA Residuals : [residuals, reconstructed] = pcares(X, ndim); residuals returns the residuals obtained by retaining ndim principal components of the n-by-p matrix X . X is the data matrix, or the matrix that contains your data. Rows of X correspond to observations and columns are the variables. ndim is a

how to improve LBP operator by reducing feature dimension

大城市里の小女人 提交于 2019-12-02 10:14:09
I am using LBP with MATLAB for extraction feature but the accuracy is too low how to reduce the feature bins in LBP? many thanks. Use the pcares function to do that. pcares stands for PCA Residuals : [residuals, reconstructed] = pcares(X, ndim); residuals returns the residuals obtained by retaining ndim principal components of the n-by-p matrix X . X is the data matrix, or the matrix that contains your data. Rows of X correspond to observations and columns are the variables. ndim is a scalar and must be less than or equal to p . residuals is a matrix of the same size as X . reconstructed will

Understanding OpenCV LBP implementation

半城伤御伤魂 提交于 2019-11-30 05:21:05
I need some help on LBP based face detection and that is why I am writing this. I have the following questions related to face detection implemented on OpenCV: In lbpCascade_frontal_face.xml (this is from opencv): what is internalNodes, leafValues, tree,features etc? I know they are used in the algorithm . But I do not understand the meaning of each one of them. For example, why we take a particular feature and not the other for a particular stage? how we are deciding which feature/ node to choose? What is feature values in the LBP_frontal_face_classifier.xml? I know they are a vector of 4

Understanding OpenCV LBP implementation

∥☆過路亽.° 提交于 2019-11-29 03:28:00
问题 I need some help on LBP based face detection and that is why I am writing this. I have the following questions related to face detection implemented on OpenCV: In lbpCascade_frontal_face.xml (this is from opencv): what is internalNodes, leafValues, tree,features etc? I know they are used in the algorithm . But I do not understand the meaning of each one of them. For example, why we take a particular feature and not the other for a particular stage? how we are deciding which feature/ node to

How to calculate Local Binary Pattern Histograms with OpenCV?

∥☆過路亽.° 提交于 2019-11-28 06:59:41
I have already seen that OpenCV provides a classifier based on LBP histograms : But I want to have access to the LBP histogram itself. For instance: histogram = calculate_LBP_Histogram( image ) Is there any function that performs this in OpenCV? You can get the C++ code for computing LBP using OpenCV's Mat data structure here: http://www.bytefish.de/blog/local_binary_patterns You should be able to find the Python version as well on the same site. The code is written by Philipp Wagner, who I believe contributed the face recognition code you mentioned to OpenCV, so it should be the same thing.