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 :
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,