Skip to content

Obtaining reflectance values taking into account also DLS  #226

@MarcoVuerich

Description

@MarcoVuerich

Hello, I'm using a RedEdge MX as a ground sensor and I would like to take into account also DLS for reflectance calibration.

Citing tutorial n. 3
"we assume a constant irradiance (over time) and a ratio of direct to diffuse irradiance of 6:1. These assumptions only hold approximately, and only for clear sky. Cloud cover can lead to dramatically different results"
and also
"If your intent is to simply use this code to correct your data, you can skip this section and access pose-corrected DLS data through the capture.dls_irradiance() method".

My questions are: does the function capture.dls_irradiance() give me a value that is not affected by the choice of the ratio of direct to diffuse irradiance? In other words, the values that this function gives me, can be used directly in the subsequent part of code, that I report her below:

panel_radiances = np.array(cap.panel_radiance()) irr_from_panel = math.pi * panel_radiances / panel_reflectance_by_band dls_correction = irr_from_panel/dls_irradiances cap.plot_undistorted_reflectance(dls_irradiances*dls_correction) 

For the correcting calibration of reflectance of the other captures should I go with:

dls_irradiances=capture_to_analyze.dls_irradiance() capture_to_analyze.undistorted_reflectance(dls_irradiances*dls_correction) 

Moreover, every time I tried tutorial n.3 in this part of code

import numpy as np import micasense.dls as dls import os, glob import micasense.capture as capture images_path = os.path.join('.','data','0000SET','000') image_names = glob.glob(os.path.join(images_path,'IMG_0000_*.tif')) cap = capture.Capture.from_filelist(image_names) # set panel corners manually if zbar is not installed panelCorners = [[[809,613],[648,615],[646,454],[808,452]], [[772,623],[613,625],[610,464],[770,462]], [[771,651],[611,653],[610,492],[770,490]], [[829,658],[668,659],[668,496],[829,496]], [[807,632],[648,634],[645,473],[805,471]]] cap.set_panelCorners(panelCorners) panel_radiances = np.array(cap.panel_radiance()) 

gave me this error

 Cell In[285], line 1 np.array(panelCap.panel_radiance()) File ~\anaconda3\envs\micasense\lib\site-packages\micasense\capture.py:396 in panel_radiance mean, _, _, _ = p.radiance() File ~\anaconda3\envs\micasense\lib\site-packages\micasense\panel.py:268 in radiance return self.region_stats(radiance_img, File ~\anaconda3\envs\micasense\lib\site-packages\micasense\panel.py:239 in region_stats rev_panel_pts = np.fliplr(region) # skimage and opencv coords are reversed File <__array_function__ internals>:200 in fliplr File ~\anaconda3\envs\micasense\lib\site-packages\numpy\lib\twodim_base.py:98 in fliplr raise ValueError("Input must be >= 2-d.") ValueError: Input must be >= 2-d. 

What am I doing wrong? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions