# Find minimum distance between two convex hulls

Hi guys, i have already created convex hulls using cv::Hull. Now, i want to find the minimum distance between two adjacent convex hulls. Is there any method in the opencv to calculate this ? or should i implement myself ? because all i thought, if i want to calculate the minimum distance, i have to measure the distance between each points in convex hull number one and convex hull number 2. is it valid ? or may be there is an algorithm ? because i can't find any... Thanks.

As far as I know your approach is right. The convex hull is a vector of points and you have to loop through every point in both contours/hulls and calculate the distance. Then you take the minimum distance.

It kind of depends what you mean with distance between shapes. If it is physical distance, then yes that will do it, but if you want to look at how similar 2 shapes are, then use the computeDistance function of the shape module.