Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rkwik

Pages: [1]
1
Python and Java API / Re: GUI and API NIR and Blue pixel values different
« on: October 24, 2023, 09:14:00 PM »
Forgot to add the Blue into the albedo dictionary, sorry.
albedo = {"Blue":"0.66","Green": "0.67", "Red": "0.67", "NIR": "0.63", "Red edge": "0.67"}

I also realized that it is the blue and red-edge bands, not the nir.

2
I am also wondering if there is any way to see if the sun sensor was applied properly in the api? For example, if we can open the project that the api created, can we see anything in the gui that tells us this?
Here is the sun sensor code:
Thanks!


task = Metashape.Tasks.CalibrateReflectance()
task.use_reflectance_panels = True
task.use_sun_sensor = True
task.apply(chunk)
doc.save()

for sensor in chunk.sensors:
    sensor.normalize_sensitivity=True

chunk.locateReflectancePanels()
chunk.calibrateReflectance(use_reflectance_panels=True, use_sun_sensor=True)
doc.save()

3
Hello,
I am testing the results of GUI vs API processing of Micasense imagery. I use different shapefiles placed over the image to compare the pixel values of each band (using raster zonal stats). There are 5 bands: blue, green, red, red-edge, and nir.
The green and red orthomosaic results are great and the pixel averages for the shapefiles match well, the red-edge is also okay.
The issue is that the orthomosaic blue and nir pixels values are quite different for the shapefile areas. I manually set the whiteboard albedo in both the GUI and API {"Blue": "0.66", "Green": "0.67", "Red": "0.67", "NIR": "0.67", "Red edge": "0.63"}. Is there any other possibility of why this might be happening? Here is the code used for this step:



albedo = {"Green": "0.67", "Red": "0.67", "NIR": "0.63", "Red edge": "0.67"}

for camera in chunk.cameras:
    if camera.group and camera.group.label == "Calibration images":
        for plane in camera.planes:
            plane.meta["ReflectancePanel/Calibration"] = albedo[plane.sensor.bands[0]]

for sensor in chunk.sensors:
    sensor.normalize_sensitivity = True

task = Metashape.Tasks.CalibrateReflectance()
task.use_reflectance_panels = True
task.use_sun_sensor = True
task.apply(chunk)
doc.save()

for sensor in chunk.sensors:
    sensor.normalize_sensitivity=True

chunk.locateReflectancePanels()
chunk.calibrateReflectance(use_reflectance_panels=True, use_sun_sensor=True)
doc.save()



Thanks in advance!
- Robin

4
Hi Alexey,

Thank you! That is helpful.

Robin

5
I also noticed that buildDem does not have a filtering parameter. The software and python api seem so different

6
Howdy everyone,
I was reading the Metashape Python reference and couldn't find any info on a downscale or equivalent parameter for the buildDem function  :o . I am trying to match my Python script to the gui. Is there an equivalent?
Thanks in advance! - Robina


7
I am also wondering if the Point Cloud quality is dependent on the buildDepthMaps downscale?

8
I can't understand why the Python and software orthomosaic results are not matching.
I've tested different downscale parameters, but it looks like some functions like buildPointCloud and buildDem do not have these.
The Metashape Python Reference says nothing about these parameters (at least from what I've read). I'd suggest adding explanations of these into the Reference.
Could the lack of a downscale parameter be why I am consistently receiving incorrect results?

TIA
Robin

9
I am processing micasense imagery using the python api. The resulting python orthomosaic does not align correctly with the one processed in the software. They overlap, but there is a small offset. The defined parameters should all be the same. Is there any reason this could be happening?

Thanks,
Robina

  :o

10
For the calibrateReflectance function, how do I determine if "use_reflectance_panels" and "use_sun_sensor" is applied when I set them as True in the script?
Is there any way to check in the metashape project?

Thanks,
Rob

Pages: [1]