Hi
At first, please don't use Find Straight Line on curved edges. It filters only those points that lie on a straight line, so you won't get all the edge points. Use IMAQ Rake instead, that one just finds the edge points and does no more processing on them.
Now let's assume you have all the edge points - contour of your shape. From IMAQ Rake the points come
ordered along the edge. Now the main criterion for the shape to be convex is that for
each three consecutive points, the following condition is true:
Let's mark the points p1, p2, p3. Now take the vector p1p2. Point p3 always has to be "to the right" from the direction of p1p2. To test this condition, at first compute vectors u = p1p2 and v = p1p3. Now compute the cross product of u and v (u x v). You can do it by computing u.x * v.y - u.y * v.x. If the value of the
cross product is negative, the condition is true.
Let me know if I should clarify something a bit more.
Vladimir