Skip to content

A program that uses OpenCV3 for finding droplets during condensation

License

Notifications You must be signed in to change notification settings

alex-wuu/detect-droplets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Detect Droplets

A program that uses OpenCV3 for finding droplets during condensation. Gives droplet number densities based on the Rose model of dropwise condensation.

Requirements

  • Python 3
  • OpenCV
  • NumPy
  • PyQt5

Installation Instructions

Clone the repository inside your current directory:

$ git clone https://github.com/alex-wuu/detect-droplets.git detect-droplets
$ cd detect-droplets

Install virtualenv if you don't have it:

$ pip install virtualenv

Create your virtual environment with virtualenv if desired. venv can be changed to the virtual environment name of your choice:

$ virtualenv venv

Activate your virtual environment:

$ source venv/bin/activate

Install package dependencies with pip:

$ pip install -r requirements.txt

Usage

With your virtual environment activated, run with the following command:

$ python app.py

You can also build the program with PyInstaller and then run it (sudo might be needed to run the program):

$ pip install pyinstaller
$ pyinstaller app.py
$ sudo ./dist/app/app

You should see a window like this:

alt text

Select the directories for your images and output, and then enter in your settings in the window that comes up from clicking Settings/Run:

alt text

Processed images will be saved as a JPEG to the directory of your choice with filenames ending in _out and a CSV file named out.csv will contain the number densities for each range of droplet sizes. A settings file is also saved as settings.csv in the output directory.

Parameters for cv2.HoughCircles (named Canny Edge Threshold and Accumulator Threshold here) will need to be set and played around with to achieve good results. See the OpenCV documentation and Wikipedia for more information.

Click the Run button and wait for the processing to finish.

Here is an example of what the output image can look like. The original image is first, the output image is second, and the settings are in the above image of the settings window. This is an image of dropwise condensation on a Teflon coated silicon substrate.

alt text alt text

Additional References

J.W. Rose, L.R. Glicksman, Dropwise condensation—The distribution of drop sizes, Int. J. Heat Mass Transfer 16 (1973) 411-425.

Y.-T. Wu, C.-X. Yang, X.-G. Yuan, Drop distributions and numerical simulation of dropwise condensation heat transfer, Int. J. Heat Mass Transfer 44 (2001) 4455-4464.

J.W. Rose, Dropwise condensation theory and experiment: A review, Proc. Inst. Mech. Eng. A 216 (2002) 115-128.

P.B. Weisensee, Y. Wang, Q. Hongliang, D. Schultz, W.P. King, N. Miljkovic, Condensate droplet size distribution on lubricant-infused surfaces, Int. J. Heat Mass Transfer 109 (2017) 187-199.

About

A program that uses OpenCV3 for finding droplets during condensation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages