Example #1
0
 private void findTopRectangle(PossibleMarkers pM)
 {
     for (int i = 0; i < pM.getCount(); i++) {
         int tempBase = pM.getNumberBaseAt(i);
             if (pM.getNumberInternalFrameAt(i) != -1) {
                 int internalFrame = pM.getNumberInternalFrameAt(i);
                 for (int j = 0; j < pM.getCountIncludeContourAt(i); j++)
                 {
                     int contourNumber=pM.getNumberIncludeContourAt(i,j);
                     if (contourPassibleMarkers.
                         includeContour(tempBase, contourNumber) &&
                         !contourPassibleMarkers.
                         includeContour(internalFrame, contourNumber))
                         pM.setTopRectAt(i, contourNumber);
                 }
             }
     }
 }
Example #2
0
 private void findInternalFrame(PossibleMarkers pM)
 {
     for (int i = 0; i < pM.getCount(); i++)
     {
         for (int j = 0; j < pM.getCountIncludeContourAt(i); j++)
         {
             int numIncludeFrame = pM.getNumberIncludeContourAt(i, j);
             double wsp = contourPassibleMarkers.
                             getContourAreaAt(pM.getNumberBaseAt(i)) /
                     (double)contourPassibleMarkers.
                             getContourAreaAt(numIncludeFrame);
             if (wsp > 3.8 && wsp < 4.2)
             {
                 pM.setInternalFrameAt(i, numIncludeFrame);
                 break;
             }
         }
     }
 }