1 Introduction

Recently, functional imaging has made enormous progress due to the development of modern techniques allowing optical tracking of the cellular and network activity in vivo. Imaging techniques are variable and differ in their spatial and time resolution. One of the imaging techniques is optical imaging of the intrinsic signals (OIS) that favourably combines both—temporal and spatial signal resolution. In addition, this technique is non-invasive and cheap. Yet, one of the main limitations of the OIS imaging is its low signal to noise ratio (SNR) [14]. Conventional ‘background subtraction’ approach produces the OIS of poor quality, especially in case of the developing cortex. To improve the OIS detection, several techniques of analysis have been developed, including principal component analysis-based methods [5], indicator function [6] and truncated difference [7]. While the OIS imaging has been mainly developed for applications in adult brain, it is also successfully used in developmental studies including near-infrared spectroscopy imaging in human neonates [8]. More recently, the OIS has also been detected at the column level in the neonatal rat barrel cortex [9]. The aim of the present study was to optimize the OIS preprocessing through the application of the spatial and temporal digital filters on the acquired video data in order to achieve superior resolution of the OIS in the developing cortex.

2 Materials and Methods

2.1 Surgery

Wistar rats of both sexes from postnatal days [P] 5–25 were used. P0 was the day of birth. The surgery was performed at room temperature and under isoflurane anaesthesia (5 % for induction and 1.5 % during surgery). The skull of the animal was cleaned of skin and periosteum and was covered with dental cement (Grip Cement) except for a 4–9-mm2 window above the barrel cortex. The metal ring attached to the cement helmet was screwed to the ball joint in the stereotaxic apparatus. Subsequently, the animals were warmed and left for an hour to recover from anaesthesia, surrounded by a cotton nest and heated via a thermal pad (35–37 °C). All the recordings were made under urethane anaesthesia (by ip injection; 1 g/kg).

2.2 Optical Imaging of Intrinsic Signal

OIS was recorded using a video acquisition system (Fig. 2a). The camera was positioned orthogonally to the exposed skull above the estimated location of the somatosensory cortex [10] and was focused at 100–1200 μm below the skull which corresponded to the depth of L4 layer of the barrel cortex depending on animal age [11]. To achieve equal illumination, four red (630 nm, 3 W, Arlight, China) or green (525 nm, 3 W, Arlight, China) highlighting diodes were placed around the animal’s head. The reflected light was collected by the CCD camera (QICAM Fast 1394, 130 × 174 resolution, 1 pixel = 35 μm) via custom-made filter set (Rosco™ Roscolux and Supergel filter packs). During the preprocessing, the recorded video was downsampled to 10 Hz. In order to improve the OIS detectability, we have applied a series of digital filters. To evaluate the quantitative performance of the filtering on the OIS, the value of its SNR was calculated throughout the processing. Because of two types of the applied filtering, the SNR was calculated independently:

  1. 1.

    sSNR = 20*log10(OIS amplitude/std in the reference region)

  2. 2.

    tSNR = 20*log10(OIS amplitude/std during the baseline period)

where sSNR indicated spatial SNR of the OIS, normalized to the standard deviation (std) of noise within the reference region (Fig. 2b), whereas tSNR corresponds to the temporal SNR of the OIS with respect to the standard deviation calculated during the 5 s baseline period. It is noteworthy that only pixels in the operator-defined region of interest were analysed during the processing.

The preprocessing was followed by the OIS detection when an averaged intra-stimulus video frame F 1 was compared to an averaged prestimulus video frame F 0 [12, 13] using the equation: OIS = (F 1 − F 0)/F 0 followed by detection of the areas on the recorded cortical area with the most intense drop in light reflectance. Detection of OIS was performed by manual masking by the operator of the area with drop of light intensity, followed by the automated estimation of the OIS size through calculation of the angular averaged intensity around the centre of the user-defined OIS region; all values exceeded the significance level of 3 std of noise taken from reference region were considered as the OIS and served for calculation of the size of the OIS. Group measures are expressed as means ± std. The statistical significance of differences was assessed with the paired Wilcoxon’s signed rank test. The level of significance was set at p < 0.05 for *, p < 0.01 for ** and p < 0.005 for ***.

3 Results and Discussion

3.1 Video Preprocessing Improves OIS

OIS is characterized by changes in reflected light intensity reaching 0.1–6 % in amplitude in adult animals [14]. Fast variations in the pixel intensity produced by the camera noise result in a random salt-and-pepper-like pattern on the video frames that strongly affects the OIS (Fig. 2b). Low-pass filters with common kernels (Gaussian, rectangular and disk) as well as median filter were tested with the aim to improve OIS. Comparison of the OIS’s sSNRs calculated on the data processed by the mentioned above filters showed absence of the significant difference. However, filters with Gaussian and rectangular kernels of 1 px radius demonstrated the maximal increase of the OIS’s sSNR (10.8 ± 3.5 and 10.6 ± 3.6 dB, respectively, n = 46, P5-25 rat pups, Fig. 1a). However, in contrast to the Gaussian filter, rectangular average filter is characterized by long-lasting high-frequency residuals and by the bands of ‘ghosts’ near sharp edges, so-called ringing artefacts, that could bias the data; thus, Gaussian filter was chosen for the further processing. The optimal size of the Gaussian kernel was estimated to satisfy two principal criteria: significant increase of sSNR and minimal modification of OIS size. Nevertheless, that OIS areas defined automatically and by the operator were significantly different, and the size of the OIS detected automatically on filtered data using Gaussian filtering with kernel radius of 1 px had the minimal difference with the size of the OIS defined manually (450 ± 100 and 500 ± 100 μm, respectively, Fig. 1b). Further increase of the sigma size resulted in overestimation of the OIS (n = 46, P5-P25 rat pups); thus, followed analysis was done using kernel radius of 1 px.

