This code is the second of three programs used to process video of droplet production in a T-Junction. This code preforms the bulk of work, by converting the video file into a sawtooth signal. In order to ensure accuracy, the video is processed twice with a different rectangle of interest. When this is done, the following data is saved:
1. ObjtSize - This is a sawtooth signal, where each peak or trough is a droplet breaking off.
2. ObjtSize2 - A second sawtooth signal, generated using a different rectangle and used for accuracy.
3. Data - This data structure is empty now, but is populated in the third program with droplet statistics.
4. fStruct - This saves the setting used by the video processor, such as red, yellow and blue color filter strength
5. frameRate - this the video frame rate, a very important parameter for calculating droplet size.
The code will start by asking basic questions and then you have the option of entering or uploading a color filter. If you developed a filter in part 1, you can save it by dragging fSturct into the current window. The filter settings are typically values from 0 to 1, and the black and white threshold has the biggest impact. You can then upload it by entering the file name when asked. Or if you wrote it down the parameters these can be entered. Once this is done, you need to select a second region of interest. All flow rates are figured for milliliters per hour. The video is then processed and every 10th frame is displayed along with the codes current block of frames. This can take time (~20 min for 250 MB video), so ensure your filters are setup correctly before hand. The data is saved at the end.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.