1 Introduction

Dynamic laser speckle (DLS) has been used in many applications in medicine and agriculture. This non-invasive optical technique, through the temporal variation of the speckle pattern, evaluates the activity of cells, bacteria, and other biological fluids [1,2,3,4].

The influence of the relationship between the size of the speckle and the size of the pixel is an important aspect that must be considered in all these applications. It was verified that the signal obtained by this technique varies in frequency composition regarding the biological activity. Despite considering the well-known Nyquist theorem (sampling frequency) during the assembling of the signal, it is not enough since the configuration of the optical camera with its attached photographic objective and its numerical aperture (f-number) must also be guaranteed according to the frequency response [5].

Another important aspect is the stability of the laser illumination when using laser diodes or a He–Ne laser to ensure that the speckled grains fluctuate only due to biological changes and not because of changes in illumination. The experimental results show that the stability of the diode laser is greater than that of the He–Ne laser in all cases, breaking the paradigm of the stability of He–Ne devices [6].

Thus, it is necessary to analyze the effect of technical parameters that affect the perceived illumination level. In this sense, we studied the effect of sampling rate and, consequently, the time of exposure in a dynamic laser speckle analysis considering the absolute value of the differences index, the temporal speckle standard deviation index, and the temporal speckle mean index [7,8,9].

Knowing the effect of sampling rate over an index value, a researcher will be able to establish criteria to choose the appropriate sampling rate for a specific monitored phenomenon [10,11,12].

For this purpose, we show that, given a dynamic speckle test, there is an appropriate frequency band (frequency range in which all the waves that compose the analyzed signal are contained) to the sampling rate. High sampling rate values may cause unintended consequences on the index value, such as the decrease of the excursion between two activity levels, given a determinate index value and illumination level. In turn, decreasing the sampling rate promoted by increasing the time of exposure will cause a reduction of the temporal speckle contrast and, consequently, limit the possibility of obtaining information from the sample.

To demonstrate the existence of this appropriate frequency band, we performed two types of tests; in the first, we analyzed an ink drying process over time; in the second, we tested the activity state of a corn seed with three days of germination. In both cases, we used four different sampling rates and compared the behavior of speckle indexes.

The next section describes how the speckle images were acquired and the setup used to analyze them. All theoretical definitions necessary to understand the analysis are presented in Sect. 3. The numerical results of the analysis are presented in Sect. 4, and an analysis of the results in Sect. 5. Finally, we present our conclusion in Sect. 6.

2 System description

2.1 Time of exposure of the camera

The sampling rate (Fs) or acquisition time in frames per second (fps), using the camera Marlin F-033, is obtained according to Table 1, where we can see the four sampling frequencies used in the tests.

Table 1 Time of exposure and sampling rate

These values were obtained using the camera parameters: the shutter register value (Shutter), the time base register value (Base), the offset time of exposure (Offset), and the effective time of exposure (E). These registers are numbers in the memory of the camera that in combination help us to configure many values of exposure times. So that, the shutter and base are multiplier, and the offset correspond to the hardware delay in the execution of operations. Thus, the time of exposure (Exposure),

$${\text{Exposure}} = {\text{Shutter}} \times {\text{Base,}}$$
(1)
$$\frac{1}{{F_{{\text{s}}} }} = E = \;{\text{Exposure}} + {\text{Offset,}}$$
(2)

where Fs is calculated in relation to E, considering that the Exposure represents the photography integration time and E the effective time between photographs, the difference between these two exposures arises from the Offset time, i.e., the time between the end and the beginning of a photograph. In all cases, the time of exposure is much longer than the Offset; therefore, we can approximate that Fs 1/Exposure.

2.2 Ink drying process data

The data set came from an ink drying process, where a group of N images of same size is stacked forming, what we call, data package at times {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10} min. Thus, at each time, a data package has N = 512 images of 147 pixels of height and 166 pixels of width. Four different sampling rates were used to take the images, using the rates 15, 30, 45, and 60 Hz.

2.3 Data package of the corn seed germination

This data package has the speckle pattern of a corn seed with three days of germination, where four data packages with different sampling rates (15, 30, 45, and 60 Hz) were built. Each package has 512 images of 15 pixels of height and 15 pixels of width.

2.4 Test 1: ink drying process

Figure 1 represents the data analysis method in an ink drying process to an Fs sampling rate. Where P(t) is a data package with images at t minutes, this package has N images with M pixels each. Pn,m(t) defines the n-th image and m-th pixel considering 1 ≤ n ≤ N, 1 ≤ m ≤ M.

Fig. 1
figure 1

