From patchwork Wed Jul 21 11:52:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 13068 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A6EBDC322C for ; Wed, 21 Jul 2021 11:52:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 072EA68547; Wed, 21 Jul 2021 13:52:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="lwAMZcZj"; dkim-atps=neutral Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BA4AF60277 for ; Wed, 21 Jul 2021 13:52:31 +0200 (CEST) Received: by mail-wr1-x431.google.com with SMTP id r11so1865622wro.9 for ; Wed, 21 Jul 2021 04:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mGL+m6pijTfByh3n9dcoNug7oFdwkWv4O89mJve8Ghc=; b=lwAMZcZjSc/Yxd5THMzwK8ffX6oMTfuSzW/buH07wRr61v8o2J/yPESrM7/+AQ5irX V+7FgCXWbG6qFDG6CPi+AyFEYJnQTGWCalRrxY+MhHU9WqP2EuLuVDRZooEMhKHMde+k CfLv6aDFl/hC7b6xJvM1tuZC3TXk5Kpdr0p4fRYBQX6RbJSixgeqKfBJ6frY2Yz8MIcK 19MZTPi1YMtNfrKp95gaRPd8kCY0ZeU7qJEVNj8JEPI6J4/S9OdTavseZxRhOyk+PULw bBrqle9BIse+hrDUR5oEZZopcmILJwq2/NkcFyilU3SEyZF360gpVIOhoYypwCnvb1Ub BpZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mGL+m6pijTfByh3n9dcoNug7oFdwkWv4O89mJve8Ghc=; b=ZmYg4qLWyXo864fuNO2bBumvqb7R55SqeRqeN8uA3YDI9tzCf3g6z9FMilpVOtsGcF JL8pRctAd1uBtN+VBe62bgteqKoyOlSjrGTAzFdAWy68QQRDFNCKbFXYPwzOhlqCUDEM LzbtuQDSpNT+L2qFwVFj23T0FFdQkBgE6KAuKXYmeqEXZBr2JQ/WRfFKBciUzz1P43tO 6CMxuZoXz59QziqHM8YwDirADUPJwqG7OsCctmF203P3IJqi+09K7OvPPQoKYf65hatW qy2+aGVN6WiJoIsmtiB8hwCUg0WE+ZzSJJuGMr9wnqGjG3sNx+ecFH8sH+/vm4Ydq0+T xLlA== X-Gm-Message-State: AOAM531p+rJoby+YaT+jmlLHuDLIErMdFAv02WgbnktlGvq8UBv1qGtN x5WeLOTLarAVKeWiBdta7K3YK9Rz8jBOCA== X-Google-Smtp-Source: ABdhPJwq0bYzcbg2/JQPSTf55V0/EwV0755PkR88He7NJFnV3VR5JrZrAWN8WvAxzclVdrgyhLzwhw== X-Received: by 2002:a5d:46d1:: with SMTP id g17mr42879030wrs.2.1626868351371; Wed, 21 Jul 2021 04:52:31 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:1ce1:9965:4328:89c4]) by smtp.gmail.com with ESMTPSA id e11sm32876268wrt.0.2021.07.21.04.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 04:52:30 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Jul 2021 12:52:19 +0100 Message-Id: <20210721115220.5090-3-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210721115220.5090-1-david.plowman@raspberrypi.com> References: <20210721115220.5090-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix usage of findHomography function 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The OpenCV findHomography function now raises an unhandled error if it receives fewer than 4 points whereas previously the limit was 3. This makes no material difference to the behaviour of the tuning tool as it will continue to search for the Macbeth chart at different scales. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- utils/raspberrypi/ctt/ctt_macbeth_locator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py index 35c84807..cae1d334 100644 --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py @@ -597,10 +597,10 @@ def get_macbeth_chart(img, ref_data): ref_cents.append(ref_cent) """ - At least three squares need to have voted for a centre in + At least four squares need to have voted for a centre in order for a transform to be found """ - if len(sq_cents) < 3: + if len(sq_cents) < 4: raise MacbethError( '\nWARNING: No macbeth chart found!' '\nNot enough squares found'