Image analysis as tool in fast stability screening of solid dispersions

: Polarized light microscopy (PLM) is due to its high spatial resolution, low equipment price and ability for fast sample evaluation a useful tool in the research related to pharmaceutical solid dosage forms. However, PLM is often used on a qualitative basis. The present study uses in-house Matlab scripts in analyzing images obtained from PLM. The extent of drug crystallization in solid dispersion is quantitatively estimated. A theoretical background on image preprocessing prior to analysis is described covering image gray scaling, binarization, dilation, erosion and artifact removal. The established image analysis method was utilized in a case study indicating the importance of solvent evaporation rate on piroxicam stability in PVP matrix.


Introduction
Imaging of pharmaceuticals can be a key tool in building the desired functionality based on a Quality by Design dosage form investigation. Within solid dosage forms, techniques such as visible-, Raman-, IR-, NIR-, THz-based imaging, electron microscopy (SEM/TEM), magnetic resonance imaging (MRI) and time-of-flight secondary ion microscopy (TOF-SIMS) analysis are often utilized in order to fully understand the physicochemical properties, morphology and related material characteristics of a given sample.Compared with the above mentioned sophisticated imaging techniques, light microscope is still a competitor due to the combination of ease in use, high spatial resolution, low equipment price and ability for fast sample evaluation.
In the research related to pharmaceutical solid dosage forms, light microscope has been widely utilized e.g. for characterizing amorphous drug crystallization under the influence of different polymers [1] and understanding crystal dehydration phenomena [2].A recent study from Eerdenbrugh and Taylor used polarized light microscopy (PLM) for qualitative stability ranking of different solid dispersions [3].Despite the extensive use of the light microscope, images are often interpreted on a subjective basis and this, combined with the qualitative analysis, limits the full exploitation of potentials in light microscopy.
The present work illustrates the ability of PLM for quantitative estimation of the extent of drug crystallization using automated spot counting and percentage area coverage estimation.We report on an investigation of physical drug stability in solid dispersion systems produced by solvent evaporation.To this end the basic theoretical background on binary image processing is given, followed by an example of its practical application.

Theoretical background
The visible electromagnetic spectrum comprises of wavelengths between 430-790 nm [4].All colors perceive by the human eye can be represented by a combination of three primary colors: red, green and blue.Mathematically, a color image consists of a data c ube (three dimensional array) consisting of three separate matrices of equal sizes (x-direction pixels by y-direction pixels) D re d , D green and D blue .Elements within each of these matrices code for the intensity of that particular color channel.The elements within each of the above mentioned matrices typically span a numerical scale ranging from 0 to 255 (so-called 8 bit resolution), code for absence and maximum intensity of any particular primary color.All colors can thus be expressed mathematically as a vector: where r, g, b, are the red, green and blue intensities spanning a three dimensional Cartesian coordinate system, and i, j and k are the coefficients.Black and white are vector r(0,0,0) and r(255,255,255) respectively, spanning the maximum distance across the three dimensional Cartesian coordinate system.From the perspective of analyzing images obtained by polarized light microscope, where the background is usually black with white spots formed by the crystallization of the drug, this large distance is an advantage creating a high contrast.This makes the application of a threshold to separate the objects of interest from the background relatively easy.
There are many alternative ways to perform image a nalysis; the method pursued here is to convert the PLM color images into a binary matrix, where the elements in the matrix are logical values consisting of only zeros and ones.In the following discussion, value 0 and 1 are considered to represent black and white respectively.Gray scaling can be a useful intermediate step prior to estimation of the binary image matrix.In this intermediate step, the dimensions are reduced from a three dimensional array to a two dimensional matrix, where the pixel values ra nge from 0 to 255.There are two ways to gray scale PLM color images.First, since the background is black and objects are white, gray scaling can simply be performed by selecting only one of the three color channels.A more general way to gray scale is to calculate the monochrome luminescence according to the National Television Systems Committee standard by combining the three color channels [5]: where D gray is the resulting gray scaled image matrix, and the coefficients are related to the human eye's sensitivity.After gray scaling, a binary image can be created by applying a threshold, where elements below and above the threshold value are set to zeros and ones respectively.
Often it is of interest to estimate the number of objects in an image e.g. the number of crystalline spots in a solid dispersion sample; this parameter is closely related to the nucleation rate.Similarly, the percentage area covered by the spots in the image indicates the crystal growth rate.In order to perform spot counting, a definition of the concept object in a binary image is necessary.An object consists of all the pixels that are connected to each other.For a binary two dimensional image, two types of connectivity can be defined, so-called 4-adjacency or 8-adjacency [4].In 4-adjacency connectivity all pixels of the same value neighboring horizontally and vertically to the target pixel are assigned to the object, while in 8-adjacency pixels situated horizontally, vertically as well as diagonally to the target pixel are counted (see Figure 1).Percentage area coverage can be estimated by dividing the total number of object-pixels with the total number of pixels in the image.Very often influence from other objects unrelated to the object of interest interferes with results.For example it is often seen that presence of air bubbles gives raise to birefringence, and it is important to remove such artifacts prior to the actual image analysis.Many methods exist to remove such artifacts, and among these, image dilation followed by erosion is the most common in binary image processing.In the following, a short theoretical description of image dilation and erosion is given, for further information the reader is referred to Conzalez and Woods [4].
Consider the binary image matrix, D binary , and binary morphological structuring matrix, S, where the dimension of S is smaller than D binary ; see Figure 2 for an example of a morphological structuring matrix.Let the elements, z, be the coordinates to the pixels in D binary .When S is convoluted over D binary , for every possible displacement, the image dilation can mathematically be expressed as the intersection of elements between D binary and S: From equation 3 it can be seen that dilation has the property of bridging gaps between pixels, since whenever equation 3 is fulfilled, the surrounding pixels to coordinate z in D binary will be set to one.Another feature of applying equation 3 is whenever dilation is applied, the object will grow in size, and holes within the object with approximately the same size as S will be filled.Critical parameters to consider when dilating images are the shape and size of S, and the number of times S is to be convoluted over the entire image D binary .Dilation of an image has the effect that artifacts become better defined in their shape leading to easier subsequent removal.However, this process also affects the objects of interest, since their size will be increased.In order to counter this, image erosion can be applied using the same morphological structuring element S. Mathematically image erosion can be expressed as where D binary is the previously dilated image.By eroding the image, object sizes are restored towards the size in the original image [4].Collectively, the term image closing is used when the image has first been preprocessed using dilation and subsequent erosion [4].