Data analysis of the ink drying process test

The MEAN block represents the calculation of the temporal speckle mean index on the package P(t), giving the value MEAN(t). The AVD block represents the calculation of the absolute values of the differences index on the package P(t), giving the value AVD(t). The STD block represents the calculation of the temporal speckle standard deviation index on the package P(t) or Q(t), giving the value STD(t) or STDF(t), respectively. And finally, the block HPF represents a digital finite impulse response "high-pass filter" with order 40 and cut-off at 0.25Fs, calculated by the P (t) package and return Q(t), leading to the STD block and the STDF(t) index value. According to the information in the data packages, we will have speckle indexes values for each minute for 10 min.

2.5 Test 2: Corn seed germination

The speckle activity of a corn seed was analyzed similarly to the ink drying, seen in Sect. 2.4, with the difference that only one data package was considered at time t, equal to three days of germination.

2.6 Test 3: Frequency band activity analysis

Figure 2 represents the frequency band analysis method of data package P, acquired with a sampling rate of Fs. This package is the input of many band-pass filter (BPF) blocks, described in Sect. 3.5. These band-pass filter blocks have cut-off frequencies between f1(l) and f2(l), where l indicates the current band, so that 1 ≤ l ≤ L; with L as the total number of analysis frequency bands. Thus, we obtained the Rl package (a filtered version of P). Rl was processed by a σ block, where the standard speckle value is calculated for each pixel in the package Rl, as described in Sect. 3.3. Finally, an image is obtained, named variable STDBl.

Fig. 2
figure 2

Frequency band analysis of a data package

3 Theoretical definitions

In the following subsections, we use the variable P to define P(t) at any time t; thus, P represents a data collection of images at any time.

3.1 MEAN index

The temporal speckle mean index (µm) [8] gives the mean value of the illumination level to the m-th pixel in the package P, implemented as presented in Eq. 3, where N is the number of images in the package

$$\mu_{m} = \mathop \sum \limits_{n = 1}^{N} \frac{{P_{n,m} }}{N}.$$
(3)

Finally, the MEAN (t) index is the spatial mean value of all µm results, as demonstrated in Eq. 4,

$${\text{MEAN}}\left( t \right) = \mathop \sum \limits_{m = 1}^{M} \frac{{\mu_{m} }}{M}.$$
(4)

3.2 AVD index

The Absolute Values of the Differences (AVDm) [6, 7] gives the mean value of the absolute differences in the illumination level of the m-th pixel in the package P, implemented by Eq. 5,

$${\text{AVD}}_{m} = \mathop \sum \limits_{n = 2}^{N} \frac{{\left| {P_{n,m} } \right. - \left. {P_{n - 1,m} } \right|}}{N}.$$
(5)

Finally, the AVD(t) index is the spatial mean value of all AVDm results, as indicated in Eq. 6,

$${\text{AVD}}\left( t \right) = \mathop \sum \limits_{m = 1}^{M} \frac{{AVD_{m} }}{M}.$$
(6)

3.3 STD index

The temporal speckle standard deviation index (σm) [8] gives the standard deviation value of the illumination level to the m-th pixel in the package P, implemented with Eq. 7,

$$\sigma_{m}^{2} = \mathop \sum \limits_{n = 1}^{N} \frac{{\left( {P_{n,m} - \mu_{m} } \right)^{2} }}{N}.$$
(7)

Finally, the STD(t) index is the spatial mean value of all σm results, as presented in Eq. 8,

$${\text{STD}}\left( t \right) = \mathop \sum \limits_{m = 1}^{M} \frac{{\mu_{m} }}{M}.$$
(8)

3.4 HPF block

The high-pass filter (HPF) block was implemented (Fig. 1) with a finite impulse response (FIR) [13] filter of order 40 and cut-off at 0.25Fs. The 41 values in the filter are represented with h(i) for all 0 ≤ i ≤ 40, with zero in other cases. Thus, a data package P as input of the HPF block gives us a data package Q as a result, as indicated in Eq. 9,

$$Q_{n,m} = \mathop \sum \limits_{k = 1}^{N} P_{k,m} h\left( {n - k + 20} \right).$$
(9)

3.5 BPF block

The band-pass filter (BPF) block is implemented (Fig. 2) similarly to the. HPF block, with an FIR filter of order 40 but with a cut-off in f1(l) and f2(l),

$$\left| {f_{1} \left( l \right),f_{2} \left( l \right)} \right| = \left[ {\frac{{\left( {l - 1} \right)}}{L},\left. \frac{l}{L} \right]} \right.\frac{{F_{{\text{s}}} }}{2}.$$
(10)

representing l, for all 1 ≤ l ≤ L, the l-th band of L bands; each band has FS/2L Hz. The filter is represented with g(i) for all 0 ≤ i ≤ 40, with zero in other cases. Thus, a data package P as input of the BPF block gives us a data package R as a result, as indicated in Eq. 11,

$$R_{n,m} = \mathop \sum \limits_{k = 1}^{N} P_{k,m} g\left( {n - k + 20} \right).$$
(11)

4 Numerical results

4.1 Test 1: ink drying process

This test shows the analysis result of an ink drying process for 10 min, using the sampling rates: 15, 30, 45, and 60 Hz.

Figure 3 presents the MEAN (t) index in the test shown in Sect. 2.4 for each time t for the four sampling rates. It can be seen that the value of the index has a monotonous behavior over time. On the other hand, the values in the curves decrease in proportion to the growing sampling rate.

Fig. 3
figure 3

MEAN index value

Figure 4 shows the analysis result explained in Sect. 2.4 regarding the AVD(t) index. Figure 4a shows the AVD(t) index, in each time t, of four sampling rates, showing a different behavior in time of each sampling rate so that the value of the index in all curves decreases in proportion with the increase in the sampling rate. On the other hand, Fig. 4b shows a normalized version of the AVD(t) index so that the maximum value of curves has a unit value; thus, the maximum excursion of the curve is most significant when the sampling rate decreases. It is worth noting that this index uses information from a frequency band between Fs/4 and Fs/2 Hz [7].

Fig. 4
figure 4

AVD index analysis

Figure 5 presents the STD(t) index in the test presented in Sect. 2.4. Figure 5a shows the behavior of the STD(t) index, in each time t, for four different sampling rates. This index uses information in the entire frequency band (0 until Fs/2 Hz), as seen in Sect. 3.3. It shows different behavior in time to each sampling rate so that the value of the index in each time decreases in proportion to the increase in sampling rate. On the other hand, Fig. 5b shows a normalized version of the STD(t) index, with the unit as the maximum value of curves. Therefore, it can be seen that there is a slight difference between the maximum excursions of the curves with different sampling rates. Despite this, it is possible to observe a slight decrease in the maximum excursion in the curve with the increase in the sampling rate, unlike the AVD(t) index.

Fig. 5
figure 5

STD index analysis

Figure 6 presents the STDF(t) index in the test presented in Sect. 2.4. Figure 6a shows the behavior of the STDF(t) index, in each time t, for four different sampling rates. This index uses filtered information from the data pack so that the frequency band is between Fs/4 and Fs/2 Hz. It shows monotone decreasing behavior in time, with a different behavior in time to each different sampling rate so that the value of the index at each time decreases in proportion to the increase in sampling rate. In contrast, Fig. 6b shows a normalized version of the STDF(t) index with the unit as the maximum value of the curves. Therefore, there is a considerable difference between the maximum excursion of the curves using the sampling rate, allowing us to observe a rise in the maximum excursion when the sampling rate decrease, like the AVD(t) index.

Fig. 6
figure 6

STDF index analysis

4.2 Test 2: corn seed germination

This test shows the result of the analysis of a corn seed at 3 days of germination. The images were taken using the sampling rates 15, 30, 45, and 60 Hz.

Figure 7 shows the MEAN(t) index with the mean value of illumination (from 0 to 255) in the pixels, this value decreases when the sampling rate increases, where the index value reached 20.1% of its value from 15 to 60 Hz.

Fig. 7
figure 7

MEAN index value in the germinated corn seed

Figure 8 shows the AVD(t), STD(t), and STDF(t) indexes with the same behavior presented by the MEAN index. The decrease in the activity observed is related to the increase of Fs where STD, AVD, and STDF presented decreasing values of 22.2%, 19.3%, and 20.4%, respectively.

Fig. 8
figure 8

AVD(t), STD(t), and STDF(t) index values in the germinated corn seed

4.3 Test 3: frequency band activity analysis

Table 2 shows the STDBl image in different frequency bands of the corn seed, using four different sampling rates of 15, 30, 45, and 60 Hz, as indicated in the first column.

Table 2 Frequency band analysis