Fig. 1
figure 1

Comparison of the low-pass filter’s efficiency on the OIS characteristics. a Increase of the OIS’s spatial SNR using low-pass filters with common kernels (Gaussian (green), rectangular (blue) and disk (light blue)) as well as median filter (red). b Changes of the automatically estimated diameter of the filtered OIS versus sigma size of Gaussian low-pass filter. Black markers correspond to the averaged data, std is shown by whiskers. Age of the animal is colour coded. The size of the operator-defined region of OIS is shown by the empty marker. Note, that estimated sizes of OIS filtered with 1 px are the closest to the sizes defined by the operator. c Changes of the temporal SNR using low-pass filters (Butterworth (light blue), LOWESS (red), moving averages (green) and Savitzky-Golay with polynomial degree 2 (blue)) with 1 s window size. d Spectral profiles of the non-filtered (black) and filtered signal (filters are colour coded as on 2C), vertical red line represents a common low-pass frequency cutoff. Pooled data from 46 P5-P25 rat pups

Comparison of the dependencies of sSNR on the sigma size between different age groups did not show any developmental changes (Fig. 2d); thus, all the ages were combined in one group.

Fig. 2
figure 2

Optical intrinsic signals registration in the developing rat somatosensory cortex. a the OIS recordings setup; the OIS evoked by simultaneous mechanical stimulation of whiskers A1 and D2 in the barrel cortex of P6 rat pup was calculated from raw (b) and spatially filtered (c) video data. Note that the OIS is characterized by a drop in the reflected light intensity (the darkest regions); d spatial SNR dependence on sigma in pixels which represent Gaussian kernel size; temporal profile of the OIS before (e) and after the adaptive illumination correction (f); g variations the OIS’s standard deviations with and without simple and adaptive illumination corrections; h results of temporal low-pass filtering on the video data shown on 2F; and j dependence of the tSNR on the window size of low-pass LOWESS filter. Note that grey lines correspond to different trials, whereas the red line represents averaged trial (e, f, h). Pooled data from 46 P5-P25 rat pups for the temporal and spatial filtering analysis and N = 29 P5-25 rat pups for the illumination correction analysis

Using Gaussian filtering with 1 px sigma size resulted in the increase of the sSNR to 10.6 ± 3.6 dB, whereas non-filtered sSNR was significantly lower (6.1 ± 3.4 dB, Fig. 2d, n = 46 P5-25 rat pups). The studies of the hemovascular response requires use of the green illumination as well as the red one. Thus, the efficiency of the digital filtering on the OIS detectability was also tested in the data acquired using green illumination (525 nm). Application of spatial filtering described above resulted in the significant increase of the sSNR (from 7.5 ± 3.6 dB to 9.2 ± 3.7, N = 10, P5-P25).

To remove slow spatial fluctuations associated with the camera or animal movements, breathing and heart beating, the video stabilization based on the phase-based motion alteration approach was applied [15]. Subsequently, temporal filtering was performed. The major source of temporal artefacts was the illumination instability (Fig. 2e). The illumination correction allowed removing those artefacts by per-pixel subtraction of an illumination pattern, which was calculated as an averaged time dependency of the whole-frame intensity. However, better results were achieved with adaptive light correction—by subtraction of the weighted illumination pattern calculated for each pixel. Comparison of the efficiencies of the illumination correction showed that a simple correction reduced deviation between OIS amplitudes of different trials fourfold, whereas the adaptive correction—tenfold comparing to the raw trials (raw OIS standard deviation was 0.72 ± 0.55 %; simple illumination correction decreased OIS standard deviation to 0.18 ± 0.13 %, whereas use of the adaptive illumination correction resulted in a significant drop of the OIS standard deviation to 0.06 ± 0.03 %; Fig. 2f, g, n = 29 P5-25 rat pups). Fast-oscillating temporal artefacts associated mainly with the camera noise were removed using low-pass filtering. Results of filter comparison (low-pass 1-order Butterworth, LOWESS and Savitzky-Golay with polynomial degree 2 and moving average) showed that all filters significantly increased tSNR of the OIS, though moving average and LOWESS filters had better results of the tSNR (23 ± 4 and 22 ± 4 dB, respectively, Fig. 1c). While moving average filter with the window size of 1 s altered informative region of OIS spectrum (Fig. 1d), meaning modification of the time profile of the OIS after filtration, application of LOWESS filter produced significant increase of the tSNR of 40 % (22 ± 4 dB for filtered and 16 ± 4 dB for raw data, n = 46 P5-25 rat pups).

4 Conclusion

In our study, we demonstrate that post hoc application of the digital filters significantly improves the OIS quality in the developing rat somatosensory system. We provide parameters of the low-pass spatial and temporal filters minimally affect the OIS characteristics, while strongly improve its detectability and analysis.