> (define rad (read-image "radiation.pgm")) > rad #<image: rows = 243 cols = 320> >

> (load "histogram.scm") > (load "match.scm") > (cumulative-distribution-function rad) #(0 0.00327932 0.00983796 0.0229552 0.0491898 0.081983 ... 229.415 232.71 239.141 254.993 255) > > (define equalized-rad (histogram-equalize rad)) > equalized-rad #<image: rows = 243 cols = 320> >

> > (plot-histograms rad equalized-rad) >

> (define frog (read-image "frog.pgm")) > frog #<image: rows = 225 cols = 242> >

> (cumulative-distribution-function frog) #(3.16584 8.24711 11.0149 12.8554 14.1901 ... 252.274 253.056 254.148 254.892 255) > > (define equalized-frog (histogram-equalize frog)) > equalized-frog #<image: rows = 225 cols = 242> >

> (plot-histograms frog equalized-frog) >

> (define cropped (crop rad 0 0 225 242)) > cropped #<image: rows = 225 cols = 242> >

> (inverse-cumulative-distribution-function cropped) #(0 12 16 20 24 27 30 32 34 36 37 38 ... 254 254 254 254 254 254 254 254 254 254 254 255) > > (define frog->cropped (histogram-match frog cropped)) > frog->cropped #<image: rows = 225 cols = 242> >

> (plot-histograms cropped frog->cropped) >

> (inverse-cumulative-distribution-function frog) #(0 0 0 0 1 1 1 1 1 2 2 2 3 4 4 5 6 7 9 10 ... 235 239 243 247 249 251 252 253 255) > > (define cropped->frog (histogram-match cropped frog)) #<image: rows = 243 cols = 320> >

> (plot-histograms frog cropped->frog) >