draw_rectangle color mistake

Discussion related to "under the hood" OpenMV topics.
kidswong999
Posts: 24
Joined: Sun Apr 02, 2017 1:12 pm

draw_rectangle color mistake

Postby kidswong999 » Wed Apr 11, 2018 4:50 am

Hello, in the IDE, the border of the draw_rectangle function is not quite right.

Firmware Version: 2.7.0
IDE Version: 1.8.1

Code: Select all

import sensor, image, time
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time=2000)

while(True):
    img=sensor.snapshot()
    img.draw_rectangle((50,50,100,100),color=(255,0,0))
Attachments
ide.jpeg
ide.jpeg (107.03 KiB) Viewed 402 times
User avatar
iabdalkader
Posts: 497
Joined: Sun May 24, 2015 3:53 pm

Re: draw_rectangle color mistake

Postby iabdalkader » Wed Apr 11, 2018 12:02 pm

Hi, it's not a bug, it's just the heavy JPEG compression. Try this:

Code: Select all

img.draw_rectangle((50,50,100,100),color=(255,0,0), thickness=2)
User avatar
kwagyeman
Posts: 2113
Joined: Sun May 24, 2015 2:10 pm

Re: draw_rectangle color mistake

Postby kwagyeman » Wed Apr 11, 2018 12:31 pm

Thicknesses is only available in the new firmware. I'll upload a copy.
Nyamekye,
User avatar
kwagyeman
Posts: 2113
Joined: Sun May 24, 2015 2:10 pm

Re: draw_rectangle color mistake

Postby kwagyeman » Thu Apr 12, 2018 3:43 am

Latest firmware is attached. WiFi is broken, but, will fix before the release which is coming soon.
Attachments
openmv.zip
(2.14 MiB) Downloaded 8 times
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests