lbph-algorithm

Reading values in opencv_face.LBPHFaceRecognizer.getHistograms()

坚强是说给别人听的谎言 提交于 2020-06-23 13:22:23
问题 I am trying to work with the open_cv library in android. I have never worked on it before, so this may be a very basic question. I have an opencv_face.LBPHFaceRecognizer object in my Recognizer Activity. My requirement is to read the histogram values for previously-stored faces. opencv_face.LBPHFaceRecognizer mFaceRecognizer = = createLBPHFaceRecognizer(2, 8, 8, 8, 95); File file = new File(RegisterActivity.getFilePath(mContext)); mFaceRecognizer.load(file.getAbsolutePath()); opencv_core

js-objectdetect with LBP cascades

让人想犯罪 __ 提交于 2020-01-17 05:37:16
问题 I´m developing currently a webapp with object detection using the js-objectdetect libary. Therefore I´m converting opencv HAAR-cascades to the needed js-objectdetect format with a python script. My question is, if it´s possible to convert opencv LBP-cascades to the js-objectdetect format too. I need this, because I already have an opencv application in use and I need to use the same LBP-cascades. I don´t find anything on Javascript object-/ face detection with LBP-cascades on the internet.

Compare the LBP in python

自闭症网瘾萝莉.ら 提交于 2020-01-13 02:53:26
问题 I generated a texture image like this I have to compare two textures. I have used histogram comparison method. image_file = 'output_ori.png' img_bgr = cv2.imread(image_file) height, width, channel = img_bgr.shape hist_lbp = cv2.calcHist([img_bgr], [0], None, [256], [0, 256]) print("second started") image_fileNew = 'output_scan.png' img_bgr_new = cv2.imread(image_fileNew) height_new, width_new, channel_new = img_bgr_new.shape print("second lbp") hist_lbp_new = cv2.calcHist([img_bgr_new], [0],

Compare the LBP in python

天大地大妈咪最大 提交于 2020-01-13 02:53:06
问题 I generated a texture image like this I have to compare two textures. I have used histogram comparison method. image_file = 'output_ori.png' img_bgr = cv2.imread(image_file) height, width, channel = img_bgr.shape hist_lbp = cv2.calcHist([img_bgr], [0], None, [256], [0, 256]) print("second started") image_fileNew = 'output_scan.png' img_bgr_new = cv2.imread(image_fileNew) height_new, width_new, channel_new = img_bgr_new.shape print("second lbp") hist_lbp_new = cv2.calcHist([img_bgr_new], [0],

How to calculate Local Binary Pattern Histograms with OpenCV?

徘徊边缘 提交于 2019-12-28 12:05:00
问题 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? 回答1: 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

detectMultiScale(…) internal principle? [closed]

我们两清 提交于 2019-12-25 00:05:24
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 days ago . This is an algorithm question on the detectMultiScale(...) function from the opencv library. I need help to understand what opencv's detectMulitScale() function exactly does. I have understood from reading the C++ code that the source image is scaled with several scales based on scaleFactor and size

Unexpected behavior in local binary pattern - python skimage

流过昼夜 提交于 2019-12-24 06:44:04
问题 I've been running into problems recently where the local binary pattern method in python skimage is producing unexpected results. Have a look at the cartoon example below. It shows two flat color circles on a flat color background. The local binary pattern (P=8 samples, Radius=1) output is: (Image is color coded in jet colors). The gray color correctly represents 255. However, the blue color is 85 (binary 01010101) . So while the method correctly shows the background and the circle on the

OpenCV C++ calcHist to Java

最后都变了- 提交于 2019-12-23 02:42:05
问题 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*

ConvergenceWarning: Liblinear failed to converge, increase the number of iterations

送分小仙女□ 提交于 2019-12-21 07:23:15
问题 Running the code of linear binary pattern for Adrian. This program runs but gives the following warning: C:\Python27\lib\site-packages\sklearn\svm\base.py:922: ConvergenceWarning: Liblinear failed to converge, increase the number of iterations. "the number of iterations.", ConvergenceWarning I am running python2.7 with opencv3.7, what should I do? 回答1: Normally when an optimization algorithm does not converge, it is usually because the problem is not well-conditioned, perhaps due to a poor

How to calculate the lbp codes at the ends of the images?

时光怂恿深爱的人放手 提交于 2019-12-18 07:35:31
问题 For example, the lbp code of the pixel with coordinate (1, 1) is possible to calculate it with the pixels (0, 0); (0, 1); (0, 2); (1, 2); (2, 2); (2, 1); (2, 0); (1, 0) but the pixels of the extremes do not have those 8 neighborhood pixels, that is, the pixel (0, 0) only has 3 neighbors. This question comes to me because I have obtained the LBP image using sicikit image, the code is as follows: lbp = feature.local_binary_pattern (gray, 8, 1, 'ror') Then I printed the values ​​of the gray