X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Mar 2015 11:46 AM by  anon
code to calculate black point
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:2
New Member


--
13 Mar 2015 11:46 AM
    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
    You are not authorized to post a reply.