B t t i C C U p e L u M 4 Histogram-based method for contrast measurement Luis Miguel Sanchez-Brea, Juan Antonio Quiroga, Angel Garcia-Botella, and Eusebio Bernabeu A histogram-based technique for robust contrast measurement is proposed. The method is based on fitting the histogram of the measured image to the histogram of a model function, and it can be used for contrast determination in fringe patterns. Simulated and experimental results are presented. © 2000 Optical Society of America OCIS codes: 100.0100, 100.2650, 100.2960. p m i c m s 1. Introduction Contrast measurement is a useful tool for the mea- surement of the modulation transfer function ~MTF! of an optical system. A direct method for determining the MTF is by measuring the contrast of several sinusoidal fringe patterns with different spatial frequencies imaged by the optical system under test. However, since sinusoidal patterns are difficult to obtain, usually the MTF is indirectly measured with Ronchi patterns. This gives an es- timation of the contrast transfer function ~CTF!. y means of a modal expansion of the square pat- ern, it is possible to obtain a relationship between he CTF and the MTF, and when this relationship is nverted, the MTF can be measured in terms of the TF,1,2 MTF~ f ! 5 p 4 FCTF~ f ! 1 CTF~3f ! 3 2 CTF~5f ! 5 1 CTF~7f ! 7 1 · · ·G , (1) The authors are with the Departamento de Óptica, Universidad omplutense de Madrid, Facultad de Ciencias Fı́sicas, Cuidad niversitaria syn, 28040 Madrid, Spain. When this research was erformed, J. A. Quiroga was with the Centro de Investigaciones n Óptica, Apartado Postal 1-948, 37000 Léon GTO, México. . M. Sanchez-Brea’s e-mail address is optbrea@eucmos.sim. cm.es. Received 13 October 1999; revised manuscript received 27 arch 2000. 0003-6935y00y234098-09$15.00y0 © 2000 Optical Society of America 098 APPLIED OPTICS y Vol. 39, No. 23 y 10 August 2000 where f is the frequency. In the absence of noise and for a periodic signal the straightforward definition of contrast is C 5 IMAX 2 IMIN IMAX 1 IMIN , (2) where IMAX and IMIN are the maximum and the min- imum values of the signal. When noise or small background variations are present, it is not possible to apply this definition di- rectly. If the image from which we wish to deter- mine the contrast is formed by a straight-line pattern, one possibility is to align the pattern ~by digital or optical methods! parallel to one of the ref- erence axes and then sum along it. In this way the averaging will reduce the noise, enabling the mea- surement of IMAX and IMIN. Unfortunately this sim- ple method has big drawbacks, especially if medium- low contrasts are to be measured ~C ' 0.5–0.1!. In addition, the determination of IMAX and IMIN by a simple averaging is sensitive to noise andyor to small background variations. Furthermore, this method cannot be applied when fringes become curved after passing through the optical system or for circular fringes, which can be used for the determination of directional MTF when we analyze a small slit of the image at the proper direction. Another way to evaluate the contrast of a fringe pattern is by use of the histogram, as suggested by Lai and von Bally.3 However, the algorithm they propose does not match the definition of contrast @Eq. ~2!# even when no noise is present. In this study we ropose a histogram-based technique for contrast easurement of fringe patterns that can be applied n the presence of additive noise and with patterns omposed of fringes that are not straight. The ethod is based on fitting the histogram of the mea- ured fringe pattern to the histogram of a model func- i s t a u 5 ~ o a p t u p I l i t C d s f e tion that depends on several parameters. The parameters of the model function provide informa- tion about contrast and noise level. By means of histogram analysis we can obtain more information about fringes, besides contrast. Generally histograms of fringe patterns present two lobes, but square and sinusoidal fringe patterns with the same contrast do not have the same histogram shape. From this difference, information about the fringe shape can be obtained. This paper is organized as follows: In Section 2 we show how to calculate the histogram of the chosen model function and how to extract the contrast infor- mation from an experimental fringe pattern by use of this model function. In Section 3 we apply the algo- rithm to simulated fringe patterns. In Section 4 ex- perimental results with real fringe patterns are obtained. Finally in Section 5 conclusions are given. 2. Contrast Measurement from the Histogram The continuous histogram h~y! of a continuous func- tion f ~x! can be defined as the number of points j that fulfill y # f ~j! , y 1 dy. The mathematical expres- sion of this definition is h~y! 5 * V d@ f ~x! 2 y#dx, (3) where d stands for the Dirac-delta function and V is the set of points x where we are computing the his- togram. The Dirac-delta function of a continuous function g~x! is4 d@g~x!# 5 ( i 1 ug9u d~x 2 xi!, (4) where g9 represents derivative of g with respect to x, u z u means absolute value, xi are the roots of g~x!, and is an index that runs over them. Then, if we con- ider g~x! 5 f ~x! 2 y, (5) by applying Eqs. ~3! and ~4! and taking into account that the root of Eq. ~5! is x 5 f21~y!, we obtain h~y! 5 * V 1 u f9u d@x 2 f 21~y!#dx, (6) or h~y! 5 1 u f9@ f 21~y!#u . (7) Expression ~7! can be rewritten, by means of the in- verse function theorem, as h~y! 5 Udf 21~y! dy U . (8) Equations ~7! and ~8! are a well-known result of the heory of probability if we interpret the histogram of function as the probability distribution for the val- es of y. From Eq. ~6! it is clear that the conditions for f ~x! to have a histogram are the existence of the inverse function f21~y! and the absence of extrema of f ~x! within V. For these reasons, in the case of pe- riodic functions, we cannot directly apply Eqs. ~7! or 8!. To compute the histograms, we must use only ne semiperiod between a minimum and a maximum nd multiply the histogram by the number of semi- eriods present. For instance, to compute the con- inuous histogram of f ~x! 5 a 1 b cos~wx!, a . b, we se the interval V 5 ~0, pyw! where no extrema are resent and f21~y! is defined. Then, applying Eq. ~7!, we obtain h~y! 5 H1yuv@b2 2 ~y 2 a!2#1y2u a 2 b , y , b 1 a 0 elsewhere . (9) n this way, when our fringe pattern corresponds to ines of any shape with sinusoidal profile, we can fit ts histogram with the one given by Eq. ~9!, and from he fitting parameters we can obtain the contrast by 5 ubyau. However, if we use Ronchi rulings to etermine the CTF of an optical system, this simple cheme does not work properly because of noise in the ringe pattern and discontinuities of the model, as xplained in Subsections 2.A–2.D. A. Histogram of a Noisy Signal When a fringe pattern is obtained by means of a CCD camera or by other procedures, there always exists noise that modifies the histogram shape. We will assume an additive noise n~r! whose probability dis- tribution is p~y!, where r is the position vector. The histogram h~y! of the fringe pattern I~r! can be con- sidered to be the probability distribution of the inten- sity values. Thus the histogram of a noisy image, I#~r! 5 I~r! 1 n~r!, (10) will be the probability distribution of a signal com- posed by the sum of two signals with probability dis- tributions h~y! and p~y!. From probability theory5,6 it can be proved that the histogram of I#~r! is h# ~y! 5 h~y! p p~y!, (11) where p denotes the convolution product. Then, by selecting a model for the additive noise, we can de- termine the histogram of the selected model with additive noise as the convolution product of the model histogram with the noise histogram. B. Elimination of Divergences Another problem of the continuous histogram @Eq. ~7!# are the divergences that exist near the extrema of the model, where f9~x! 5 0. The presence of these divergences destabilizes the minimization algorithm necessary for the fitting process, making it difficult and unreliable. We solved this problem by using a sampled model instead of a continuous one. For a sampled model with M samples it is clear that the histogram will never diverge, the fitting making eas- 10 August 2000 y Vol. 39, No. 23 y APPLIED OPTICS 4099 w t v t s w W m d b fi h t t t t 4 ier and more reliable. This solution is not really an approximation, since any digital image acquisition system imposes a spatial sampling and an intensity quantization. The first step to compute the discrete histogram of a sampled function is to define the range of values for the intensities and the domain of the sampled func- tion. The possible values for the intensities are yn 5 ~n 2 1!Dy, n 5 1, . . . , N, (12) here Dy is the difference between two adjacent in- ensity levels and we are assuming that the lowest alue for the intensity is 0. The domain V, where he sampled function is defined, is given by a uniform ampling, xm 5 x1 1 ~m 2 1!Dx, m 5 1, . . . , M, (13) here x1, Dx, and M are free parameters that deter- mine this sampling. The discrete histogram h@n# ~where the square brackets indicate that the discrete histogram can have only positive integer values! of the sampled b a function f ~xm! is defined as the number of points xm such that y1 # f ~xm! , y1 1 Dyy2, n 5 1, yn 2 Dyy2 # f ~xm! , yn 1 Dyy2, 1 , n , N, yN 2 Dyy2 # f ~xm! , yN, n 5 N. (14) ith this definition h@n# is basically calculated by eans of counting the number of points xm in the interval @ f21~yn 2 Dyy2!, f21~yn 1 Dyy2!#, that is, t ~ m b where int~x! denotes the integer part of x and nMAX and nMIN are the first and the final in- ices with h@n# different from 0. They are computed y nMAX 5 int@ f ~xM!yDy# 1 1, nMIN 5 intf @~x1!yDy# 1 1. (16) 100 APPLIED OPTICS y Vol. 39, No. 23 y 10 August 2000 The 11 added to h@nMAX# is to take into account the nal point @xM, f ~xM!#. From Eq. ~15! it is easy to verify that ( n51 N h@n# 5 M, (17) where M is the total number of sampling points. Then Eqs. ~15! and ~16! define the way a discrete histogram of a sampled function can be computed. However, working with integer parts and absolute values is not comfortable from the viewpoint of the analysis, so we are going to define a continuous his- togram of a sampled model function, h~n!, from its discrete counterpart, h@n#. To eliminate the abso- lute values, we are going to consider only model func- tions f ~x! monotonically increasing in the range @x1, xM#. This is not a lack of generalization, because the istogram of a monotonically decreasing function is he same as the corresponding mirror reflection about he vertical axis. With this consideration and when he integer parts of Eq. ~15! are eliminated, the con- inuous histogram of the sampled function, h~n!, is where nMAX and nMIN are defined by Eq. ~16!. Again, from Eq. ~18! it is easy to verify that ( n51 N h~n! 5 M, (19) so no divergences appear as long as f21~yn! exists. Also, in the limit Dx3 0, Dy3 0, Eq. ~18! is the link etween the discrete histogram of a sampled function nd the corresponding continuous histogram of a con- inuous function given by Eqs. ~7! and ~8!. Thus Eq. 18! is the expression of the histogram we adopted to ake the calculations. Figure 1 shows the relation etween h@n# and h~n! for the model function f ~x! 5 a 1 b cos~wx! with b 5 75, a 5 125; x1 5 0, xM 5 pyw, and M 5 300. C. Model Function Once we know how to account for the effect of the noise in the histogram of the model function @Eq. h@n# 5 5 uint@ f 21~ynMIN 1 Dyy2!yDx# 2 int~x1yDx!u n 5 nMIN uint@ f 21~yn 1 Dyy2!yDx# 2 int@ f 21~yn 2 Dyy2!yDx#u nMIN , n , nMAX uint~xMyDx! 2 int@ f 21~ynMAX 2 Dyy2!yDx#u 1 1 n 5 nMAX 0 elsewhere , (15) h~n! 5 5 @ f 21~ynMIN 1 Dyy2! 2 x1#yDx n 5 nMIN @ f 21~yn 1 Dyy2! 2 f 21~yn 2 Dyy2!#yDx nMIN , n , nMAX @xM 2 f 21~ynMAX 2 Dyy2!#yDx 1 1 n 5 nMAX 0 elsewhere , (18) ~ t c p f m a d s A a f t m m m w m a p c ~11!#, and how to manage the divergences appearing in the continuous definition of the histogram @Eq. 18!#, the next step is to select a suitable model func- ion able to adapt to a variety of profiles, from high- ontrast square patterns to almost pure sinusoidal atterns, considering a continuous grading of shapes rom square to sinusoidal. The simple sinusoidal odel function of Eq. ~9! is not flexible enough to ccomplish all this phenomenology. A good candi- ate for this, and the one we finally adopted, was the igmoidal function fS~x! given by fS~x! 5 a 1 b 2 a 1 1 exp@2~x 2 x0!yl# , (20) where a and b are parameters that control the max- imum and the minimum values of fS~x!, x0 is a pa- rameter that controls the possible lateral shift, and l is the parameter that controls the shape: As l grows, fS~x! changes from a step function to a sinu- soidallike function. Then, as explained above for pe- riodic signals, fS~x! will represent an approximation of one semiperiod. The continuous histogram of fS~x! is, when we apply Eq. ~7! or Eq. ~8!, hS~y! 5 Hl~b 2 a!y@~b 2 y!~y 2 a!# y [ ~a, b! 0 elsewhere . (21) s can be seen in Eq. ~21!, divergences appear in y 5 and y 5 b, making it difficult to be used as a fitting unction ~as explained above!. When we take into account that the inverse func- ion of fS~x! is fS 21~y! 5 x0 2 l lnSy 2 b a 2 yD , (22) the continuous histogram of the sampled version of fS~x! is where nMIN and nMAX are given by Eq. ~16!. We have assumed the additive noise to be Gauss- ian, with zero mean, since it is easily tractable. Then its probability distribution will be p~y, s! 5 1 Î2ps expS2 y2 2s2D , (24) and then the model histogram for the sigmoidal func- tion with additive Gaussian noise incorporated in the model will be, when we apply Eq. ~11!, h# S~n, a, b, l, x0, s! 5 hS~n! p p~n, s!, (25) hS~n! 5 5 @ fS 21~ynMIN 1 Dyy2! 2 x1#yDx l Dx ln(H1 1 Dy @b 2 ~n 2 1y2!Dy#JH1 $xM 2 fS 21~ynMAX 2 Dyy2!%yDx 1 1 0 where we have explicitly written the free parameters of the model and p~n, s! is the sampled version of Eq. ~24! obtained by changing of the continuous variable y with yn given by Eq. ~12!. D. Calculation of Contrast Parameters The final step in the proposed method for contrast measurement is the calculation of the parameters a, b, l, x0, and s that minimize the functional E given by E 5 ( n51 N $hD@n# 2 h# S~n, a, b, l, x0, s!%2, (26) where hD@n# is the discrete histogram of the experi- ental data to be analyzed, with its maximum nor- alized to 1. From the parameters obtained in the inimization of Eq. ~26! the contrast of the image ith the histogram is C 5 fS~xM! 2 fS~x1! fS~xM! 1 fS~x1! . (27) When the noise is independent of the intensity val- ues, Eq. ~26! resumes our contrast measurement ethod. However, in real experiments we observed n intensity dependence on the noise level. We ex- ect that the development of a model with multipli- ative noise will solve this problem. Nonetheless, n 5 nMIN Dy ~n 2 3y2!Dy 2 a#J) nMIN , n , nMAX n 5 nMAX elsewhere , (23) Fig. 1. Relationship between h@n# ~circles! and h~n! ~diamonds! for f ~x! 5 a 1 b cos~wx!, with b 5 75, a 5 125, x1 5 0, xM 5 pyw, and M 5 300. Only one of each of the four points is presented to improve the visibility of the figure. 1 @ 10 August 2000 y Vol. 39, No. 23 y APPLIED OPTICS 4101 t fi o a r u m v 4 we adopted a strategy based on the additive noise model, which consists of dividing the histogram of a noisy model function into two parts and using two noise levels s1 and s2 for each one. We implemented his idea by means of a weighting function L~n!, de- ned as a step function with a linear transition zone f width Dn 5 int@a~b 2 a!# gray levels and centered at n 5 int@~a 1 b!y2#. The parameter that controls the width of the transition zone is typically a 5 0.1. Finally, the histogram for the sigmoidal function with two levels of additive noise will be h# S~n, a, b, l, x0, s1, s2! 5 L~n!@hs~n! p p~n, s1!# 1 @1 2 L~n!#@hs~n! p p~n, s2!#, (28) Fig. 2. Simulated one-dimensional fringe patterns with additiv quasi-sine fringe pattern, ~c! quasi-square fringe pattern. For a obtained from ~a!, ~b!, ~c!, respectively; curve, fits to sigmoidal his 102 APPLIED OPTICS y Vol. 39, No. 23 y 10 August 2000 and the parameters are determined by the minimi- zation of E 5 ( n51 N $hD@n# 2 h# S~n, a, b, l, x0, s1, s2!% 2. (29) From Eq. ~23! it can be seen that Eqs. ~26! and ~29! re nonlinear minimization problems. Many algo- ithms exist to perform this task. In particular we sed the Nelder–Mead-type simplex algorithm imple- ented in the optimization toolbox of the Matlab en- ironment.7 In general the successful minimization of a nonlinear problem needs good starting values for the parameters involved. In our case the best re- sults were obtained with the following rules for se- lecting the starting values. When hD@n# is bimodal, se and different fringe profile: ~a! for a sine fringe pattern, ~b! es a 5 50, b 5 200, s 5 15 g.l. ~d!, ~e!, ~f !: circles, histograms m by means of minimization of Eq. ~26!. e noi ll cas togra G Table 1. Estimated Parameters for Fringe Profiles of Fig. 2 with a Histogram-Based Method a and b are initialized as the gray values that corre- spond to each maximum of hD@n#. If hD@n# presents only one lobe, whose maximum is located in the gray value G, the parameters a and b are initialized as 2 DG and G 1 DG, with DG typically 4. Fig. 3. Simulated ~thin! and estimated ~thick! fringe shape for the fringe patterns given in Fig. 1. The estimated fringe shape is obtained from results of Table 1. As we can see, there is a good agreement between the simulated and the estimated profiles. Figure a* b* fS~x1!* fS 2~a! 50.67 203.59 54.01 2 2~b! 53.07 204.41 53.36 2 2~c! 52.35 198.50 52.35 1 *Gray levels. The shape parameter l is initialized as hD@~na 1 nb!y2#, where na and nb are the indices of the gray values a and b previously initialized. If the histo- gram hD@n# is too noisy, local averaging centered on n 5 ~na 1 nb!y2 is done for the calculation of hD@~na 1 nb!y2#. Finally, the parameter x0 is initialized to 0, and the parameters s1 and s2 are initialized as the width at half the height of each of the lobes if the histogram is bimodal. If the histogram is monomodal s1 and s2 are initialized as the corresponding width of the unique lobe. 3. Application to Simulated Patterns The algorithm depicted above was applied to three simulated fringe patterns with added noise, as shown in Fig. 2. Since we are working with 256 gray levels ~g.l.! in all these cases, then N 5 256, Dy 5 1, and thus yMIN 5 0 and yMAX 5 255. We arbitrarily fixed x1 5 21, xM 5 1, Dx 5 1023, M 5 2001, for all our measurements. Figures 2~a!–2~c! show the fringe patterns that range from a sinusoidal to a square profile shape. In the three cases the actual contrast is 0.6 ~a 5 50, b 5 200!, x0 is zero, and the noise standard deviation is 15 g.l. The corresponding histograms and the result of the minimization of Eq. ~26! are shown in Figs. Fig. 4. Estimated uncertainty for contrast estimation in terms of Gaussian noise for several fringe shapes: ~inverted triangles! l 5 0.263; ~asterisks! l 5 0.160; ~circles!, l 5 0.0308. In this case the contrast is C 5 0.6 ~a 5 50, b 5 200!. Parameter * C x0* l s* 0.575 0.06 0.263 14.77 0.586 20.07 0.160 12.42 0.583 0.03 0.0308 15.67 ~xM! 00.25 04.12 98.50 10 August 2000 y Vol. 39, No. 23 y APPLIED OPTICS 4103 F p a e t a fi c m r s i T h s i t q r t m t t r o f 5 o A f t w u y 1 7 4 2~d!–2~f !. Visually the fit is good; and also numeri- cally, as shown in Table 1. Figure 3 represents half a period of the simulated profiles of Fig. 2 together with the sigmoidal function ~20! evaluated for the corresponding parameters shown in Table 1. The profiles depicted in Figs. 3~a!, 3~b!, and 3~c! correspond to the simulated profiles of igs. 2~a!, 2~b!, and 2~c!, respectively. In this exam- le we can see that the sigmoidal model function dapts well from sine to square fringes. To determine the performance of the algorithm we stimated the contrast in terms of the noise level for hree different shapes: sinusoidal, quasi sinusoidal, nd almost square. For each level of noise and pro- le shape we estimated the contrast ten times and alculated the mean relative error. In Fig. 4 the ean relative error is represented in terms of the elative error. As can be seen, the error for the quare-shaped profile is less that the one correspond- ng to the sinusoidal and the quasi-sinusoidal ones. he reason for that behavior is that the square profile as well-defined populations that produce two well- Fig. 5. ~a! Estimation of l in terms of the number of fringes per frame for three different shape profiles, ~b! estimation of contrast for the same cases. The theoretical contrast is C 5 0.6, and a noise of 10 g.l. has been added. 104 APPLIED OPTICS y Vol. 39, No. 23 y 10 August 2000 eparated lobes in the histogram. As a consequence t is easier for the minimization algorithm to detect hem correctly. In the case of the sinusoidal and the uasi-sinusoidal patterns the lobes are not so well esolved, making it more difficult to determination heir positions correctly as the noise increases. We also carried out an experiment that consists of odifying the number of fringes per frame to show hat the fitting parameters do not depend on the spa- ial frequency of the output signal, especially the pa- ameter l that accounts for the fringe shape. We btained that the spatial frequency of the signal af- ects only the histogram as a scaling factor. In Fig. ~a! we show the parameter l in terms of the number f fringes per frame for three different fringe profiles. s we can see, l is constant for the three cases, except or a small fluctuation that is due to noise. A con- rast estimation in terms of the number of fringes as also carried out @Fig. 5~b!#. For the three sim- lations the contrast is approximately the same. 4. Experimental Results In this section we show the results of the application of the algorithm depicted above to determine the CTF of an optical system. Our particular interest was the measurement of the MTF of translucent rough screens. The first step of the method we are using is the measurement of the CTF and afterward estima- tion of the MTF1 from the CTF measurement. The optical setup for the measurement of the CTF is shown in Fig. 6. The light produced by a halogen lamp is directed to the input port of an integrating sphere such that at the output port we have a nearly uniform white-light beam that is localized on a dia- phragm by means of an achromatic doublet. The light emerging from the diaphragm is collimated by means of another achromatic doublet and directed to a Ronchi bar test that is projected on a rough trans- lucent screen. The transmitted pattern is imaged on a bidimensional CCD camera by means of a third achromatic doublet. The CCD performs an 8-bit quantization ~256 g.l.!, and then N 5 256, Dy 5 1, MIN 5 0, yMAX 5 255. For the sampling of the sigmoidal function we used x1 5 21, xM 5 1, Dx 5 023, M 5 2001. As an example, in Fig. 7 we can see the application of the algorithm to three real images. Figures 7~a!– ~c! are profiles from the images recorded by the CCD Fig. 6. Sketch of the experimental setup for contrast measure- ment of bar tests when a translucent rough sheet is interposed between the bar test and the CCD camera. t t camera, and figures 7~d!–7~f ! are the experimental histograms of the corresponding images together with the results of the minimization of Eq. ~29!. Es- pecially remarkable is the example of Figs. 7~a! and 7~d!; in this case the maxima of the contrast pattern are modulated, producing a lobe whose width is not due to the noise but to the intensity modulation of the maxima. Even in this case the algorithm works well and correctly locates the lobes. This shows that the parameters associated with the noise, s1 and s2, can be interpreted as high-frequency additive noise or as a low-frequency modulation present in the image, or, in general, as a mix of both effects. Table 2 shows the parameters obtained by the fits. Finally we measured the CTF of a translucent rough sheet. The contrast of the observed pattern depends on the period of the bar test h, the separation Fig. 7. Profiles from two-dimensional real fringe patterns and fit and ~e! sinusoidal high-contrast pattern, and ~c! and ~f ! square hig improve the visibility of ~d!–~f !. Circles, experimental histogram between the bar test and the translucent rough sheet d, and its roughness tys, as shown by Garcia-Botella et al.,8 according to CTF~h, d, syt! 5 4 p ( k50 ` ~21!k S 1 2k 1 1D 3 expH2F~2k 1 1! 2p h sd~n 2 1! t G2J . (30) In Fig. 8 we can see the fit of our experimental measurements of the CTF ~obtained by the histogram-based method! to Eq. ~30! in terms of spa- ial frequency for two values of the separation be- ween the bar test and the sheet: d1 5 5 cm ~circles! their histograms: ~a! and ~d! sinusoidal low-contrast pattern, ~b! trast pattern. Only one of each of the four points is presented to e, the fit. s for h-con ; curv 10 August 2000 y Vol. 39, No. 23 y APPLIED OPTICS 4105 2 3 4 5 6 7 8 b 4 and d2 5 10 cm ~squares!. The roughness parame- ter for the sample was tys 5 165 6 5, measured by profilometry and reflectogoniometry. As can be seen, the agreement between the model and the ex- perimental measurements is good. Especially re- markable is the behavior of the experimental measurements in the tails, where a small peak can be observed ~Fig. 8, circles, at 2 cyclesymm!. This be- havior is reproducible, so we think that it corresponds to diffraction effects that the geometric model @Eq. ~30!# does not consider. 5. Conclusions In this study we have presented a histogram-based technique for robust contrast measurement. The Fig. 8. Measurements of contrast transfer function by means of histogram-based method, for a dielectric rough sheet with n 5 1.523 and roughness parameter of tys 5 165 6 4, at distances etween bar test and sheet of d1 5 5 cm ~squares! and d2 5 10 cm ~circles!, compared with the model proposed by Garcia-Botella et al.8 Table 2. Estimated Parameters for Measurements of Real Fringe Patterns by Means of a Histogram-Based Method Figure Parameter a* b* fS~x1!* fS~xM!* C l s1* s2* ~a! 47.25 77.25 50.65 73.85 0.186 0.486 2.11 1.26 ~b! 5.64 122.47 6.61 121.50 0.897 0.209 2.25 24.59 ~c! 0.10 177.35 0.10 177.35 0.999 0.0026 0.55 8.35 *Gray levels. 106 APPLIED OPTICS y Vol. 39, No. 23 y 10 August 2000 method is based on the fitting of the histogram of the measured image with the histogram of a model func- tion. Analytical expressions for the histogram of continuous as well as sampled functions were ob- tained. The selected model function was the sigmoi- dal function, which was shown to be flexible enough to accommodate a great variety of cases. With this technique contrast measurement can be performed by means of patterns of almost any shape. Finally, experimental measurements of the CTF of an optical system were made in good agreement with the theo- retical model. Juan Antonio Quiroga acknowledges the support of a postdoctoral grant of the Universidad Com- plutense de Madrid and the Becas Internacionales Flores-Valles program, Spain, and Centro de Inves- tigaciones en Óptica, León, México. Luis Miguel Sanchez-Brea acknowledges the support of a predoc- toral grant of the Ministerio de Educación y Cultura ~Intercambio de Personal Investigador entre Indus- trias y Centros Públicos de Investigación! with Ki- nossel S.L. This study was supported in part by Sainco Tráfico, S.A., in the framework of Proyecto de Estı́mulo a la Transferencia de Resultados de Investigación ~PETRI! program, Baliza Luminosa para el Guiado de Tráfico Vial con Tecnologı́a LED project of the Ministerio de Educación y Cultura. References 1. J. W. Coltman, “The specification of imaging properties by re- sponse to a sine wave input,” J. Opt. Soc. Am. 44, 468–471 ~1954!. . G. C. Holst, CCD Arrays, Cameras, and Displays ~Society for Photo-Optical Instrumentation Engineers, Bellingham, Wash., 1996!. . S. Lai and G. von Bally, “Fringe contrast evaluation by means of histograms,” in OPTIKA ’98: 5th Congress on Modern Optics, G. Ákos, G. Lupkovics, and P. András, eds., Proc. SPIE 3573, 384–387 ~1998!. . J. D. Gaskill, Linear Systems, Fourier Transforms, and Optics ~Wiley, New York, 1978!. . A. Papoulis, Probability, Random Variables, and Stochastic Processes ~McGraw-Hill, New York, 1965!. . B. R. Frieden, Probability, Statistical Optics, and Data Testing ~Springer-Verlag, Berlin, 1983!. . T. Coleman, M. A. Branch, and A. Grace, Optimization Toolbox for Use with MATLAB, users guide version 2 ~MathWorks, Natick, Mass., 1996!. . A. Garcia-Botella, L. M. Sanchez-Brea, D. Vazquez-Molini, and E. Bernabeu, “Modulation transfer function for translucent rough sheet,” Appl. Opt. 38, 5429–5432 ~1999!.