MaixPy-v1 icon indicating copy to clipboard operation
MaixPy-v1 copied to clipboard

find_line_segments freezes

Open beckmx opened this issue 2 years ago • 0 comments

Describe the bug When using find_line_segments the output of the console gets freezed and looks like it doesnt have enough memory to continue, I havent received any core dump directly but I have to reboot to make it work again.

To Reproduce Steps to reproduce the behavior:

#find non-infinite lines NOT WORKING
import sensor, image, lcd, time
lcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565) # grayscale is faster
sensor.set_framesize(sensor.QVGA)
sensor.set_windowing((224, 224))
sensor.run(1)
sensor.skip_frames(30)

tim = time.ticks_ms()
while(time.ticks_diff(time.ticks_ms(), tim)<30000):
    img = sensor.snapshot()
    for l in img.find_line_segments(merge_distance = 20, max_theta_diff = 25, roi=(80,60,160,120)):
        print("line-->")
    lcd.display(img)
print("finish")
lcd.clear()

Expected behavior Lines should be able to be found

Actual behaviour K210 freezes and stops sending image

Screenshots If applicable, add screenshots to help explain your problem.

Please complete the following information

  • IDE version: [0.2.5]
  • Firmware version: [v0.6.2-84-g8fcd84a58]
  • Board: [Maix Nano ]
  • OS: [OSX]

beckmx avatar Feb 17 '23 05:02 beckmx