• No results found

Matlab Processing

In document Illuminating Latent Blood (Page 83-86)

3.2 Sensitivity Experiment

3.2.1 Matlab Processing

The RAW images were converted to tiff files for in Photoshop for processing in Matlab. Templates were then created to extract the blue and green pixels from a Bayer pattern. The region of interest, where the reaction occurs, was defined by a coordinated system of pixels. The blue pixel image is half the linear size of the original image and the green pixel image is the same size due to the representation of blue and green pixels in the camera sensor. Therefore the selected region for the green pixels was twice the size of the blue. An initial 3x3 median filter was applied to

84 the whole image as a way of reducing noise interference and smoothing the image. A set of images were then saved as ―un-averaged‖. A 15x15 area was then selected in the middle of the image as the middle of the image harbours the pixels pertaining to the reaction, due to experimental setup. Once the area of selection has been defined the green pixels were then selected. Missing green values are calculated using the median of the four neighbouring pixels. This is followed by a 3x3 median filter. The blue pixels were then selected. Geometric averaging was then performed to give a mean value of intensity over all the pixels in the selected 15x15 area. Another set of images were then saved as ―averaged‖. Geometric averaging was favoured over arithmetic averaging because geometric averaging is more suited to data which is not normally distributed. The 15x15 area contains pixels of vast varying intensities with potential to have skewed data. Therefore Geometric averaging was undertaken.

After processing the region of interest, part of the background was selected. Thresholds were then created to enable the noise within the image to be subtracted from the image of the reaction. Two thresholds were created for this purpose. The first threshold, thresholdflag 0, was defined as ((imgBspotmean-2x imgBspotstd) + (imgbkdmean+2x imgBbkgstd))/2; where imgBspotmean is the mean intensity of the selected area of the image, imgBspotstd is the standard deviation of the image intensity, imgbdkmean is the mean intensity of the selected area for the background and imgBbkgstd is the standard deviation of the background intensity for the selected area. However, if imgBspotmean- 2x imgBspotstd was less than imgBbkgmean + 2x imgBbkgstd then a second threshold imgBbkgmean +3x imgBbkgstd was utilised, threshold flag 1. The B in these formulas refers to the blue pixels. When the green pixels were analysed the B was replaced by G. Code was then used to identify the pixels above the thresholds and calculated the means, standard deviations and sizes of the image.

The Hemascein images were processed slightly differently. Initially, the field blank was geometrically averaged using and area of 151x151 to purposely blur the blank. The purpose of this was to reduce detail as only the distribution of light rather than a measure of intensity was needed. The blank was then divided by the intensity of the

85 pixel with the highest intensity in both directions to yield a ratio image of the blank with values from 0 to 1. Therefore, the brightest pixel in the image would be assigned the value 1 and the dimmest pixel would be assigned the value 0. The images of the reaction are then divided by this ratio image in an attempt to reduce the variation in light intensity from the polilight over the experimental area. The Hemascein images were then processed as the other images through Matlab, first obtaining ―un-averaged‖ images and then 15x15 geometrically averaged images. However, because the white cloth false positively fluoresced to a certain extent, the background selected needed for finding the threshold was part of the cloth known to not contain any blood rather, than the background which the cloth was fastened to.

For all of the reagents, the final intensity value obtained was therefore the geometrically averaged value minus the threshold value. This was a value assigned by Matlab in arbitrary units for the purpose of directly comparing the values obtained for each of the reagents.

The Grodsky, Bluestar Magnum and Lumiscene samples were all processed on the same day and in that order. For each reagent the positive control was processed, first followed by the negative control, then each dilution in triplicate from 1:1000 to 1:1,000,000. Due to changes in the formula, the Lumiscene ULTRA samples were processed at a later date. The Hemascene samples were also processed at a later date due to substrate difficulties. The white cotton/polyester fabric used with the other samples reagents produced a background fluorescence with the polilight that interfered with the hemascein reaction.

An attempt to use dark fabric as opposed to white fabric to eliminate this background interference was undertaken. However, the dark fabric, although made by the same manufacturer and with the same quantities of polyester and cotton, failed to absorb the blood significantly which lead to very weak reactions with hemascein. Further attempts to utilise the dark fabric for the experiment involved washing the sheets in a washing machine with Pyroneg detergent. However, even after a couple of washes, the porosity of the sheets were only very slightly improved and thus unable to be utilised for the experiment. The white sheets, although not

86 entirely satisfactory, were therefore used instead and care was taken to ensure the best possible results from this substrate.

In document Illuminating Latent Blood (Page 83-86)

Related documents