Image
image
image
image


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

Contents

Program Installation

DSA_for_DC is a matlab program developed with Matlab 2009b, under Linux. It relies on the Matlab "Image Processing Toolbox".
Download http://temimps.nysbc.org/Dropshape.zip , and unzip them in the same folder. In case of bugs, please report to ncoudray@nysbc.org .
Principles and practice for measuring detergent concentrations from drop shape are described here

Running the program

  • place drop images to be analyzed into a common directory
  • (Optional) if the detergent concentrations corresponding to the drop on the image is known, rename the image appropriately (add the concentration in mg/ml in front of the name, putting the values after the coma between two underscores). Examples:
    • if image is named DS150.jpg and concentration is 5.8 mg/ml, rename 5_8_DS150.jpg
    • if image is named DS151.jpg and concentration is 1 mg/ml, rename 1_0_DS151.jpg
    • if image is named DS152.jpg and concentration is 3.2 μg/ml, rename 0_0032_DS152.jpg
  • open matlab
  • check the "current folder" is the one where the DSA_for_DC files are. If not, change the directory.
  • run the program: type DSA_for_DC in the "command window". The GUI should appear.
  • Files saved:
    • in the folder where the program is located:
      • "CAngle_Data_ date _ ExperimentName .mat" is the calibration file in the matlab format saved.
    • in the folder where the images are located:
      • output image "_initial name_ -res.png" with the amount of points used for the fitting, the mean contact angle measured with the tangent to a conic section method, and the width/height ratio. The image also shows the identified background (blue points) and the corresponding fitting (red line), the identified drop contour (yellow) and the corresponding fitting (green), the center of the ellipse (yellow circle), the axis (dotted yellow lines) and the tangents (pink).
      • initial image in a similar format: "_initial name_ -init.png"
      • graphs displaying statistical results of the measurements
      • a "Statistics.xls" excel file with all the measures done for every images, the average and standard deviation for each concentration).
  • Nota: the CMC suggested in the title is calculated as follow (at least 5 points are needed):
    • the points are arbitrarily fitted with a sigmoid 'A + B (1 - (exp(x + D.log(2^(1/E)) -1) -C) /D ))^(-E))', and then, the "breakpoint" is identified using by finding the "breakpoint" of the curve, as in the Rosin's method (Rosin 2001,Patt. Reco).

DSA_for_DC_GUI_1.JPG

To obtain a standard curve calibration:

  • Press "Do New calib. file"
  • Select your folder where all the images are saved and press OK.
  • Follow the instructions:
    • choose an name for your experiment
    • If images have not been named properly (see above), the expected concentrations corresponding to the different images will be asked.
  • Wait. Process can take around 15 sec per image.

To identify the detergent concentration of a sample:

  • To assess the concentration, it is advised to take several images of several drops from the studied sample. Save the image(s) in a similar folder
  • In the GUI, press "Load calibration" to load the corresponding calibration file (named "CAngle_Data_ date _ ExperimentName .mat"). It should have been done with a similar detergent, on a similar support...
  • In the GUI, press "Assess [Detergent]"
  • Wait. Process can take around 15 sec per image.
  • Files saved:
    • in the folder where the images are located:
      • output image "_initial name_ -res.png" with the amount of points used for the fitting, the mean contact angle measured with the tangent to a conic section method, and the width/height ratio. The image also shows the identified background (blue points) and the corresponding fitting (red line), the identified drop contour (yellow) and the corresponding fitting (green), the center of the ellipse (yellow circle), the axis (dotted yellow lines) and the tangents (pink).
      • initial image in a similar format: "_initial name_ -init.png"
      • a "Statistics.xls" excel file with all the measures done for every images, and the average and standard deviation.
  • The detergent concentration estimated is displayed in the title of the curves, and is shown on each curve by black a dotted line.

nota:

  • The "< Remove point<", "> Add point>" buttons and "Log" checkbox can be used to modify the display of the curves in the GUI. When points are removed, they appear as gray squares and are not included in the fitting and in the measurement of the estimated CMC. They can only be used for display and they do not affect the files saved during the processing. Curves can be more customized by using directly the data saved in the excel file.

DSA_for_DC_GUI_2.JPG

-- NicolasCoudray - 20 Jan 2011

image