Panels

This notebook shows usage for the Panel class. This type is useful for detecting MicaSense calibration panels and extracting information about the lambertian panel surface.

In [1]:
%load_ext autoreload
%autoreload 2
In [2]:
import os, glob
from micasense.image import Image
from micasense.panel import Panel
%matplotlib inline

imagePath = os.path.join('.','data','0000SET','000')
imageName = glob.glob(os.path.join(imagePath,'IMG_0000_1.tif'))[0]

img = Image(imageName)
panel = Panel(img)

if not panel.panel_detected():
    raise IOError("Panel Not Detected!")
    
print("Detected panel serial: {}".format(panel.serial))
mean, std, num, sat_count = panel.raw()
print("Extracted Panel Statistics:")
print("Mean: {}".format(mean))
print("Standard Deviation: {}".format(std))
print("Panel Pixel Count: {}".format(num))
print("Saturated Pixel Count: {}".format(sat_count))

panel.plot();
Detected panel serial: RP02-1603036-SC
Extracted Panel Statistics:
Mean: 45404.3233048433
Standard Deviation: 721.6136168457384
Panel Pixel Count: 26325
Saturated Pixel Count: 0
In [3]:
imagePath = os.path.join('.','data','ALTUM1SET','000')
imageName = glob.glob(os.path.join(imagePath,'IMG_0000_1.tif'))[0]

img = Image(imageName)
if img.auto_calibration_image:
    print("Found automatic calibration image")
panel = Panel(img)

if not panel.panel_detected():
    raise IOError("Panel Not Detected!")
    
print("Detected panel serial: {}".format(panel.serial))
mean, std, num, sat_count = panel.raw()
print("Extracted Panel Statistics:")
print("Mean: {}".format(mean))
print("Standard Deviation: {}".format(std))
print("Panel Pixel Count: {}".format(num))
print("Saturated Pixel Count: {}".format(sat_count))

panel.plot();
Found automatic calibration image
Detected panel serial: RP04-1901231-SC
Extracted Panel Statistics:
Mean: 40852.49259547934
Standard Deviation: 516.106437450258
Panel Pixel Count: 10264
Saturated Pixel Count: 0

Copyright (c) 2017-2018 MicaSense, Inc. For licensing information see the project git repository