Spaces:
Sleeping
Sleeping
Update pilecaps_adr.py
Browse files- pilecaps_adr.py +17 -3
pilecaps_adr.py
CHANGED
|
@@ -927,9 +927,16 @@ def drawAllContours(dataDoc,img,number,finalColorArray,ratioarea,ratioperim , pa
|
|
| 927 |
annot.set_colors(stroke=color, fill= color )
|
| 928 |
annot.set_opacity(0.5)
|
| 929 |
if len(alltxts)>0:
|
| 930 |
-
annot.set_info(content='Area='+str(areaa)+
|
| 931 |
# annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
|
| 932 |
annot.update()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 933 |
|
| 934 |
# areasinImage.append(areaa)
|
| 935 |
cv2.putText(imgPerimeter1,'Perimeter: '+str(perimeterr)+ ' m', (x+70,y-30) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
|
|
@@ -1067,10 +1074,17 @@ def drawAllContours(dataDoc,img,number,finalColorArray,ratioarea,ratioperim , pa
|
|
| 1067 |
annot.set_colors(stroke=color, fill= color )
|
| 1068 |
annot.set_opacity(0.5)
|
| 1069 |
if len(alltxts)>0:
|
| 1070 |
-
annot.set_info(content='Area='+str(areaa)+
|
| 1071 |
# annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
|
| 1072 |
annot.update()
|
| 1073 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1074 |
# cv2.putText(imgtransparent1,'Area: '+str(areaa) +' '+str(alltxts[contour])+' m2', (x+50,y-10) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
|
| 1075 |
pFlag=0
|
| 1076 |
|
|
|
|
| 927 |
annot.set_colors(stroke=color, fill= color )
|
| 928 |
annot.set_opacity(0.5)
|
| 929 |
if len(alltxts)>0:
|
| 930 |
+
annot.set_info(content='Area='+str(areaa)+ " m²",subject='ADR Team',title=str(alltxts[contour]))
|
| 931 |
# annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
|
| 932 |
annot.update()
|
| 933 |
+
|
| 934 |
+
annot11 = page.add_polyline_annot( points=shapee) # 'Polygon'
|
| 935 |
+
annot11.set_border(width=0.2, dashes=[3])
|
| 936 |
+
annot1.set_colors(stroke=color ,fill=None)
|
| 937 |
+
|
| 938 |
+
annot11.set_info(content=' Length='+str(lengthShape)+' m',subject='ADR Team',title=str(alltxts[contour]))
|
| 939 |
+
annot11.update()
|
| 940 |
|
| 941 |
# areasinImage.append(areaa)
|
| 942 |
cv2.putText(imgPerimeter1,'Perimeter: '+str(perimeterr)+ ' m', (x+70,y-30) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
|
|
|
|
| 1074 |
annot.set_colors(stroke=color, fill= color )
|
| 1075 |
annot.set_opacity(0.5)
|
| 1076 |
if len(alltxts)>0:
|
| 1077 |
+
annot.set_info(content='Area='+str(areaa)+ " m²",subject='ADR Team',title=str(alltxts[contour]))
|
| 1078 |
# annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
|
| 1079 |
annot.update()
|
| 1080 |
+
|
| 1081 |
+
annot11 = page.add_polyline_annot( points=shapee) # 'Polygon'
|
| 1082 |
+
annot11.set_border(width=0.2, dashes=[3])
|
| 1083 |
+
annot1.set_colors(stroke=color ,fill=None)
|
| 1084 |
+
|
| 1085 |
+
annot11.set_info(content=' Length='+str(lengthShape)+' m',subject='ADR Team',title=str(alltxts[contour]))
|
| 1086 |
+
annot11.update()
|
| 1087 |
+
|
| 1088 |
# cv2.putText(imgtransparent1,'Area: '+str(areaa) +' '+str(alltxts[contour])+' m2', (x+50,y-10) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
|
| 1089 |
pFlag=0
|
| 1090 |
|