[{"id":18247,"web_url":"https://patchwork.libcamera.org/comment/18247/","msgid":"<CAEmqJPr8A+WvJ17A8k844aeMFHg3bWWWBWpJOKUzH64TRjOznQ@mail.gmail.com>","date":"2021-07-21T13:10:02","subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nOn Wed, 21 Jul 2021 at 12:52, David Plowman <david.plowman@raspberrypi.com>\nwrote:\n\n> The OpenCV findHomography function now raises an unhandled error if it\n> receives fewer than 4 points whereas previously the limit was 3. This\n> makes no material difference to the behaviour of the tuning tool as it\n> will continue to search for the Macbeth chart at different scales.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n>\n\nI wonder if we could perhaps do a OpenCV version check on startup to\ncatch things like this in the future?  But that's not related to this fix...\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n\n> ---\n>  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> index 35c84807..cae1d334 100644\n> --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> @@ -597,10 +597,10 @@ def get_macbeth_chart(img, ref_data):\n>                      ref_cents.append(ref_cent)\n>\n>                      \"\"\"\n> -                    At least three squares need to have voted for a\n> centre in\n> +                    At least four squares need to have voted for a centre\n> in\n>                      order for a transform to be found\n>                      \"\"\"\n> -            if len(sq_cents) < 3:\n> +            if len(sq_cents) < 4:\n>                  raise MacbethError(\n>                      '\\nWARNING: No macbeth chart found!'\n>                      '\\nNot enough squares found'\n> --\n> 2.20.1\n>\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 43A37C0109\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Jul 2021 13:10:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EE38E60277;\n\tWed, 21 Jul 2021 15:10:20 +0200 (CEST)","from mail-lf1-x134.google.com (mail-lf1-x134.google.com\n\t[IPv6:2a00:1450:4864:20::134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EBF5160276\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Jul 2021 15:10:18 +0200 (CEST)","by mail-lf1-x134.google.com with SMTP id b26so3084224lfo.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Jul 2021 06:10:18 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Buaz3P79\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=NAjMrLRcI8BYTN9tSeCs4XfXyTlBzKr6lCPUvWa3BVI=;\n\tb=Buaz3P79mjqi6qEe3/Se1jX0e1rejuYW/EW9nxGUMCP8UZp8uU2ZeBoiIHeSjedFMx\n\tQX738W2rulepVDqkiJJ6SWmNth0fxQgi9tR8ezXn70mF2ShXWo71tuRateTIiOjpNChk\n\tv3r6CE1prWBbAoweaMo15ByiPSMvigvmdZPdLP/Xl0iw0qOMMYENR9Z9TcBLCCSzOR4/\n\tyuV8pIdQvRQsa0Tcv1H7cu+9d5TR48sI619n2MNSDnKskfD1KortzQPxJhIiozcnyQnG\n\t+Hgg7u71WoXve583+41Ry8qa3xxAoUuVRuhWmYxuZBD8LzeB9voOg+P/Uhkri02xoDGu\n\tdtMQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=NAjMrLRcI8BYTN9tSeCs4XfXyTlBzKr6lCPUvWa3BVI=;\n\tb=nRPfwZ0blV1usoXPoKHTrRcyMssMDHcRyrr2hwiHBrPuVQY6xdS4ruoNptjJiBNtr8\n\t2sqxJsjM3wLD/2hRq9Tqh0zWToV5bpRCAlup7Hx3i2ydc9o5Hvc3sPh8SZuQHTjCe5sy\n\tZdulkoG8LZ14sk8uebtsY3/LCDUNgXU+oM93Se0VJCmOEIzdzvXqC0rLkwrWV70cq4vb\n\tyrg0d6lh5oUr7CRcoa5bTn0pgqbdwJ2OQFC0COoI06VBxB6/RhbrdmKqoZMZ4K5Nyypf\n\tnfebK0+kw9Iucnj5Ula1SHESHIwmHKrtuG3Q5SDLXAvTXBwYGmXFDnTLwqrFCnJPG0XY\n\tw/cg==","X-Gm-Message-State":"AOAM531RCp5CBu64s5nZn1RvgRhpiONnQO0SFhrCKViXpoeQ+APY8LEe\n\tPQAOkLq3yCmE7Ai4GSLgkJL8J1bqi8u9KGGS9RBTkw==","X-Google-Smtp-Source":"ABdhPJx2EjuAAhQWelHxppA0w3gNMcVkR2w0YVzxPZyW013xwI8uSN1S6sxQtcvaeXWNePF8kIKOKzdUW1lumXZc24U=","X-Received":"by 2002:a05:6512:22d3:: with SMTP id\n\tg19mr20239350lfu.171.1626873018307; \n\tWed, 21 Jul 2021 06:10:18 -0700 (PDT)","MIME-Version":"1.0","References":"<20210721115220.5090-1-david.plowman@raspberrypi.com>\n\t<20210721115220.5090-3-david.plowman@raspberrypi.com>","In-Reply-To":"<20210721115220.5090-3-david.plowman@raspberrypi.com>","From":"Naushir Patuck <naush@raspberrypi.com>","Date":"Wed, 21 Jul 2021 14:10:02 +0100","Message-ID":"<CAEmqJPr8A+WvJ17A8k844aeMFHg3bWWWBWpJOKUzH64TRjOznQ@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"multipart/alternative; boundary=\"00000000000059eaea05c7a1e4e6\"","Subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18356,"web_url":"https://patchwork.libcamera.org/comment/18356/","msgid":"<8edc05ed-2ab3-d538-74a7-b5e1bf0c274f@ideasonboard.com>","date":"2021-07-26T10:33:34","subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi David,\n\nOn 21/07/2021 12:52, David Plowman wrote:\n> The OpenCV findHomography function now raises an unhandled error if it\n> receives fewer than 4 points whereas previously the limit was 3. This\n> makes no material difference to the behaviour of the tuning tool as it\n> will continue to search for the Macbeth chart at different scales.\n\nSounds reasonable to me.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> index 35c84807..cae1d334 100644\n> --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> @@ -597,10 +597,10 @@ def get_macbeth_chart(img, ref_data):\n>                      ref_cents.append(ref_cent)\n>  \n>                      \"\"\"\n> -                    At least three squares need to have voted for a centre in\n> +                    At least four squares need to have voted for a centre in\n>                      order for a transform to be found\n>                      \"\"\"\n> -            if len(sq_cents) < 3:\n> +            if len(sq_cents) < 4:\n>                  raise MacbethError(\n>                      '\\nWARNING: No macbeth chart found!'\n>                      '\\nNot enough squares found'\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 36651C322C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 26 Jul 2021 10:33:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E39F3687B3;\n\tMon, 26 Jul 2021 12:33:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C923C68536\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 26 Jul 2021 12:33:37 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7E2DA332;\n\tMon, 26 Jul 2021 12:33:37 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qn1CYbGn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627295617;\n\tbh=i/WGAx2He5EfpuVtEy32i1uDl8sF0D8WKdHMWq3gH3I=;\n\th=Subject:To:References:From:Date:In-Reply-To:From;\n\tb=qn1CYbGnxfvMooB2BOiERpGcg8L/96lHLnXvOqwv7gd8tJ2vuKtyTQgAbkmuGAVrs\n\tZ2hiBToCkYCx6tY32luaVq4bDQqg4RhMHyN/7DeiqQyAI9OYUER1pIWSD0NgMWY/z1\n\tyQtw/GywK7M1AvcmkdJlDoCG4sUiDT2qHwWc7SGw=","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20210721115220.5090-1-david.plowman@raspberrypi.com>\n\t<20210721115220.5090-3-david.plowman@raspberrypi.com>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<8edc05ed-2ab3-d538-74a7-b5e1bf0c274f@ideasonboard.com>","Date":"Mon, 26 Jul 2021 11:33:34 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210721115220.5090-3-david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":18469,"web_url":"https://patchwork.libcamera.org/comment/18469/","msgid":"<YQc/EKXS741QTRdD@pendragon.ideasonboard.com>","date":"2021-08-02T00:40:48","subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Wed, Jul 21, 2021 at 02:10:02PM +0100, Naushir Patuck wrote:\n> On Wed, 21 Jul 2021 at 12:52, David Plowman wrote:\n> \n> > The OpenCV findHomography function now raises an unhandled error if it\n> > receives fewer than 4 points whereas previously the limit was 3. This\n> > makes no material difference to the behaviour of the tuning tool as it\n> > will continue to search for the Macbeth chart at different scales.\n> >\n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> \n> I wonder if we could perhaps do a OpenCV version check on startup to\n> catch things like this in the future?  But that's not related to this fix...\n> \n> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\nGiven that this change remains backward-compatible with older OpenCV\nversion, it doesn't depend on a new minimum version, so\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> > ---\n> >  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > index 35c84807..cae1d334 100644\n> > --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > @@ -597,10 +597,10 @@ def get_macbeth_chart(img, ref_data):\n> >                      ref_cents.append(ref_cent)\n> >\n> >                      \"\"\"\n> > -                    At least three squares need to have voted for a centre in\n> > +                    At least four squares need to have voted for a centre in\n> >                      order for a transform to be found\n> >                      \"\"\"\n> > -            if len(sq_cents) < 3:\n> > +            if len(sq_cents) < 4:\n> >                  raise MacbethError(\n> >                      '\\nWARNING: No macbeth chart found!'\n> >                      '\\nNot enough squares found'","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id C1184BD878\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  2 Aug 2021 00:41:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 38420687C3;\n\tMon,  2 Aug 2021 02:41:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65EB4687B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  2 Aug 2021 02:40:58 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EE60087C;\n\tMon,  2 Aug 2021 02:40:57 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"qTdzWfF8\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1627864858;\n\tbh=CIbG7/L1EBzIAZm+Gur+cgVxq1vja9HcLWJ3DYMt4F0=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=qTdzWfF8X8hgXjKs96vdelhZyP2cp+rK5quSx0AxVNeVQ8dbygbcas55mv3eUd31J\n\twq+ma+U1QJmE12FaZ6LB4HK6TgvcKKprol7B5F9sns7jKUhwZt5EAuJVpuaIlnApBE\n\tWWPNEmxTg1RMPbitqdg2BRfFlCtDtrxYFpasb8yI=","Date":"Mon, 2 Aug 2021 03:40:48 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<YQc/EKXS741QTRdD@pendragon.ideasonboard.com>","References":"<20210721115220.5090-1-david.plowman@raspberrypi.com>\n\t<20210721115220.5090-3-david.plowman@raspberrypi.com>\n\t<CAEmqJPr8A+WvJ17A8k844aeMFHg3bWWWBWpJOKUzH64TRjOznQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPr8A+WvJ17A8k844aeMFHg3bWWWBWpJOKUzH64TRjOznQ@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 2/3] utils: raspberrypi: ctt: Fix\n\tusage of findHomography function","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]