comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Normalize image after running FLAASH
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Normalize image after running FLAASH [message #88999] Sun, 13 July 2014 20:42 Go to previous message
phamlien24 is currently offline  phamlien24
Messages: 6
Registered: July 2014
Junior Member
pro correct_reflec


fname='D:\Quick\BAoct25_p004_R2C3_rad.dat'
envi_open_file, fname, r_fid=fid,NO_REALIZE=1
ENVI_FILE_QUERY,fid,DIMS=dims,NS=ns,NL=nl,NB=nb, pos=pos
Hi,

I had a Quickbird image and after running the FLAASH, I would like to normalize the image as following: if the pixel>0 or =10000, multiply it by 1; if pixel < or = 0 multiple it by 0; if pixel >0 and <10000 multiple it by its float value and devide the result by 10 000.

I wrote the IDL code as following, but my conditional statement is error. Could you please help me to fix the conditional statement.

Thanks so much for your help.

Lien

My IDL code:
"map_info=envi_get_map_info(fid=fid)
b1 = ENVI_GET_DATA(FID=fid, dims=dims, pos=1)
ns=n_elements(b1[*,0])
nl=n_elements(b1[0,*])
br=fltarr(ns,3,nl)

CASE 1 of
b1 le 0: br(*,0,*) = (b1)*0
b1 ge 10000: br(*,0,*)= (b1)* 1
else: br(*,0,*)= b1*foat(b1)/(10000)
ENDCASE

b2 = ENVI_GET_DATA(FID=fid, dims=dims, pos=1)
CASE 1 of
b2 le 0: br(*,1,*) = b2*0
b2 ge 10000:br(*,1,*)=b2*1
else: br(*,1,*)=b2*foat(b2)/10000
ENDCASE

b3 = ENVI_GET_DATA(FID=fid, dims=dims, pos=2)
CASE 1 of
b3 le 0:br(*,2,*) = b3*0
b3 ge 10000: br(*,2,*)=b3*1
else br(*,2,*)=b3*foat(b3)/10000
ENDCASE

envi_write_envi_file, br, map_info=map_info, out_name='D:\Quick\test', r_fid=fid
END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Case Insensitive Hash but still preserve cases of original keys
Next Topic: the problem of symbol Function

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:18:51 PDT 2025

Total time taken to generate the page: 0.00185 seconds