Identifying bright values ??in the pixels of an infrared ima
Posted: Wed Apr 11, 2012 3:07 am
Hello, again giving trouble.
doing some deployments in McIDAS-V, I note that the values ??of lines and elements which correspond to Mexico are the values ??determined by the AREA Coordinates (see AREA.jpg in attached),that is, the values ??associated with the image displayed on screen. This is true?
Assuming that is correct and After several changes, now I have a script that identifies pixels whose value is 200 for the region of Mexico. The code is as follows:
[cod
def scm(directory):
import os;
fs = os.listdir(directory);
# now fs will be listcm(directory):
import os;
fs = os.listdir(directory);
# now fs will be a list of all the files in directory
from edu.wisc.ssec.mcidas import AreaFile;
for name in fs:
print "Reading in:",name
af = AreaFile(directory+"/"+name);
ad = af.getAreaDirectory();
count = 0;
data = af.getFloatData();
# now look y count pixels
for i in xrange(ad.getLines()):
for j in xrange(ad.getElements()):
if 504 < i < 912 and 2 < j < 562: # find values ??for the region of Mexico
if (data[0][i][j]) == 200:
print i, j, data[0][i][j] ;
scm("/home/mcidas/Documents/datos/IR")
[/code]
when I run the scrip get the following (see mcv in attached)
I following have trouble in my image to identify the pixels whose value of 200 is maintained for 3 hours or more. can guide me to selecting only data that meets the condition referred up?
doing some deployments in McIDAS-V, I note that the values ??of lines and elements which correspond to Mexico are the values ??determined by the AREA Coordinates (see AREA.jpg in attached),that is, the values ??associated with the image displayed on screen. This is true?
Assuming that is correct and After several changes, now I have a script that identifies pixels whose value is 200 for the region of Mexico. The code is as follows:
[cod
def scm(directory):
import os;
fs = os.listdir(directory);
# now fs will be listcm(directory):
import os;
fs = os.listdir(directory);
# now fs will be a list of all the files in directory
from edu.wisc.ssec.mcidas import AreaFile;
for name in fs:
print "Reading in:",name
af = AreaFile(directory+"/"+name);
ad = af.getAreaDirectory();
count = 0;
data = af.getFloatData();
# now look y count pixels
for i in xrange(ad.getLines()):
for j in xrange(ad.getElements()):
if 504 < i < 912 and 2 < j < 562: # find values ??for the region of Mexico
if (data[0][i][j]) == 200:
print i, j, data[0][i][j] ;
scm("/home/mcidas/Documents/datos/IR")
[/code]
when I run the scrip get the following (see mcv in attached)
I following have trouble in my image to identify the pixels whose value of 200 is maintained for 3 hours or more. can guide me to selecting only data that meets the condition referred up?