Post

2 followers Follow
0
Avatar

cloud masks with masking algorithm in python

The masking algorithm does not generate cloud masks, it only generates a haze mask. Does anyone know how I can do this in Python? .
My example code:

from pci.masking import masking
from pci.exceptions import *

# The following locale settings are used to ensure that Python is configured
# the same way as PCI's C/C++ code.
import locale
locale.setlocale(locale.LC_ALL, "")
locale.setlocale(locale.LC_NUMERIC, "C")

fili = r"Z:\Pci-geomatics\DS_SPOT6_201610011507134_PS1_PS1_PS1_PS1_W077S07_03332\PROD_SPOT6_001\VOL_SPOT6_001_A\IMG_SPOT6_MS_001_A\DIM_SPOT6_MS_201610011507134_SEN_SPOT6_20170328_1507371ttsxfci7rql2_1.XML"
srcbgd = u""
asensor = u""
visirchn = [] # Integer
cfile = u""
znangle = [] # Float
hazecov = [60] # Float
clthresh = [14,20,2] # Float
wuthresh = [] # Integer
filo = r"Z:\Pci-geomatics\atcor\1.0_masking.pix"

try:
masking(fili, srcbgd, asensor, visirchn, cfile, znangle, hazecov, clthresh, wuthresh, filo)
except PCIException, e:
print e
except Exception, e:
print e
source:
http://www.pcigeomatics.com/geomatica-help/references/pciFunction_r/python/P_masking.html
rodolfo

Please sign in to leave a comment.

2 comments

0
Avatar

I'm sorry, the cloud mask manages to generate, only I can not visualize from FOCUS

rodolfo 0 votes
0
Avatar

Hello Rodolfo,

If you are unable to see anything in the produced cloud mask then it is possible that no areas were determined to be clouds in your imagery. The masking algorithm uses the values in CLTHRESH to identify pixels as clouds. You may need to adjust this parameter. More information is available in the Geomatica Help (Focus > Help > General). 

If you are unable to produce the cloud masks, you can send a print screen of your imagery to support@pcigeomatics.com and they can take a look. 

Hope this helps,

Sarah 

PCI Geomatics 0 votes