upper quartile

Discussion related to "under the hood" OpenMV topics.
User avatar
chrisPyres66
Posts: 90
Joined: Mon Jul 16, 2018 9:22 am
Location: France

upper quartile

Postby chrisPyres66 » Thu Jun 13, 2019 10:42 am

Dear all,

I try to analyse area of image, and i get different values of upper quartile for the same area.
Here is the test code :

Code: Select all

import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time=1000)

while(True):
   img = sensor.snapshot()
   #Uq_mask = img.draw_rectangle(120, 0, 200, 240, color = (0, 0, 0), fill = True, copy_to_fb=True).get_statistics(threshold=[(10,255)]).uq()
   Uq_roi =  img.histogram(roi=(0, 0, 120, 240)).get_statistics().uq()
   #Uq_mask = img.draw_rectangle(120, 0, 200, 240, color = (0, 0, 0), fill = True).histogram(threshold=[(10,255)]).get_statistics().uq()
   Uq_mask = img.draw_rectangle(120, 0, 200, 240, color = (0, 0, 0), fill = True).get_statistics(threshold=[(10,255)]).uq()
   print(Uq_roi, Uq_mask)
   print(" -------------------------- ")
   time.sleep(1000)
It seems the threshold does not work to get supper quartile through histogram or get_statistics (in documentation it is thresholds but it does not work at all).
Any help would be very appreciated ?

Thanks,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests