Ask Your Question

chinesestud's profile - activity

2019-08-20 08:26:45 -0600 marked best answer Empty parsing results (opencv xml output)

Iam trying to parse xml (with standart python xml.etree.ElementTree) output from opencv 3.4.2 with python 3.7, results are empty.

Maybe the problem is about data type, which iam trying to extract?

XML sample: https://yadi.sk/d/DFTMQU5jz7MxNQ

Code sample:

import xml.etree.ElementTree as ET
root = ET.parse('new.xml').getroot()  
data = opencv_lbphfaces.find('histograms').text
print('histograms : ', data)

I also tried this (its still show empty result at histograms):

import xml.etree.ElementTree as ET
root = ET.parse('new.xml').getroot()  
for opencv_lbphfaces in root.findall('opencv_lbphfaces'):
for element in opencv_lbphfaces:
     ele_name = element.tag
     ele_value = opencv_lbphfaces.find(element.tag).text
     print(ele_name, ' : ', ele_value)

I want to extract opencv_lbphfaces/histograms/data, after save into file and convert from exponential to integer. But stack at extraction part.

Please give me advice how to solve this histograms extraction problem

2019-08-06 00:50:18 -0600 commented answer Empty parsing results (opencv xml output)

Everything is good. It was my bad, it works correctly. Thank you!

2019-08-06 00:49:14 -0600 received badge  Enthusiast
2019-08-04 09:59:32 -0600 commented answer Empty parsing results (opencv xml output)

Thank you! It works! I used like that: import cv2 f = cv2.FileStorage("new.xml", 0) L = f.getNode("opencv_lbphfaces") h

2019-08-04 09:54:40 -0600 commented answer Empty parsing results (opencv xml output)

Thank you! It works! I used like that: import cv2 f = cv2.FileStorage("new.xml", 0) L = f.getNode("opencv_lbphfaces") h

2019-08-04 07:19:44 -0600 asked a question Empty parsing results (opencv xml output)

Empty parsing results (opencv xml output) Iam trying to parse xml (with standart python xml.etree.ElementTree) output fr

2019-07-12 01:43:34 -0600 commented question How to hash - Opencv matrix, lbph histogram?

Yes, its only for concept system, to check how it works. Do you have some suggestions about that? How to put personalit

2019-07-12 01:32:00 -0600 commented question How to hash - Opencv matrix, lbph histogram?

Well, maybe I did not quite understand. I will try to describe my idea, maybe you will give advice. The idea: to identi

2019-07-12 01:11:00 -0600 commented question How to hash - Opencv matrix, lbph histogram?

please explain, why you want to do this, and what exact outcome you expect here. - why - i need more compact view of thi

2019-07-12 01:01:18 -0600 received badge  Editor (source)
2019-07-12 01:01:18 -0600 edited question How to hash - Opencv matrix, lbph histogram?

How to hash - Opencv matrix, lbph histogram? Hi, I want to try to create a hash code from *.yml. For example i have exis

2019-07-12 00:58:58 -0600 asked a question How to hash - Opencv matrix, lbph histogram?

How to hash - Opencv matrix, lbph histogram? Hi, I want to try to create a hash code from *.yml. For example i have exis