简体   繁体   中英

how to make an xml file open cv readable?

i have an xml file which is haar cascade and supposed to be on server, but I wanna use it in my openCV file code, how should I do that? btw I used <opencv_storage> tag.

You need to give the full paths of the xml. The xml files are located under the

opencv\data\haarcascades

location.

For instance:

import numpy as np
import cv2

face_cascade = cv2.CascadeClassifier('C:\\Users\\opencv\\data\\haarcascades\\haarcascade_frontalface_default.xml')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM