pro eqshow,movin,movout,smo,umq,thr ; to show the equalized images (unsharp masking) in a movie... ; MOVIN - input movie ; MOVOUT- output movie ; SMO - smoothing parameter in pixels ; UMQ - unsharp masking coefficient (0 - no um., 1 - max. um.) ; THR - threshold value (optional) smov=size(movin) if smov(0) ne 3 then begin print,'Input must be a 3-D array!' stop endif nima=smov(3) print,'number of frames:',nima movout=movin*0 for i=0,nima-1 do begin oima=movin(*,*,i) ; Equalized image (unsharp masking) ima=SMOOTH(oima,smo) ima=oima-umq*ima ; Thresholding if n_params() eq 5 then ima=ima gt thr ;------------------------------------------------------------------------------ ; log scaling ; ; Cutting negative values ; ima=ima>0 ; ; Scaling image to be edible for ALOG ; ima=100.*float(ima)/mean(ima)>1. ; here is applied a selection that BF ; ; must be brighter than 1% of the mean ; ima=alog(ima) ; ; Masking ; ima=ima*oima ; masked original image ; mp=ima lt 5500 ; negative mask for penumbra and LBs ; ima=ima*mp ; (5500 = max. allowed brightness) ;------------------------------------------------------------------------------ movout(0,0,i)=ima endfor animate,movout end