I'm working on my first Python project using openCV, and I currently am looking for a way to quantify the density of an object within contour boundaries. The object is a dye plume, and as it spreads the density and saturation decrease. I've segmented my object using ranges of HSV values, and extracted contours from the mask and applied them to the original video. Now I'm looking to quantify the saturation, or density, of the dye plume at each time-step.

My idea is to sum up the HSV saturation values for each pixel within the boundary at every time-step, however I'm not sure how to go about this or if it would make much sense considering the plume is expanding, and the overall saturation would appear higher by the end simply because there is more area and pixels covered.

I very much appreciate any and all advice!

More Serena Dileonardo's questions See All
Similar questions and discussions