Marthee commited on
Commit
ee735af
·
verified ·
1 Parent(s): e51a8dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -146,7 +146,7 @@ def measure2_1():
146
  arr=measureproject(result)
147
  return arr
148
  #MAIN FUNCTION -- calls python code to measure the chosen plan from the interface
149
- # @app.route('/projecttomeasure/<jsdata>',methods=["GET","POST"])
150
  def measureproject(result,dataDoc,img=0):
151
  colorarr=[]
152
  # result = json.loads(jsdata)
@@ -163,7 +163,7 @@ def measureproject(result,dataDoc,img=0):
163
  c=hexRGB(item)
164
  colorarr.append(c)
165
  print('RATIOS=',result[3], result[4])
166
- imgPerimeter1,image_new1,SimilarAreaDictionary , colorsUsed,spreadsheet_url, spreadsheetId,list1, pdflink, areas_Perimeters, namepathArr =pilecaps_adr.drawAllContours(dataDoc,img,result[1],colorarr, result[3], result[4],'area', result[0],pdfpath)
167
  _, buffer = cv2.imencode('.png', image_new1)
168
  arr=[base64.b64encode(buffer).decode('utf-8'),SimilarAreaDictionary.to_dict(),spreadsheet_url , spreadsheetId,colorsUsed,list1.to_dict(), pdflink, areas_Perimeters, namepathArr]
169
  ################################# -3.2- #################################
 
146
  arr=measureproject(result)
147
  return arr
148
  #MAIN FUNCTION -- calls python code to measure the chosen plan from the interface
149
+
150
  def measureproject(result,dataDoc,img=0):
151
  colorarr=[]
152
  # result = json.loads(jsdata)
 
163
  c=hexRGB(item)
164
  colorarr.append(c)
165
  print('RATIOS=',result[3], result[4])
166
+ imgPerimeter1,image_new1,SimilarAreaDictionary , colorsUsed,spreadsheet_url, spreadsheetId,list1, pdflink, areas_Perimeters, namepathArr =pilecaps_adr.drawAllContours(dataDoc,img,result[1],colorarr, result[3], result[4], result[0],pdfpath)
167
  _, buffer = cv2.imencode('.png', image_new1)
168
  arr=[base64.b64encode(buffer).decode('utf-8'),SimilarAreaDictionary.to_dict(),spreadsheet_url , spreadsheetId,colorsUsed,list1.to_dict(), pdflink, areas_Perimeters, namepathArr]
169
  ################################# -3.2- #################################