find_rects seems to have broken

General discussion about topics related to OpenMV.
OutoftheBOTS
Posts: 85
Joined: Tue May 29, 2018 4:15 am

find_rects seems to have broken

Postby OutoftheBOTS » Mon Jun 04, 2018 3:09 am

I was using find_rects and it was working well but all of a sudden it seems to broken.

See this output https://youtu.be/KmAQoE-Q7RY

From this simple test script

Code: Select all

import sensor, image, time

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

white_threshold = (60, 100, -128, 127, -128, 127)

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

    img.binary([white_threshold])
    for r in img.find_rects(threshold = 5000):
        img.draw_circle(r.x()+r.w()//2, r.y()+r.h()//2, r.w()//2, color = (0, 255, 0))
    print("FPS %f" % clock.fps())
User avatar
kwagyeman
Posts: 2042
Joined: Sun May 24, 2015 2:10 pm

Re: find_rects seems to have broken

Postby kwagyeman » Mon Jun 04, 2018 12:27 pm

Is this from the firmware update? If so, I will fix.
Nyamekye,
OutoftheBOTS
Posts: 85
Joined: Tue May 29, 2018 4:15 am

Re: find_rects seems to have broken

Postby OutoftheBOTS » Mon Jun 04, 2018 4:39 pm

It was after the firmware update that I noticed it. You can see by the script that I wasn't using any of the updated features.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 2 guests