utils: raspberrypi: ctt: Fix pycodestyle E116 and E117

E116 unexpected indentation (comment)
E117 over-indented (comment)

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
This commit is contained in:
Laurent Pinchart 2020-05-02 03:32:00 +03:00
parent 67f9605a7f
commit a49fd8ea1d
2 changed files with 17 additions and 17 deletions

View file

@ -450,14 +450,14 @@ def get_macbeth_chart(img, ref_data):
""" """
in_border = True in_border = True
# for p in mac_guess[0]: # for p in mac_guess[0]:
# pptest = cv2.pointPolygonTest( # pptest = cv2.pointPolygonTest(
# img_con, # img_con,
# tuple(p), # tuple(p),
# False # False
# ) # )
# if pptest == -1: # if pptest == -1:
# in_border = False # in_border = False
# break # break
if in_border: if in_border:
mac_mid = np.mean(mac_guess, mac_mid = np.mean(mac_guess,
@ -499,9 +499,9 @@ def get_macbeth_chart(img, ref_data):
else: else:
clustering.fit(mac_mids_list) clustering.fit(mac_mids_list)
# try: # try:
# clustering.fit(mac_mids_list) # clustering.fit(mac_mids_list)
# except RuntimeWarning as error: # except RuntimeWarning as error:
# return(0, None, None, error) # return(0, None, None, error)
""" """
create list of all clusters create list of all clusters
@ -549,9 +549,9 @@ def get_macbeth_chart(img, ref_data):
# copy = cv2.cvtColor(copy, cv2.COLOR_GRAY2RGB) # copy = cv2.cvtColor(copy, cv2.COLOR_GRAY2RGB)
# copy = cv2.resize(copy, None, fx=2, fy=2) # copy = cv2.resize(copy, None, fx=2, fy=2)
# for clus in clus_list: # for clus in clus_list:
# centroid = tuple(2*np.round(clus[2]).astype(np.int32)) # centroid = tuple(2*np.round(clus[2]).astype(np.int32))
# cv2.circle(copy, centroid, 7, (255, 0, 0), -1) # cv2.circle(copy, centroid, 7, (255, 0, 0), -1)
# cv2.circle(copy, centroid, 2, (0, 0, 255), -1) # cv2.circle(copy, centroid, 2, (0, 0, 255), -1)
# represent(copy) # represent(copy)
""" """

View file

@ -99,11 +99,11 @@ display image for debugging... read at your own risk...
""" """
def represent(img, name='image'): def represent(img, name='image'):
# if type(img) == tuple or type(img) == list: # if type(img) == tuple or type(img) == list:
# for i in range(len(img)): # for i in range(len(img)):
# name = 'image {}'.format(i) # name = 'image {}'.format(i)
# cv2.imshow(name, img[i]) # cv2.imshow(name, img[i])
# else: # else:
# cv2.imshow(name, img) # cv2.imshow(name, img)
# cv2.waitKey(0) # cv2.waitKey(0)
# cv2.destroyAllWindows() # cv2.destroyAllWindows()
# return 0 # return 0