IDE error : MemoryError: FB Alloc Collision

194 views Asked by At

So I am having trouble with my OpenMV IDE concerning this code here. This code is in my main.py file.

for c in img.find_circles(threshold = 1600, x_margin = 10, y_margin = 10,r_margin = 10):
        img.draw_circle(c.x(),c.y(),c.r(),color = (255,0,0))
        print(c)

The first line which is the for loop, is where the IDE highlights the error after I run the program. The error is this "MemoryError: FB Alloc Collision". Im not sure what that error indicates.

1

There are 1 answers

0
itssme On

This happens when your OpenMV cam runs out of Memory. You will have to lower the cameras resolution like:

sensor.set_framesize(sensor.QQVGA)

If you are tracking something where the color doesn't matter you can set the sensor to GRAYSCALE:

sensor.set_pixformat(sensor.GRAYSCALE)

See the documentation for more details:
http://docs.openmv.io/library/omv.sensor.html?sensor.sensor.set_framesize#sensor.sensor.set_pixformat

Also see the OpenMV Github for some examples: https://github.com/openmv/openmv/tree/master/scripts/examples