Spaces:
Sleeping
Sleeping
Update pilecaps_adr.py
Browse files- pilecaps_adr.py +4 -4
pilecaps_adr.py
CHANGED
|
@@ -679,8 +679,8 @@ def drawAllContours(img,number,finalColorArray,ratioarea,ratioperim,flag , path,
|
|
| 679 |
if eachcolor==firstcolor: # 3shan a3rf el array of colors et3adet kam mara - to support embedded levels
|
| 680 |
counter+=1
|
| 681 |
|
| 682 |
-
contourss,rgbcolor,invertedmask=findContoursFullImage(green2,maskDone,number,finalColorArray,ratioarea,ratioperim,'
|
| 683 |
-
contourssA,rgbcolor,invertedmask=findContoursFullImage(green2,maskDone,number,finalColorArray,ratioarea,ratioperim,'
|
| 684 |
SimilarAreaDictionary, colorsUsed , areas_Perimeters= FillDictionary(green2,SimilarAreaDictionary,maskDone,number,ratioarea,ratioperim,flag,finalColorArray,rgbcolor,eachcolor)
|
| 685 |
|
| 686 |
for contour in range(len(contourss)):
|
|
@@ -708,7 +708,7 @@ def drawAllContours(img,number,finalColorArray,ratioarea,ratioperim,flag , path,
|
|
| 708 |
approx = cv2.approxPolyDP(contourss[contour][0], 0.03 * perimeter, True) #0.0009
|
| 709 |
perimeter1 = cv2.arcLength(approx, True)
|
| 710 |
|
| 711 |
-
for point in
|
| 712 |
x1, y1 = point[0]
|
| 713 |
p1 = fitz.Point(x1*ratio,y1*ratio)
|
| 714 |
p1=p1*page.derotation_matrix
|
|
@@ -812,7 +812,7 @@ def drawAllContours(img,number,finalColorArray,ratioarea,ratioperim,flag , path,
|
|
| 812 |
# area1 = cv2.contourArea(approxa)
|
| 813 |
approx = cv2.approxPolyDP(contourss[contour][0], 0.03 * perimeter, True) #0.0009
|
| 814 |
perimeter1 = cv2.arcLength(approx, True)
|
| 815 |
-
for point in
|
| 816 |
x1, y1 = point[0]
|
| 817 |
p1 = fitz.Point(x1*ratio,y1*ratio)
|
| 818 |
p1=p1*page.derotation_matrix
|
|
|
|
| 679 |
if eachcolor==firstcolor: # 3shan a3rf el array of colors et3adet kam mara - to support embedded levels
|
| 680 |
counter+=1
|
| 681 |
|
| 682 |
+
contourss,rgbcolor,invertedmask=findContoursFullImage(green2,maskDone,number,finalColorArray,ratioarea,ratioperim,'perimeter',eachcolor)
|
| 683 |
+
contourssA,rgbcolor,invertedmask=findContoursFullImage(green2,maskDone,number,finalColorArray,ratioarea,ratioperim,'area',eachcolor)
|
| 684 |
SimilarAreaDictionary, colorsUsed , areas_Perimeters= FillDictionary(green2,SimilarAreaDictionary,maskDone,number,ratioarea,ratioperim,flag,finalColorArray,rgbcolor,eachcolor)
|
| 685 |
|
| 686 |
for contour in range(len(contourss)):
|
|
|
|
| 708 |
approx = cv2.approxPolyDP(contourss[contour][0], 0.03 * perimeter, True) #0.0009
|
| 709 |
perimeter1 = cv2.arcLength(approx, True)
|
| 710 |
|
| 711 |
+
for point in contourss[contour][0]:
|
| 712 |
x1, y1 = point[0]
|
| 713 |
p1 = fitz.Point(x1*ratio,y1*ratio)
|
| 714 |
p1=p1*page.derotation_matrix
|
|
|
|
| 812 |
# area1 = cv2.contourArea(approxa)
|
| 813 |
approx = cv2.approxPolyDP(contourss[contour][0], 0.03 * perimeter, True) #0.0009
|
| 814 |
perimeter1 = cv2.arcLength(approx, True)
|
| 815 |
+
for point in contourss[contour][0]:
|
| 816 |
x1, y1 = point[0]
|
| 817 |
p1 = fitz.Point(x1*ratio,y1*ratio)
|
| 818 |
p1=p1*page.derotation_matrix
|