From patchwork Tue May 12 00:03:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3771 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DDC160E0D for ; Tue, 12 May 2020 02:03:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="j216xfzm"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4AFAF11F3; Tue, 12 May 2020 02:03:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1589241824; bh=9b1kxGqyxYCby1+ouLFTZ+KDUTJkCzHi1pQKQamBn10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j216xfzmcSYbha11ayvyajvLjM8GAuwn5uA3etE9QKjL/4UVUrS6QhHAxOnxsgJOE eaqibOQa6q8dzBaYs55KiWeKAb8Ae1RkeHUeRaLq8uirFDvYABH+x/h93mdwfjH5KH ebvLHK7HHS5S/zODJCQM4bFG9JQ7nbe+AOxefiS0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Tue, 12 May 2020 03:03:15 +0300 Message-Id: <20200512000322.11753-18-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512000322.11753-1-laurent.pinchart@ideasonboard.com> References: <20200512000322.11753-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 17/24] utils: raspberrypi: ctt: Fix pycodestyle E116 and E117 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 00:03:45 -0000 E116 unexpected indentation (comment) E117 over-indented (comment) Signed-off-by: Laurent Pinchart --- utils/raspberrypi/ctt/ctt_macbeth_locator.py | 26 ++++++++++---------- utils/raspberrypi/ctt/ctt_tools.py | 8 +++--- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py index 05d1bd437001..4e666b0f1089 100644 --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py @@ -450,14 +450,14 @@ def get_macbeth_chart(img, ref_data): """ in_border = True # for p in mac_guess[0]: - # pptest = cv2.pointPolygonTest( - # img_con, - # tuple(p), - # False - # ) - # if pptest == -1: - # in_border = False - # break + # pptest = cv2.pointPolygonTest( + # img_con, + # tuple(p), + # False + # ) + # if pptest == -1: + # in_border = False + # break if in_border: mac_mid = np.mean(mac_guess, @@ -499,9 +499,9 @@ def get_macbeth_chart(img, ref_data): else: clustering.fit(mac_mids_list) # try: - # clustering.fit(mac_mids_list) + # clustering.fit(mac_mids_list) # except RuntimeWarning as error: - # return(0, None, None, error) + # return(0, None, None, error) """ 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.resize(copy, None, fx=2, fy=2) # for clus in clus_list: - # centroid = tuple(2*np.round(clus[2]).astype(np.int32)) - # cv2.circle(copy, centroid, 7, (255, 0, 0), -1) - # cv2.circle(copy, centroid, 2, (0, 0, 255), -1) + # centroid = tuple(2*np.round(clus[2]).astype(np.int32)) + # cv2.circle(copy, centroid, 7, (255, 0, 0), -1) + # cv2.circle(copy, centroid, 2, (0, 0, 255), -1) # represent(copy) """ diff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py index 27080de08cec..f4b9baac5521 100644 --- a/utils/raspberrypi/ctt/ctt_tools.py +++ b/utils/raspberrypi/ctt/ctt_tools.py @@ -99,11 +99,11 @@ display image for debugging... read at your own risk... """ def represent(img, name='image'): # if type(img) == tuple or type(img) == list: - # for i in range(len(img)): - # name = 'image {}'.format(i) - # cv2.imshow(name, img[i]) + # for i in range(len(img)): + # name = 'image {}'.format(i) + # cv2.imshow(name, img[i]) # else: - # cv2.imshow(name, img) + # cv2.imshow(name, img) # cv2.waitKey(0) # cv2.destroyAllWindows() # return 0