c++ to java
I found source code in c++
std::vector< std::vector<cv::Point> > allContours;
how do I make it in java ?
it's a List<MatOfPoint>
.
for a usage example, e.g. see here
yes, I am using List<MatOfPoint>.
but I need to calculate it's size
void MarkerDetector::findContours(const cv::Mat& thresholdImg,std::vector<std::vector<cv::Point>>& contours,int minContourPointsAllowed)
{
std::vector< std::vector<cv::Point> > allContours;
cv::findContours(thresholdImg, allContours, CV_RETR_LIST, CV_CHAIN_APPROX_NONE);
contours.clear();
for (size_t i=0; i<allContours.size(); i++)
{
int contourSize = allContours[i].size();
if (contourSize > minContourPointsAllowed)
{
contours.push_back(allContours[i]);
}
}
}
Asked: 2016-07-06 09:05:28 -0600
Seen: 357 times
Last updated: Jul 06 '16
Editing core.hpp crashes during run-time
Unresolved inclusion in OpenCV+Android tutorial
How to reduce false positives for face detection
How to convert Floating point image to 32-bit single-channel?
OpenCV DescriptorMatcher matches
Record/Store constant refreshing coordinates points into notepad
Conversion between IplImage and MxArray
How can solvePnPRansac be used with double values?