Image
image
image
image


DSA_for_DC: Matlab program (Drop Shape Measurement for Detergent Concentration quantification)

  • Background
  • Overview
  • Drop shape assessment
  • Methodology
  • Surface tension measurement to determine detergent concentration in a solution; tool description

    Background

    The propensity of detergents to alter the surface properties of an aqueous solution can be explored to measure the exact concentration of the detergent in the solution.

    For a more comprehensive theoretical background to the technique, please refer to the following publication: Kaufmann TC, Engel A, and Rémigy HW (2006) A Novel Method for Detergent Concentration Determination, Biophysical Journal, 90, 310-317.

    Briefly, upon introduction of detergent into an aqueous solution, the detergent molecules will preferentially partition into the interface (surface) of the system. This reduces the systems free energy by lowering the ordering of water molecules at the interface (calculated as area x surface tension), and by removing the hydrophobic parts of the detergent from contacts with the solvent. As the amount of detergent in solution is increased further, the surface coverage increases (and the surface tension therefore decreases) and the solution will subsequently become saturated with detergent monomers. At one point, the detergents will instead start aggregating into micelles in solution. This aggregation also lowers the system free energy by decreasing the contact area of the hydrophobic parts of the detergent with water. The point where these micelles start forming is called the critical micelle concentration (CMC) and is unique for each detergent. Before reaching the CMC, the surface tension decreases rapidly with addition of increasing concentrations of the detergent. After reaching the CMC, the surface tension remains constant, since additional detergent added to the system aggregate into micelles.

    Overview

    In practice, a small drop (20μl) of the detergent-containing sample is pipetted onto a suitable substrate. The drop is allowed to equilibrate for a short period of time, and thereafter it is imaged at high magnification. Through analysis of the shape of the drop and comparisons to drops with known detergent concentrations, it is possible to calculate the amount of detergent in the sample.

    As each detergent has unique properties such as its CMC, aggregation number, polarity, etc, standard curves have to be made for all detergents whose concentrations will be measured. For the standard curve, aqueous solutions of the detergent at different concentrations are prepared. As the surface tension decreases most rapidly at concentrations slightly below the CMC, solutions are prepared at close concentration intervals in this region of the curve. Above, and far below the CMC, solutions can be prepared at wider concentration intervals. If 5mM NaN3 is added to prevent microbial growth, these solutions can be stored in room temperature for future use.

    Drop shape assessment

    In Kaufmann et al. the contact angle between the drop and the substrate was used for their measurements. The process is as follows:
    1. Segmentation
      1. Smoothing with a 5x5 pixel Gaussian kernel.
      2. Apply Canny edge detection and threshold it. For the hysteresis threshold, fix values are used.
      3. The droplet is cut out according to a predefined frame including the baseline.
      4. The coordinates of the drop edges [Drop_X,Drop_Y] are extracted.
    2. Curve fitting
      1. Fit the drop edges with the equation of a conic section (they say an ellipse in the paper, but use a conic section in the program we have).
              a.x^2+ b.x.y + c.y^2 + d.x + e.y + f = 0
             
      2. Extract the center of the ellipse:
              Center_X = (b.e - 2.c.d) / (4.a.c -  b^2)
        
         Center_Y = (b.d -  2.a.e) / (4.a.c - b^2)
             
      3. Extract the minor and major semi-axis lengths:
              axis_a = sqrt(-det0/(det1* lambda1))
        
         axis_b = sqrt(-det0/(det1* lambda2))
             
        where det0 is the determinant of matrice mat0 and det1 the determinant of matrice mat1:
              mat0 = [f   d/2 e/2
        
          d/2  a  b/2
        
          e/2 b/2  c ]
        
         mat1 = [a   b/2
        
          b/2  c ]
             
        and where
              lambda1 = (-(-(a+c)) - sqrt(deltaEq)) / 2
        
         lambda2 = (-(-(a+c)) + sqrt(deltaEq)) / 2
             
        with
              deltaEq = (-(a+c)).^2 - 4*1*det1
             
    3. Measurements
      1. Extract the intersection [x0,y0] between the drop and the baseline:
      2. Measure the angle of the contact point:
              t = atan(y0 / x0)
             
      3. Measure the vector of the contact angles:
              Xv = - axis_a.sin(t)
        
         Yv = axis_b.cos(t)
             
      4. Deduce the contact angle :
              Contact_Angle = acos(-Xv^2 / (sqrt(Xv^2 + Yv^2)))
             

    When the setup is flexible and not within a box, part 1b and 1c can not be applied: illumination can change (fixed thresholds may therefore not be correct), and the position of the baseline can move.

    Xtracedrop is a NYSBC program which fits the edge of the drop with the equation of an ellipse and then extracts its axis. The drop shape is then characterized by the axis ratio.

    In the Matlab implementation described herein, both the axis ratio and the contact angle measurements are done. Two other ways of measuring the contact angle are also available and the whole protocol is as follows:

    1. Segmentation
      1. Smoothing with a 5x5 pixel Gaussian kernel.
      2. Apply a Prewitt filter, and use the T-point algorithm to threshold automatically the edges
      3. For each segmented objects, measure its size and its average position in the image. We consider that the searched object is large (baseline + drop edges) and high in the image. Other objects are rejected.
      4. Skeletonize the object to obtain a 1-pixel wide edge.
      5. Plot a cumulative histogram of the pixels along the y-axis. This should lead to a unimodal histogram with two slopes: a slightly increasing slope (the edges of the drop), and a sharper slope (the edges of the baseline being approximately on the same value of the y-axis).
      6. Use the T-point algorithm to separate these two slopes and identify the pixels which potentially belong to the baseline.
      7. Fit the points which potentially belong to the baseline with a first order polynomial curve. We consider baseline pixels at +/- 5 pixels of this line.
      8. The drop is the largest object above baseline pixels. The coordinates of the drop edges [Drop_X,Drop_Y] are extracted.
    2. Curve fitting (similar to the dropbox)
      1. Fit the drop edges with the equation of a conic section
              a.x^2+ b.x.y + c.y^2 + d.x + e.y + f = 0
             
      2. Extract the center of the ellipse:
              Center_X = (b.e - 2.c.d) / (4.a.c - b^2)
        
         Center_Y = (b.d - 2.a.e) / (4.a.c - b^2)
             
      3. Extract the minor and major semi-axis lengths:
              axis_a = sqrt(-det0/(det1* lambda1))
        
         axis_b = sqrt(-det0/(det1* lambda2))
             
        where det0 is the determinant of matrice mat0 and det1 the determinant of matrice mat1:
              mat0 = [f   d/2 e/2
        
          d/2  a  b/2
        
          e/2 b/2  c ]
        
         mat1 = [a   b/2
        
          b/2  c ]
             
        and where
              lambda1 = (-(-(a+c)) - sqrt(deltaEq)) / 2
        
         lambda2 = (-(-(a+c)) + sqrt(deltaEq)) / 2
             
        with
              deltaEq = (-(a+c)).^2 - 4*1*det1
             
    3. Measurements; 4 methods:
      1. Axis ratio :
              axis_ratio = axis_a / axis_b
             
      2. DropBox method
      3. Tangent to an ellipse : we consider that the drop can also be fitted by an ellipse which center and axis are equal to the center and the axis of the conic section fitted previously.
        1. Therefore, the equation of the equivalent ellipse is:
                  1 = ((x - Center_X)/ axis_a )^2 + ((y - Center_Y)/ axis_b )^2
                 
        2. We measure the right and left intersections between the ellipse and the baseline.
        3. For each intersection, the contact angle is measured. We use the equation of the tangent to a circle at a point x0,y0:
                  1 = (x - Center_X) (x0 - Center_X)/ axis_a^2 
          
               + (y - Center_Y) (y0 - Center_Y)/ axis_b^2
                 
        4. The contact angle is extracted from the slope of the tangent at +/- 100 pixels in the x-axis of the contact point:
                  ContactAngle_Ellipse = atan(-(yT(end)-yT(1))/(xT(end)-T(1)))
                 
          Where xT and yT are vectors points belonging to the tangent:
                  xT = [-100:100] + x0 
          
           yT = (1 - ((xT-Center_X).*(x0-Center_X))/axis_a.^2) 
          
                  .* (axis_b.^2) ./ (y0-Center_Y) + Center_Y;
                 
      4. Tangent to a conic section :
        1. We measure the right and left intersections between the conic section and the baseline.
        2. For each intersection, the contact angle is measured. We use the equation of the tangent to a conic section at a point x0,y0:
                  a.x0.x + b/2*(y0.x + x0.y) + c.y0.y + d/2.(x+x0) +e/2.(y+y0) + f = 0
                 
        3. The contact angle is extracted from the slope of the tangent at +/- 100 pixels in the x-axis of the contact point.

    Methodology

    Set up at NYSBC

    setup.jpg
    Figure 1. Setup for measuring drop shapes .

    The distance between the macro lens of the camera and the stage onto which the drop is pipetted is around 3in (about 7.5cm).

    The illuminator used for illuminating the wall behind the drop is a 150W High Intensity Illuminator from VWR. Both the intensity and the incoming angles of the light can be easily adjusted.

    The stage is mounted onto a three-axis translational manipulator with capabilities to fine-tune the X, Y, and Z positions of the stage relative to the camera. The manipulator is mounted onto a rail along which the whole device can slide.

    Use of calibration curves

    The standard curves have an almost linear portion at detergent concentrations just below the CMC. In this region, small changes in detergent concentration cause comparably large changes in the shape of the drop. Consequently, this portion of the curve is the most robust for determining the concentration of detergent in a sample of interest. Thus, the sample therefore needs to be diluted so that its detergent concentration comes within the concentration range of the linear portion of the standard curve.

    Technique

    If your solution contains a detergent not previously encountered, a standard curve for the detergent is necessary for evaluation of the detergent concentration. Prepare a standard curve. If you are measuring a detergent for which a standard curve is already prepared, preferably re-measure the standard-curve solutions that represent the linear portion of the particular curve. At least, chose a few standard curve stocks and measure together with your sample to ensure that the results are consistent with previous measurements.

    Preparation

    1. A glass cover slip, cut with a glass cutter to fit the dimensions of the translational manipulator, is acting as the stage for the drop. Make sure that the cover slip is tightly attached to the manipulator with double-sided tape. If the cover slip needs replacement, use a glass cutter to prepare a new one with the correct dimensions.
    2. Wrap a piece of parafilm around the cover slip. The parafilm should be free from uneven regions and very tightly wrapped around the glass. Change the parafilm frequently (at least each time the experiment is performed) to avoid scratches and dirt to accumulate on the surface.
    3. Make sure that everything in the setup is in its right position and completely level. Start with the camera: adjust the laser-level mounted onto the wall in back of the camera to the correct height (marks on the wall) and make sure that it is completely level. Next, look into the viewfinder eyepiece of the camera and change the focus so that the laser beam on the wall can be clearly seen in the eyepiece. Adjust the height and angle of the camera so that the middle line of the framing grid seen through the eyepiece is exactly level with the laser.
    Next, it is time to ensure that the height and position of the stage is correct: focus in on the stage and use the knobs on the stage manipulator to fine-tune its positions. The upper edge of the stage should be parallel with the middle line of the framing grid seen in the eyepiece of the camera. If the stage is not completely level, add pieces of paper under the rail to compensate.
    1. Adjust the lighting. The best results are obtained if bright white light is projected onto a spot on the wall that acts as the background in the images. Turn also off the general illumination in the room.
    2. Add a 20μl drop of water onto the stage. For reproducible results a small black dot on the stage marks an appropriate place for the drop. Look into the eyepiece of the camera to adjust the focus of the camera to the position of the drop. Press the LV button on the camera if you want to have the image on the monitor instead of having to look into the eyepiece. This mode also has a small framing box in the middle that is practical for centering the images around the drops when the experiment is running.
    3. Take a picture and evaluate it (it is more convenient to use the remote shutter control - refer to the instruction manual for how to use it). If the edges of the drop are sharp and the drop clearly stands out from the background, the settings are correct for using automated evaluation of the images. You can proceed onto your experiment. Examples of good and bad images see below. Note, the "bad " images can still be evaluated manually.

    BadGoodDrops.jpg Figure 2. Examples of "bad" and "good" images for automated image evaluation. The colors in the left image seem washed out, and the contrast is much lower than in the image on the right .

    Imaging of the drop / Performing the experiment

    20μl is the standard size of the drops used both in the original reference by Kaufmann et al. and for evaluating the technique in our lab, although also smaller volumes have been tested and demonstrated to provide essentially the same results.

    It is important to allow the drop to equilibrate with the surrounding before imaging. Use a timer, so that all drops are imaged at the same time point. 30 seconds is the standard time used for equilibration, but longer times may also work as long as you are consistent with the times throughout the experiment.

    During imaging, a good practice is to take at least two images of each condition/solution for evaluation. This entails imaging two different drops and not simply imaging the same drop twice.

    1. Pipette 20μl of your sample onto the parafilm-covered stage. Start the timer (30 seconds). While waiting, in the camera eyepiece or, preferentially, on the monitor, make sure that the drop is centered in the view.
    2. Take the picture. Control that it looks OK. Remove the drop from the stage using a soft (lint-free) tissue and clean the stage carefully.
    3. Apply the next drop.

    Image analysis

    Tools available at NYSBC:

    Other tools:

    • ImageJ:

    -- NicolasCoudray - 28 Dec 2010

    image