-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
46 lines (34 loc) · 1.78 KB
/
README
File metadata and controls
46 lines (34 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Contact Angle Measurement
=========================
Author: Ryan Fobel (ryan@fobel.net)
Date: 09/20/2012
This program calculates contact angles for a sesille drop from an image or video
sequence. To use it, you will need to install Python and the following modules:
pygtk, numpy, matplotlib, and opencv.
Binaries for opencv are available at: http://www.lfd.uci.edu/~gohlke/pythonlibs
Instructions
============
usage: cam.py [-h] [-i INPUT] [-o OUTPUT]
Analyze contact angles from a video or image.
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
input video or image file to process
-o OUTPUT, --output OUTPUT
output csv file
When the program opens, select a region of interest (ROI) by clicking and
dragging your left mouse button. The region of interest should include the
contact line on one or both sides of the drop. Contact angles will be
calculated for any edge within this region that intersects with the baseline.
A 3rd-order polynomial is fit to the edge line and the contact angle is the
angle between the tangent of this fitted polynomial and baseline at their
intersection point. Be aware that the height of your ROI can affect the final
contact angle (you need enough points to describe the shape of the drop but
too many points may yield a poor fit).
Once you've defined your ROI, press 'b' to switch to 'baseline' mode. Now you
can click on two points to define the baseline of the drop. Press 'r' at any
time to go back and adjust the ROI mode.
Once you're happy with the position of your ROI and baseline, press 'ENTER'
to begin analysis.
Videos must be converted to the I420 format prior to processing. See
http://opencv.willowgarage.com/wiki/VideoCodecs for conversion instructions.