Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Convert C++ Code to java (Iterator)

Hello everybody, i have many problems to unterstand a tutorial from a Book called " Mastering openCV ". The Code examples are written in C++ and i want to import to android java. I converted many lines but stucked at this :

//Check new floodfill mask match for a correct patch. //Get all points detected for get Minimal rotated Rect

        vector<Point> pointsInterest;
        Mat_<uchar>::iterator itMask= mask.begin<uchar>();
        Mat_<uchar>::iterator end= mask.end<uchar>();
        for( ; itMask!=end; ++itMask)
            if(*itMask==255)
                pointsInterest.push_back(itMask.pos());

        RotatedRect minRect = minAreaRect(pointsInterest);

How can i translate these lines to java ?