MemoryError on img.find_rects() API

Discussion related to "under the hood" OpenMV topics.
JackeyChuang
Posts: 3
Joined: Wed Oct 11, 2017 1:25 am

MemoryError on img.find_rects() API

Postby JackeyChuang » Fri Oct 13, 2017 12:36 pm

Hi ALL,

I get the IDE error : MemoryError: FB Alloc Collision!!!
on find_rects() API but it is not usually on the same code.
Could you know what is the root cause and how to fix it ? Thanks a lot!

Code: Select all

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QQVGA)
sensor.skip_frames(time = 2000)

roi_rect = (40, 80, 80, 40)

while(True):
    clock.tick()
    img = sensor.snapshot()

    for r in img.find_rects(roi = roi_rect, threshold = 9000): # sometime get ERROR here 
        img.draw_rectangle(r.rect(), color = (0, 0, 255))
User avatar
kwagyeman
Posts: 1175
Joined: Sun May 24, 2015 2:10 pm

Re: MemoryError on img.find_rects() API

Postby kwagyeman » Sat Oct 14, 2017 10:56 am

Works for me using firmware v2.5.0 with OpenMV IDE v1.7.1
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest