Hello,
I have the following code to calculate the black point of the optimized linear stretch (
http://www.exelisvis.com/...dLinearStretch.html)
for i=0, count-1 do begin
img=read_tiff(images[i])
pdf = HISTOGRAM(img, LOCATIONS=xbin)
c = TOTAL(pdf, /CUMULATIVE) / N_ELEMENTS(img)
cdf= (c-c[0]) / max(c-c[0])
min_perc = VALUE_LOCATE(cdf, 0.025)
max_perc = VALUE_LOCATE(cdf, 0.99)
black_point=xbin[min_perc]-0.1*(xbin[max_perc]-xbin[min_perc])
somehow the results are different from what I get from ENVI. Could anyone share any insight about this or if I did something wrong?
Thanks very much in advance