The other columns show the results of eight frequency bands of package P, represented in the first line of the Table, where l indicates the position of the frequency band in crescent order, relative to its frequency components, with limits assigned at the frequencies of 0, 3.75, 7.5, 11.25, 15, 18.75, 22.5, 26.25, and 30 Hz, so that the frequency band to l = 1 is {0, 3.75} Hz, to l = 2 is {3.75, 7.5} Hz and so on, as can be seen in the second line of Table 2. These frequency bands are subordinated to the rates (sampling frequencies) Fs: 15, 30, 45, and 60 Hz, seen in the column 1 (Table 2). The package sampled at 15 Hz was divided into L = 2 frequency bands, the package sampled at 30 Hz was divided into L = 4 frequency bands, the package sampled at 45 Hz into L = 6 frequency bands, and the package sampled at 60 Hz into L = 8 frequency bands.

The matrices STDBl are represented using a color palette from dark blue (low values) to dark red (high values), linked to the activity values. As shown, the index values decrease with the increase of sampling rate Fs. The index values also decrease with the increase of the position of the frequency band between 0 Hz and 3.75, with a sampling rate of 15 Hz, the better analysis case: in the sense of better differentiating places of lower and higher index value.

5 Discussion

Figures 3 and 7 show a relationship between the profile of the mean index curve and the sampling rate of the data pack. The temporal speckle mean index (Fig. 3) is related to the observed illumination level on the surface of the material [8] and corresponds to the analysis of zero frequency components of the signal. Thus, we can conclude that the level of illumination perceived by the camera decreases with the sampling rate increment. This occurs due to the modification of the time of exposure with the alteration of sampling frequency to commercial cameras so that less lighting is used to take the picture. Consequently, the value of the temporal speckle mean index decreases. In this sense, it is important to choose a sampling rate that gives us an index value superior to the noise level of the test or the quantization level of the camera.

The modification of the time of exposure also affects and limits other indexes. We can see this interference in Figs. 4, 5, 6, and 8, where the values of the AVD(t), STD(t), and STDF(t) indexes decrease according to the decrease in time of exposure. Another way the sampling rate affects the values of indexes is in the limitation of the frequency band of an analyzed signal. For example, a sampling rate Fs, by the Nyquist theorem [14, 15], causes the limitation of the frequency band between 0 and Fs/2 Hz. Thus, we have an index, such as the STD(t), that uses information between [0, Fs/2] Hz, while other indexes, such as the AVD(t) and STDF(t), that use the information of a half frequency band, between [Fs/4, Fs/2] Hz. In the comparison between STD(t) vs {STDF(t) and AVD(t)}, we can see how the use of half of a frequency band causes the decrease in the values of the curves but give us considerably good values in the maximum excursion of the curve over time. In contrast, using a complete frequency band in the ink drying process (STD(t) index) returns low values of maximum excursion in the curves over time. The importance of excursion in this test is due to significant differences between the values of two states during the drying process.

It is necessary to highlight the importance of choosing the best value of sampling rate Fs; so that the frequency band of a signal contains the frequency components with the information necessary to analyze the data. Therefore, the index values have the greatest figures and a good excursion compared with an inert part of the sample. For example, in Table 2, a corn seed is analyzed, where we can see the significant index values obtained from 0 to 7.5 Hz when Fs = 15 Hz.

Thus, at this point, a question is evident: What is the best frequency band? According to the corn seed test, the best range for all frequency bands is the one with the components with the lowest frequencies. However, we must consider that this index extracts information from inner parts of material [8], and this information decreases along with the decrease in a frequency band, given an STD(t) analysis. This is demonstrated when comparing the result in the excursion of STD(t) with components in low frequencies and the excursion of {STDF(t) and AVD(t)} with components in high frequencies. Therefore, we must compromise between the desired quantity of inner information in the sample, the perceived illumination level, and the sampling rate.

Dynamic laser speckle (or biospeckle laser) is a feasible and a reliable alternative to analyze phenomena that produce tiny changes in time. However, that property brings the need to guarantee the ideal adjustment of the experimental configuration of the image acquiring. The sampling rate is one of the features that the users must be alert with, to obtain the best assembling possible of the interferometric patterns in time. The complexity of the signal (images in time) requires more than just collect the images expecting to provide corrections in the step of images processing.

6 Conclusion

This work compared three dynamic laser speckle indexes, subject to different sampling rate values. We conclude that it is essential to choose an appropriate sampling rate, recommending the minimal sampling rate possible to obtain an acceptable maximum excursion for indexed, such as the AVD and STDF, and an illumination level in the images with a good signal–noise ratio so that the phenomenon under study can be collected in the chosen analysis frequency band. We showed that the digitization of a speckle signal implies a restriction of the signal's frequency band, and, consequently, this affects the result of a speckle analysis. Additionally, the digital camera user must be aware that the increase in the frame rate (fps) forces commercial cameras to change the perceived illumination level in the camera sensor.