X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=dof.lisp;h=ee9250a745c0d613716cdc405e798f8a8e191019;hb=c93207f19a0cb2c8d800c1b920796bffebf6f792;hp=5dfc5dd06e0dac523d29400f0bc58dd9f2152444;hpb=c9e757cf83865138421a9a09a6237fabbff2aab4;p=cl-photo.git diff --git a/dof.lisp b/dof.lisp index 5dfc5dd..ee9250a 100644 --- a/dof.lisp +++ b/dof.lisp @@ -70,6 +70,7 @@ Default resolving power is 5 lpm at 25cm." (defun maximum-sharpness-aperture (format &optional (wavelength 0.0005)) (multiple-value-bind (coc-w coc-h lpm-w lpm-h) (coc-pixels-format format) + (declare (ignore coc-w coc-h)) (/ 1. (* 1.22 wavelength (/ (min lpm-w lpm-h) 0.46))))) (defun dof-mm (focal-length f-stop distance coc &key (pupil-factor 1)) @@ -128,3 +129,9 @@ Output: NEAR-POINT, FAR-POINT, TOTAL-DOF, MAGNIFICATION, BLUR-SIZE-OF-INFINITY-P (defun effective-aperture (focal-length distance aperture) (* aperture (bellows-factor focal-length distance))) + +(defun mtf-scanner (freq dscan-freq &optional (order 3)) + (abs (expt (kmrcl:sinc (* pi (/ freq dscan-freq))) order))) + +(defun freq-mtf-scanner (dscan-freq mtf &optional (order 3)) + (* dscan-freq (/ (asin (* x (exp (/ (log mtf) order)))) pi)))