Marthee commited on
Commit
3647988
·
verified ·
1 Parent(s): b32ec35

Update pilecaps_adr.py

Browse files
Files changed (1) hide show
  1. pilecaps_adr.py +8 -8
pilecaps_adr.py CHANGED
@@ -1074,14 +1074,14 @@ def drawAllContours(dataDoc,img,number,finalColorArray,ratioarea,ratioperim , pa
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
 
1077
- for p in perimeters:
1078
- if p[2]==x and p[3]==y and p[5]=='open':
1079
- # if areaa >=5.15 and areaa<=5.25:
1080
- perimTotal+=round((p[4]-1)*ratioperim,3)
1081
- cv2.putText(imgtransparent1,'Perimeter: '+str(round((p[4])*ratioperim,3))+ ' m', (p[0]+50,p[1]-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
1082
- pFlag=1
1083
- if pFlag==0:
1084
- cv2.putText(imgtransparent1,'Perimeter: '+str(perimeterr)+' m', (x+50,y-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
1085
  for i, row in SimilarAreaDictionary.iterrows():
1086
  c = Counter( SimilarAreaDictionary['Guess'].loc[i])
1087
  if len(c) >0:
 
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
 
1077
+ # for p in perimeters:
1078
+ # if p[2]==x and p[3]==y and p[5]=='open':
1079
+ # # if areaa >=5.15 and areaa<=5.25:
1080
+ # perimTotal+=round((p[4]-1)*ratioperim,3)
1081
+ # cv2.putText(imgtransparent1,'Perimeter: '+str(round((p[4])*ratioperim,3))+ ' m', (p[0]+50,p[1]-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
1082
+ # pFlag=1
1083
+ # if pFlag==0:
1084
+ # cv2.putText(imgtransparent1,'Perimeter: '+str(perimeterr)+' m', (x+50,y-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
1085
  for i, row in SimilarAreaDictionary.iterrows():
1086
  c = Counter( SimilarAreaDictionary['Guess'].loc[i])
1087
  if len(c) >0: