Patent attributes
A system and a method for slug edge detection in a microchannel of a microfluidic device is provided. Specifically, the system comprises an image sensor in communication with the microchannel. The microchannel has at least two fluid slugs each of which has a marker of different color providing color gradient across the edge between the adjacent fluid slugs. An edge score function is generated for each channel segmentation dividing the microchannel into two segments at a specific location along the microchannel. The edge score function is proportional to a between class variance for intensity values associated with the two selected channel segments. The edge location is determined as the location along the channel defining one of the channel segmentations based at least in part on the edge score function.