Material
Piroxicam anhydrate (PX AH) was used as model drug compound (Chr.Olesen Pharmaceuticals, Denmark).Methanol and acetone were purchased from Lab-scan, Polen.Polyvinylpyrrolidone (PVP) K90 was used as model polymer (BASF, Germany).PVPs were of technical grade, all other materials of analytical grade.

Sample preparation
500 mg of PX AH was dissolved in 30 ml acetone and 7 ml methanol was added.To this solution, PVP was slowly added under magnetic stirring.To form the solid dispersion films, a microscope cover glass of 0.15 mm thickness was placed on a hot plate (Krüss G12, Germany), where temperature can accurately be controlled within ±1°C.Upon reaching the evaporation temperature of 30°C or 70°C, 60 µl of solvents consisting of a PX:PVP ratio 1:1 was pipetted onto the glass surfaces after which solvent evaporated.The prepared solid dispersion films were stored in a desiccator with saturated magnesium nitrate solution at ambient temperatures and 53±2 % relative humidity.

Polarized light microscopy
The prepared solid dispersion films were investigated by polarized light microscopy (Axiolab, Carl Zeiss, Göttingen, Germany) equipped with a 10x objective.A digital camera (Deltapix, Måløv, Denmark) was attached to the microscope interfaced with the software Deltapix version 1.6 (Deltapix, Måløv, Denmark).Images were obtained using 120 ms exposure time in TIFF format with resolution 1024x1280.Two representative images were obtained at the center of each sample.

Image analysis
Image analysis was performed using in-house routines programmed in MATLAB (ver.7.10, Mathworks, USA) in combination with the Image processing toolbox (ver.7.10, Mathworks, USA).

Results and discussion
4.1 Nucleation rate Visual inspection of samples shows that the nucleation rate of samples evaporated at 30°C is higher than that of samples evaporated at 70°C, Figure 3.It was also ob served that because evaporation temperature is above the boiling points of both organic solvents, with samples evaporated at 70°C, many air bubbles are present in the images.As mentioned previously, it is necessary to remove such artifacts prior to image analysis.An example of image processing and artifact removal is shown in Figure 4 using a representative measurement from a sample evaporated at 70°C.In this image, both air bubbles and crystalline spots are present.From Figure 4 it can be seen that gray scaling of the colored image did not change the information significantly, while transforming it into a binary image increased the extent of filling inside the air bubbles, which is due to application of a low threshold level at intensity 51.Image dilation is performed using a disk shaped morphological structuring element with 8 pixels in diameter.Upon image dilation, many gaps in the objects belonging to air bubbles are filled.However, as previously discussed, this process also affects the crystalline spots by increasing their size.The dilated image is subsequently eroded, using the same morphological structuring element, returning close to the original size of crystalline spots.Erosion did not separate the outer objects belonging to air bubbles, since their pixels are already bridged to the large air bubble objects.This process makes it easier to subsequent remove air bubble objects based on a maximum object size threshold.The final image shows the object counting and percentage area estimation on the remaining crystalline spots.

Conclusions
The present study highlights the potential of polarized light microscopy in combination with automated image analysis as a tool in monitoring solid dispersion stability with quantification ability.Non-destructive fast analysis of samples together with an automated sample changer could thus make PLM applicable for high throughput screening of solid dispersions.

Figure 1 :
Figure 1: (Left) 3 by 3 binary matrix, where the solid arrows only and all arrows combined show neighboring elements evaluated for 4-adjacency and 8-adjacency respectively.(Middle) object counting of the left matrix using 4-adjacency.The background is colored blue, and the two objects are colored red and green.(Right) evaluation of the same matrix using 8-adjacency.

Figure 2 :
Figure 2: (Left) an example of a morphological structuring element shaped as a disk.(Right) the same morphological structuring element shown as an image, with the dot indicating the center of S displaced during the image dilation operation.

Figure 3 :
Figure 3: (Top row left to right) Representative PLM images showing drug crystallization of solid dispersion evaporated at 30°C at day 0, day 10, day 20 and day 30.(Bottom row left to right) Solid dispersion evaporated at 70°C, the monitor intervals are same as top row.

Figure 4 :Figure 5 :
Figure 4: (top left to bottom right) Successive steps in artifact removal.PAC: Percentage area coverage.