fig1 shows an mr - compatible camera 108 embedded into a head coil 104 of the mri system . the mri system is equipped with an optical source 106 , which provides light 110 to illuminate a patch of skin 112 on the forehead of a subject 102 , who is lying on the patient table and undergoing an mri examination . alternatively , 106 can be a camera that includes an optical source for illumination . fig2 shows how cardiac and respiratory information can be computed from video data to produce the results shown here . the same video stream is used to generate both cardiac and respiratory signals from the same data . in this example , the starting point 202 is video that is acquired at a rate of 30 frames / second . sampling may be faster or slower than this ; however , we have generally found 30 hz to be sufficient for this application . to compute the cardiac signal , the mean pixel intensity 204 is taken over the entire image , or over subsections of the image , for each frame . this signal is then filtered using a bandpass filter 206 with passband between 0 . 6 hz and 10 hz to provide cardiac data 208 . to compute the respiratory signal , motion of the image in the head - feet direction is calculated using 1d sub - pixel image registration 210 . this provides an effective means to capture the slight ‘ nodding ’ motion that accompanies respiration . the signal is then filtered using a bandpass filter 212 with passband from 0 . 2 hz to 0 . 6 hz to provide respiratory data 214 . fig3 provides further details relating to the computation of the respiratory signal . the 1d motion module 210 shown in fig2 performs image registration using a sub - pixel implementation of the phase correlation method . fig3 is a block diagram of this method . as in the pixel intensity module , each frame is initially cropped to a 360 × 360 square , removing the stationary head coil , which would otherwise be a confounding factor in the motion calculation . the first frame in the video sequence is used as a reference frame 306 . each of following frames 302 in the video are compared to this reference frame to compute the relative displacement in the image x - and y - directions . this is achieved by applying the inverse fft to both the reference and ith cropped frames ( 308 and 304 respectively ) and computing the phase difference in the fourier domain 310 . this phase difference is a 2d ramp with a gradient proportional to the displacement between the two frames . this gradient , and hence the displacement , is found using the sub - pixel phase correlation method 312 , described in more detail by maclaren et al . in “ mri with trellis , a novel approach to motion correction ” ( magnetic resonance imaging v26 ( 2008 ) pp . 474 - 483 ), hereby incorporated by reference in its entirety , to provide output x and y shifts 314 . the shift in the image x - direction ( patient left - right ) is discarded and only the shift in the image y - direction ( patient head - feet , also referred to as the longitudinal direction ) is used for further processing . fig4 a shows a plot comparing the cardiac signal calculated from the video data , using the methods described here , and the signal obtained simultaneously from a subject using a pulse oximeter . in this experiment , we began imaging with the mri scanner after 30 s and stopped imaging with the mri scanner after 60 s . this period is marked on the graph . no change in the calculated cardiac signal over this time period is visible , indicating that scanning had no significant effect on the camera . pulsations measured with both systems coincide , which indicates that the signal obtained from the video - processing algorithm is genuinely related to cardiac pulsation . a good match to the pulse oximeter data is apparent for the video intensity signal in terms of the timing and magnitude of peaks . to provide a better comparison of the potential usefulness of the cardiac signals for cardiac gating , a simple algorithm was applied in order to check for consistency of the time period between detected pulses ( equivalent to the rr interval in ecg ). trigger locations were found for each curve based on two parameters : a threshold , set arbitrarily to 0 . 6 ( where the signals are normalized to have a peak value of 1 ), and a minimum interval time , set here to be 300 ms . trigger locations were then defined as any time point more than 300 ms since the previous trigger , where the signal crossed the 0 . 6 threshold and had positive gradient . these trigger locations were then used to calculate the trigger - trigger interval time . trigger locations , computed as described above , match well between the reference pulse oximeter data and the video intensity signal . fig4 b shows a zoomed - in subset of trigger locations ( marked as black dots ) from the central 30 s period in fig4 a . although synchronization between the two signals was not perfect in our setup , there is a clear one - to - one mapping between triggers derived from the two signals . that is , every trigger detected in the pulse oximeter data stream was also detected in the video intensity signal and there were no extra triggers detected in the video intensity signal that were not detected in the pulse oximeter signal . this one - to - one mapping makes it possible to compare the time interval between triggers , as shown on fig4 c . the changing time interval is highly correlated : the difference between trigger intervals from the pulse oximeter and the video intensity signal has a mean of & lt ; 0 . 01 s and standard deviation of 0 . 05 s , meaning that most trigger intervals computed from the two signals are within 50 ms of each other . fig5 compares respiratory data from the respiratory belt to the video - derived intensity and motion signals . in this case , there is no evidence that the intensity based signal correlates with the signal from the respiratory belt . however , motion based data correlates strongly . in some cases the respiratory belt signal appears to have saturated , but the video motion signal does not , perhaps indicating further motion past the maximum range of the respiratory belt . again , mr imaging appears to have no effect on the acquired physiological data . in summary , the signal from the respiratory belt coincides well with the results computed from the video motion signal , indicating that the computed signal is indeed due to respiration of the subject . fig6 shows how different parts of the image can have substantially different video intensity signals . for example , the mri head coil 602 provides no cardiac signal 610 , while parts of the image showing the skin of the patient 604 can provide a strong signal 606 or a weak signal 608 depending on details of the configuration . for some regions the cardiac signal is particularly strong ; for others ( such as regions containing little skin ), it is virtually non - existent . this spatial information can be fed back and used to enhance the image with a colored overlay . previous work , unrelated to mri , has shown that it is possible to augment video data to make subtle intensity changes visible to the naked eye . using a similar method , we augmented the video data acquired for this work using the video - derived cardiac signal and the following algorithm . rather than cropping the video frames to a square and processing all pixels in that square together , frames are divided into an m - by - n grid . processing is applied to all pixels in each grid square separately to extract the video - derived cardiac signal for each m , n . this m - by - n signal is then resampled using bicubic interpolation to the original video resolution and used to generate a ‘ modulation video ’. the modulation video is superimposed onto the red channel of the otherwise grayscale images . cardiac pulsation can then be easily seen as a red tone overlaid on the original video . depending on the values selected for m and n , spatial discrimination can be traded for robustness and snr of the signal . in summary , our data indicate that the methods taught here enable one to obtain similar information to the pulse oximeter and respiratory belt without physical contact to the subject . finger - mounted pulse oximetry has existed since the 1930s and the use of both the pulse oximeter and respiratory belt has been common in clinical mri since its inception . here we show that camera hardware can be used for physiological monitoring purposes , potentially eliminating the need to use devices that physically contact the patient . we have not thoroughly quantified the algorithm &# 39 ; s robustness to large - scale head motion . in the data shown , the maximum image displacement from the initial position was 16 pixels ( approximately 3 mm ), indicating that the subject did not remain perfectly still during the experiment . some motion robustness can therefore be assumed . however , multiple cameras could perhaps be used in order to ensure that a sufficiently large region of skin remains in the camera field of view at all times . motion sensitivity is a challenge shared by pulse oximetry , so our method may in fact be more robust than the state of the art . the algorithms described in this work do not require color information in the video signal . this enables the methods taught here to be applicable to both monochrome and color image sensors . illumination ( here a white led ) is clearly necessary , as previous attempts at photoplethysmography using ambient light have been in a well - lit environment , which is not representative of the bore of an mri scanner .
devices and methods to measure and visualize the cardiac and respiratory signal of a human or animal subject during a magnetic resonance imaging exam are described . this includes a video camera compatible with the mri scanner , a means of transferring the video data away from the mri scanner , a light source that illuminates the subject , and an algorithm that analyses the video stream and uses small image intensity changes and motion information to extract cardiac signal and respiratory signals of the subject . these methods make it practical to use optical tracking to monitor and correct for cardiac and respiratory motion during mri , as well as provide basic patient monitoring with no physical contact to the subject .