Through my programming,I find a funny phenomenon:There are some words that are so special that the translation software can't translate it.It is a term unique to programming.So I decide to record this phenomenon.
error:Unindent not expected
for kp in keypoints:
x=kp.pt[0]
y=kp.pt[1]
size=kp.size
EWFC z=484
D=498
lx=
ly=
#purpose to get a error to replace with this param
response=kp.response
circle_data=circle(x,y,size,z,D,lx,ly)
circle_x.append(circle_data.X_location)
circle_y.append(circle_data.Y_location)
circle_size.append(circle_data.radius)
circle_coordinate.append(circle_data.X_location,circle_data.Y_location)
circle_z = circle_data.z #carmer between receive's distance
circle_D = circle_data.D #wavelight of incident light
circle_lx = circle_data.lx
circle_ly = circle_data.ly
you can see the word 'unindent', it means ’Null line‘.The front and rear's'unindent' is inconfimity and lead to this error.
Secondly,the error:'Expected indented block',this reason is that before the main's code is incomplete.
def main():
circle.get_original(image_path)
#left_top_p,left_down_p,right_top_p,right_down_p,h1=circle.find_rect(image_path)
#circle.jiaozheng(left_top_p,left_down_p,right_top_p,right_down_p,image_path,h1)
circle_z,circle_D,circle_coordinate=circle.get_coodrinate(image_path)
circle_pointsdistance=[]
for i in circle_coordinate:
circle_pointsdistance.append(circle_coordinate[i])
circle_truedistance=sum(circle_pointsdistance) / len(circle_pointsdistance)
circle.calculate_distance(circle_z,circle_D,circle_truedistance)