currently I am trying to implement my own hardhat-recognition to my MV-cam. For the Cascade classifier I used openCV and with my webcam it is working. Then I created a new .xml-classifier-file with the additional parameters “-SaveBaseFormat” and “-FeatureType HAAR” in order to make it usable for the MV-cam. Then I used this (https://github.com/openmv/openmv/blob/master/usr/openmv-cascade.py) script to transform it into a .cascade-file which I included like this into my micropython sript:
I have another question:
I created the XML-file with openCV. In order to run it on my Laptop (using it’s webcam) I created the new version of the XML-file (without the parameter -SaveBaseFormat).
The result is very good an it detects a lot of hardhats.
Now, in order to run it on the openMV-Cam I need the old format of the XML-file (created by using the parameter -SaveBaseFormat). But then I use the script (https://github.com/openmv/openmv/blob/master/usr/openmv-cascade.py) in order to convert it into a .cascade-file and it detects almost nothing. How ist this possible: I used the same parameters as I did for the new format.
I tried to replace the eye detection cascade with a new one. I converted the .xml file to .cascade file using the provided tool. But the video stream stuck and I think the camera cracked . I read the thread above and bascially the problem is the same as Fabianhummel’s. You created a new binary cascade (cascade.zip) for him and it also works on my machine. I want to know how you did that. I also attached my xml file. It’ll be great help if you create a binary cascade for me.
i want to create a cascade file from xml file
xml file is a opencv sample (haarcascade_fullbody)
i try to convert xml file to cscsde file whit openmv-cascade.py but it return
usage: conver [-h] [-i] [-n NAME] [-s STAGES] [-c] file
conver: error: too few arguments
Traceback (most recent call last):
File “C:\Users\azaduni\Desktop\conver”, line 288, in
File “C:\Users\azaduni\Desktop\conver”, line 272, in main
args = parser.parse_args()
File “C:\Python27\lib\argparse.py”, line 1656, in parse_args
args, argv = self.parse_known_args(args, namespace)
File “C:\Python27\lib\argparse.py”, line 1688, in parse_known_args
return self._parse_known_args(args, namespace)
File “C:\Python27\lib\argparse.py”, line 1901, in parse_known_args
self.error((‘too few arguments’))
File “C:\Python27\lib\argparse.py”, line 2311, in error
self.exit(2, _(‘%s: error: %s\n’) % (self.prog, message))
File “C:\Python27\lib\argparse.py”, line 2299, in exit