Marthee commited on
Commit
6c9bd43
·
1 Parent(s): f1a5b3e

Update pilecaps_adr.py

Browse files
Files changed (1) hide show
  1. pilecaps_adr.py +2 -2
pilecaps_adr.py CHANGED
@@ -876,8 +876,8 @@ def drawAllContours(img,number,finalColorArray,ratioarea,ratioperim,flag , path,
876
  annot.set_info(content='Area='+str(areaa)+' m2' +'\n \nPerimeter='+str(perimeterr)+' m',subject='ADR Team')#,title='uuum')
877
  # annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
878
  annot.update()
879
- cv2.putText(imgtransparent1,'Area: '+str(areaa)+' m2' , (x+50,y-10) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
880
- cv2.putText(imgtransparent1,'Perimeter: '+str(perimeterr)+' m' , (x+50,y-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
881
 
882
  alpha = 0.4 # Transparency factor.
883
  image_new1 = cv2.addWeighted(imgArea1, alpha, imgtransparent1, 1 - alpha, 0)
 
876
  annot.set_info(content='Area='+str(areaa)+' m2' +'\n \nPerimeter='+str(perimeterr)+' m',subject='ADR Team')#,title='uuum')
877
  # annot.set_line_ends(fitz.PDF_ANNOT_LE_DIAMOND, fitz.PDF_ANNOT_LE_CIRCLE)
878
  annot.update()
879
+ cv2.putText(imgtransparent1,'area2= '+str(areaa) , (x+50,y-10) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
880
+ cv2.putText(imgtransparent1,'perim= '+str(perimeterr)+','+str(len(approx)) , (x+50,y-40) ,cv2.FONT_HERSHEY_SIMPLEX, 0.6, (50, 50, 255), 2)
881
 
882
  alpha = 0.4 # Transparency factor.
883
  image_new1 = cv2.addWeighted(imgArea1, alpha, imgtransparent1, 1 - alpha, 0)