Hello,
I'm writing a wrapper to interface to a few of the functions of the OpenCV library by passing bitmaps rather than using their camera interface. So far I've got it doing things like thresholds and grayscales. The next step is to have it find some contours.
Contours are returned from the OpenCV function as a list of arrays of points. For example the returned list may contain five contours where each contour consists of a dozen or so x/y points.
Is it possible to return a Java list of objects from my wrapper to the B4A program and use it within B4A?
I'm thinking along the lines of creating a Type (it may already exist) for Point that would contain two floats, x and y. The wrapper would return a list of contours. In B4A I would assign this list to a B4A list. I would then get each object from the list. Each object would be a contour - an array of Points.
Am I close? Is there a different way I would need to return a list from a wrapper?
An alternative method would be to return each contour as a string array of CSV x and y points. I would iterate for the number of contours in the list.
If returning a list is not easy, would this alternative method be preferable?
Thanks,
Barry.
I'm writing a wrapper to interface to a few of the functions of the OpenCV library by passing bitmaps rather than using their camera interface. So far I've got it doing things like thresholds and grayscales. The next step is to have it find some contours.
Contours are returned from the OpenCV function as a list of arrays of points. For example the returned list may contain five contours where each contour consists of a dozen or so x/y points.
Is it possible to return a Java list of objects from my wrapper to the B4A program and use it within B4A?
I'm thinking along the lines of creating a Type (it may already exist) for Point that would contain two floats, x and y. The wrapper would return a list of contours. In B4A I would assign this list to a B4A list. I would then get each object from the list. Each object would be a contour - an array of Points.
Am I close? Is there a different way I would need to return a list from a wrapper?
An alternative method would be to return each contour as a string array of CSV x and y points. I would iterate for the number of contours in the list.
If returning a list is not easy, would this alternative method be preferable?
Thanks,
Barry.