Hi all,
I have the following code written in c++:
vector<Vec4i> hierarchy;
vector<vector<Point>> contours;
findContours(temp, contours, hierarchy, RETR_EXTERNAL, CHAIN_APPROX_SIMPLE);
double refArea = 0;
int numObjects = hierarchy.size();
if(hierarchy.size() > 0) {
//do stuff
for(int i = 0; i >= 0; i = hierarchy[i][0]) {
//do more stuff
}
}
I want to convert this to java for opencv android programming, but am unsure how. If anyone can help, that would be much appreciated!