Hello,every one! when I loaded my cascade file from openmv-cascade.py generated,the openmv3 crash and disconnect from IDE.How to solve this issue?Thanks!The source as follow:
cars_cascade = image.HaarCascade("/cars.cascade", stages = 13)
print(face_cascade)
# FPS clock
clock = time.clock()
lcd.set_backlight(1)
while (True):
clock.tick()
# Capture snapshot
img = sensor.snapshot()
# Find objects.
# Note: Lower scale factor scales-down the image more and detects smaller objects.
# Higher threshold results in a higher detection rate, with more false positives.
objects = img.find_features(cars_cascade, threshold=0.75, scale_factor=1.25)
# Draw objects
for r in objects:
img.draw_rectangle(r)
lcd.display(img)
Attach the cars xml file and cars.cascade cars.rar (14.9 KB)
Hi, I tested your cascade on M4 and M7 it works on both. If I have to guess I’d say the file wasn’t fully written/flushed before you reset the cam, so try this copy the file again and then eject (or safe remove) the drive, reset the cam and then try to run the script again.
And I used the example script that comes with the IDE, just replaced the cascade name and set stages = 13. I got one crash, then I copied the cascade again and it worked, which made me think that the file wasn’t fully written the first time. So my advise is to try again, but this time make sure the file is written (eject/safe remove the uSD after copying the file, then reset the cam from the IDE)