Yes, based on the success I've had following your advice and taking that approach I think I'll be sticking with binary package for awhile.
I was wondering if you could help me with another question?
Today was the first time I've tackled trying to modify any of the samples to any significant extent. I'm trying to implement minEnclosingCircle in the color-blob-detector sample. I've spent most of my afternoon on this and am having difficulty understanding the intended data types. According to the documentation here:
It seems to be expecting vectors for center and radius output parameters? I'm having better success with a data type of "point" but with the following code:
while (each.hasNext())
{
MatOfPoint contour = each.next();
if (Imgproc.contourArea(contour) > mMinContourArea*maxArea)
{
Core.multiply(contour, new Scalar(4,4), contour);
mContours.add(contour);
// int pt = 0;
// int f = 0;
// int j = 0;
// int x = 0;
// Mat mCircle = new Mat();
// float mRadius = 0;
Point actualCenter = new Point();
float[] radius = new float[] { 347.0f };
Imgproc.minEnclosingCircle(contour, actualCenter, radius);
Point truthCenter = new Point(0, 0);
truthCenter = actualCenter;
float truthRadius = 1.0f;
assertEquals(truthRadius, radius[0], weakEPS);
}
Imgproc.minEnclosingCircle(contour, mCircle, mRadius);
Eclipse is complaining:
"The method minEnclosingCircle(MatOfPoint2f, Point, float[]) in the type Imgproc is not applicable for the arguments (MatOfPoint, Point, float[])"
Trying to get me to "Change type of 'contour' to 'MatOfPoint2f" which breaks the center and radius parameter types.
I'm experimenting with code from several sources including:
Am I looking for an Array, point, and float as described by the first itseez link? If so, what variable from should I be passing from Color-Blob-Detector to minEnclosingCircle as the Input array, and is there going to be a specific syntax necessary for a type conversion?
Sorry for the long question. :/
-Nick