[{"id":28252,"web_url":"https://patchwork.libcamera.org/comment/28252/","msgid":"<CAEmqJPrj2Y3qNb2L5KQKo=cF623Rm1d_3aCVwGLZTf_5pikBKQ@mail.gmail.com>","date":"2023-12-06T09:38:37","subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi David,\n\nThank you for this fix.\n\nOn Fri, 1 Dec 2023 at 11:08, David Plowman via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Previously the code would brighten up images in case the Macbeth Chart\n> is slightly dark, and also zoom in on sections of it to look for\n> charts occupying less of the field of view. But it would not do both\n> together.\n>\n> This change makes the search for smaller charts also repeat that\n> search for the brightened up images that it made earlier, thereby\n> increasing the chances of success for non-optimal tuning images.\n>\n> There are also a couple of very small drive-by typo fixes.\n>\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\nSeems reasonable.\n\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n\n> ---\n>  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 69 ++++++++++++--------\n>  1 file changed, 40 insertions(+), 29 deletions(-)\n>\n> diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> index 3e95df89..178aeed0 100644\n> --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> @@ -57,6 +57,10 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      \"\"\"\n>      cor, mac, coords, msg = get_macbeth_chart(img, ref_data)\n>\n> +    # Keep a list that will include this and any brightened up versions of\n> +    # the image for reuse.\n> +    all_images = [img]\n> +\n>      \"\"\"\n>      following bits of code tries to fix common problems with simple\n>      techniques.\n> @@ -71,6 +75,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 2\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -81,6 +86,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 4\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -128,23 +134,26 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_inc = int(h/6)\n>          \"\"\"\n>          for each subselection, look for a macbeth chart\n> +        loop over this and any brightened up images that we made to increase the\n> +        likelihood of success\n>          \"\"\"\n> -        for i in range(3):\n> -            for j in range(3):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                \"\"\"\n> -                if the correlation is better than the best then record the\n> -                scale and current subselection at which macbeth chart was\n> -                found. Also record the coordinates, macbeth chart and message.\n> -                \"\"\"\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 1\n> +        for img_br in all_images:\n> +            for i in range(3):\n> +                for j in range(3):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> +                    \"\"\"\n> +                    if the correlation is better than the best then record the\n> +                    scale and current subselection at which macbeth chart was\n> +                    found. Also record the coordinates, macbeth chart and message.\n> +                    \"\"\"\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 1\n>\n>      \"\"\"\n>      scale 2\n> @@ -157,17 +166,19 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_sel = int(h/2)\n>          w_inc = int(w/8)\n>          h_inc = int(h/8)\n> -        for i in range(5):\n> -            for j in range(5):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 2\n> +        # Again, loop over any brightened up images as well\n> +        for img_br in all_images:\n> +            for i in range(5):\n> +                for j in range(5):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 2\n>\n>      \"\"\"\n>      The following code checks for macbeth charts at even smaller scales. This\n> @@ -238,7 +249,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      print error or success message\n>      \"\"\"\n>      print(msg)\n> -    Cam.log += '\\n' + msg\n> +    Cam.log += '\\n' + str(msg)\n>      if msg == success_msg:\n>          coords_fit = coords\n>          Cam.log += '\\nMacbeth chart vertices:\\n'\n> @@ -606,7 +617,7 @@ def get_macbeth_chart(img, ref_data):\n>                      '\\nNot enough squares found'\n>                      '\\nPossible problems:\\n'\n>                      '- Macbeth chart is occluded\\n'\n> -                    '- Macbeth chart is too dark of bright\\n'\n> +                    '- Macbeth chart is too dark or bright\\n'\n>                  )\n>\n>              ref_cents = np.array(ref_cents)\n> --\n> 2.34.1\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 079B6C322E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Dec 2023 09:39:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3DE8629E1;\n\tWed,  6 Dec 2023 10:39:07 +0100 (CET)","from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com\n\t[IPv6:2607:f8b0:4864:20::1131])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EC5161D9D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Dec 2023 10:39:05 +0100 (CET)","by mail-yw1-x1131.google.com with SMTP id\n\t00721157ae682-5d34f8f211fso70558137b3.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 01:39:05 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701855547;\n\tbh=j/a0mHijcmyrqCEaJe5KliJxJyJRLoLrHvdwn4YT40c=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=M/8MBbLvdtSFC4g2rfoI5zFPvGCzGadOoBj2z/TundNlA6cvR5pz+UeAtc8CL0y50\n\t/ZX+S2+/g3fAwj6pu1UWwPC7GNUWfM6ftkd/LKOordm4Yr0xRibqISpW0Vee9jqW1b\n\tFlTTAVl00rGSanWInioevx/FCmU62kV1FcfRORQBcQyBY04IZWRWpdPFPLfc/09xyz\n\tsz9op9XFXbXQHzUbc+78QfVyUTTZPKKs2myhKi5h9gek+ej2ZqXr1jz2iP6fYAS6j9\n\t8PMx+rJIWHNAejNjTggnvTu18I3lt//7T4vvUMvGHev5axNKEaSoYnFOqdFYKNtEw8\n\tzM3Org+9ScMtw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701855544; x=1702460344;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=u4Ep2aWtm8Na7ZTvtIpKgS4RZ4ruJHEPUEWqdI1+Mas=;\n\tb=QdFk+VX+gUBD85ltb4kB7/7gMbMKoWeSBTQ0ZSRY0+EI/2TkaJ1jYbDBnZ8AProvZF\n\tWBNdwMt0aXg4oqQxeAE9SddXQq7ONNbxpVEe1yFymAYZ6+QI7jUgi3Xj6Bu8E/IsN6fm\n\tiR0ItzaS/7NpYBz9jbcF5Bl+w3E9fmcEUeCR4s/EQjNGOmr+QIg5zNkZxIlayUsVXRCx\n\td0I7b121Gi2ihKBo6EBWIypg8uBame45lsjaLeEn3BiqjZIEA3XUMKkuos2B0jR0k1Jx\n\tmeXtR8T2jll1rAbnElgY4cfQp51Sfeb0VhVjwK9o+VK623nwmoUSb+pi1iHOjidfrq+t\n\t+v+w=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"QdFk+VX+\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701855544; x=1702460344;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=u4Ep2aWtm8Na7ZTvtIpKgS4RZ4ruJHEPUEWqdI1+Mas=;\n\tb=IpftOZir3Gyv8v/eaasYESShjZqmklyYozRtaapWyQq/xPoKbJJt35UsUE8Ka0rG0C\n\tVsBseti24xreuozKM60d/V6vNv/Dcryhb80QCAgtsS+f0X906vWtDwR6ekUpH5mHqmQA\n\tP9+1wdBHKge4aPLwEYFXmJpAc0fu0uNYfcgUkR46KaApOUNtdgtyiI5FgXp+zLvcdNSL\n\tk2fZkzMDgg3/ao/Eo3PxXSHcznksZulEY/jt/RkX/fbfKIgv/Vi4JEsBPQ3LWlC85mFi\n\tpSGE1LGgwGJWX1jMJUHBb9nkW4YHuNz849UgwMZnLBENKxdj+WR+qCAHYFWiyYrMN+Gb\n\tu/Qw==","X-Gm-Message-State":"AOJu0Yz5C1hwooQKqHqRF0/6BJxm4tLHPRLkHgM3ieYTDs9w3ZbVPe7z\n\tr706RZk9RzzU4TtLxQvpKLEHXi9gEW/yN8oVoUA0+Q==","X-Google-Smtp-Source":"AGHT+IGMUoteSGGygv8c8XTM4xlfzdRi9Dt7vLEWc5TmQpYtE1O+IVV2B5qXV4dzBViT0IvFXWLvALj6UbmJyWKSQ+w=","X-Received":"by 2002:a81:6d87:0:b0:5d9:602d:7dde with SMTP id\n\ti129-20020a816d87000000b005d9602d7ddemr539937ywc.3.1701855544157;\n\tWed, 06 Dec 2023 01:39:04 -0800 (PST)","MIME-Version":"1.0","References":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","In-Reply-To":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","Date":"Wed, 6 Dec 2023 09:38:37 +0000","Message-ID":"<CAEmqJPrj2Y3qNb2L5KQKo=cF623Rm1d_3aCVwGLZTf_5pikBKQ@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28392,"web_url":"https://patchwork.libcamera.org/comment/28392/","msgid":"<170473457340.3044059.2400400976046093504@ping.linuxembedded.co.uk>","date":"2024-01-08T17:22:53","subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman via libcamera-devel (2023-12-01 11:07:53)\n> Previously the code would brighten up images in case the Macbeth Chart\n> is slightly dark, and also zoom in on sections of it to look for\n> charts occupying less of the field of view. But it would not do both\n> together.\n> \n> This change makes the search for smaller charts also repeat that\n> search for the brightened up images that it made earlier, thereby\n> increasing the chances of success for non-optimal tuning images.\n> \n> There are also a couple of very small drive-by typo fixes.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nAnd also I believe:\n\nTested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 69 ++++++++++++--------\n>  1 file changed, 40 insertions(+), 29 deletions(-)\n> \n> diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> index 3e95df89..178aeed0 100644\n> --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> @@ -57,6 +57,10 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      \"\"\"\n>      cor, mac, coords, msg = get_macbeth_chart(img, ref_data)\n>  \n> +    # Keep a list that will include this and any brightened up versions of\n> +    # the image for reuse.\n> +    all_images = [img]\n> +\n>      \"\"\"\n>      following bits of code tries to fix common problems with simple\n>      techniques.\n> @@ -71,6 +75,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 2\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -81,6 +86,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 4\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -128,23 +134,26 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_inc = int(h/6)\n>          \"\"\"\n>          for each subselection, look for a macbeth chart\n> +        loop over this and any brightened up images that we made to increase the\n> +        likelihood of success\n>          \"\"\"\n> -        for i in range(3):\n> -            for j in range(3):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                \"\"\"\n> -                if the correlation is better than the best then record the\n> -                scale and current subselection at which macbeth chart was\n> -                found. Also record the coordinates, macbeth chart and message.\n> -                \"\"\"\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 1\n> +        for img_br in all_images:\n> +            for i in range(3):\n> +                for j in range(3):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> +                    \"\"\"\n> +                    if the correlation is better than the best then record the\n> +                    scale and current subselection at which macbeth chart was\n> +                    found. Also record the coordinates, macbeth chart and message.\n> +                    \"\"\"\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 1\n>  \n>      \"\"\"\n>      scale 2\n> @@ -157,17 +166,19 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_sel = int(h/2)\n>          w_inc = int(w/8)\n>          h_inc = int(h/8)\n> -        for i in range(5):\n> -            for j in range(5):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 2\n> +        # Again, loop over any brightened up images as well\n> +        for img_br in all_images:\n> +            for i in range(5):\n> +                for j in range(5):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 2\n>  \n>      \"\"\"\n>      The following code checks for macbeth charts at even smaller scales. This\n> @@ -238,7 +249,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      print error or success message\n>      \"\"\"\n>      print(msg)\n> -    Cam.log += '\\n' + msg\n> +    Cam.log += '\\n' + str(msg)\n>      if msg == success_msg:\n>          coords_fit = coords\n>          Cam.log += '\\nMacbeth chart vertices:\\n'\n> @@ -606,7 +617,7 @@ def get_macbeth_chart(img, ref_data):\n>                      '\\nNot enough squares found'\n>                      '\\nPossible problems:\\n'\n>                      '- Macbeth chart is occluded\\n'\n> -                    '- Macbeth chart is too dark of bright\\n'\n> +                    '- Macbeth chart is too dark or bright\\n'\n>                  )\n>  \n>              ref_cents = np.array(ref_cents)\n> -- \n> 2.34.1\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 24B25BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Jan 2024 17:22:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73EB462B31;\n\tMon,  8 Jan 2024 18:22:57 +0100 (CET)","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 C164D61D7E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Jan 2024 18:22:55 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 31D53552;\n\tMon,  8 Jan 2024 18:21:52 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704734577;\n\tbh=ETeTO3TP8j9cpOTVWn0Pb7Zv/lp1aNG10iMVYA66iYs=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=rpX5ZBXWX0Eg1/JpQ5dug+CRfazrZaIn1Agb8xPBiC0yFcOuaaCJXs/dx5idesj/i\n\tz+vdrAo/2P4JG5bp01PmYduZRrfYOHOufu0MyvRZNHQOpDtH4D3jSSoagu5Jfn4n+I\n\t5XOQBu7Wv4aw5ZbW9Q+lXIbp84hZBGVJJAY7dyN2MoklCCxkU9cGpgoiT6RhjlQZz+\n\tsGIsBv9q0RphrkN0AZPFKZx0klRr6XZRupXvIKqCAK87xJA//SMlLtidsxvJrNK4sM\n\tiww9gUqez7xqenJMTY8E9mTLRbhUNGj/QDFRCjPnFv7jbL3GpnNUIXhdYFRdXVBcog\n\tDhQiR4ySJa+XA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704734512;\n\tbh=ETeTO3TP8j9cpOTVWn0Pb7Zv/lp1aNG10iMVYA66iYs=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=IUKRkSHQixiofbsV/krBQ+BCzHghqQ/tG3RsWB/Hi7l5WSpkiHjOcB8nIXj/QVY1u\n\tZ/vCUKrpEMdnHGOODrJuC8AvSKLI/InxC9CEPI+6vrz6Fv9D/KNSeu12Wc8XfGSnZX\n\t34Tujtjzyb/mfWc6draxc/CWdksrL4iPpZeBMOS4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IUKRkSHQ\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","References":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 08 Jan 2024 17:22:53 +0000","Message-ID":"<170473457340.3044059.2400400976046093504@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28395,"web_url":"https://patchwork.libcamera.org/comment/28395/","msgid":"<170473626157.3044059.8454314884858714186@ping.linuxembedded.co.uk>","date":"2024-01-08T17:51:01","subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman via libcamera-devel (2023-12-01 11:07:53)\n> Previously the code would brighten up images in case the Macbeth Chart\n> is slightly dark, and also zoom in on sections of it to look for\n> charts occupying less of the field of view. But it would not do both\n> together.\n> \n> This change makes the search for smaller charts also repeat that\n> search for the brightened up images that it made earlier, thereby\n> increasing the chances of success for non-optimal tuning images.\n> \n> There are also a couple of very small drive-by typo fixes.\n> \n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 69 ++++++++++++--------\n>  1 file changed, 40 insertions(+), 29 deletions(-)\n> \n> diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> index 3e95df89..178aeed0 100644\n> --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> @@ -57,6 +57,10 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      \"\"\"\n>      cor, mac, coords, msg = get_macbeth_chart(img, ref_data)\n>  \n> +    # Keep a list that will include this and any brightened up versions of\n> +    # the image for reuse.\n> +    all_images = [img]\n> +\n>      \"\"\"\n>      following bits of code tries to fix common problems with simple\n>      techniques.\n> @@ -71,6 +75,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 2\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -81,6 +86,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      if cor < 0.75:\n>          a = 4\n>          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> +        all_images.append(img_br)\n>          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n>          if cor_b > cor:\n>              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> @@ -128,23 +134,26 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_inc = int(h/6)\n>          \"\"\"\n>          for each subselection, look for a macbeth chart\n> +        loop over this and any brightened up images that we made to increase the\n> +        likelihood of success\n>          \"\"\"\n> -        for i in range(3):\n> -            for j in range(3):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                \"\"\"\n> -                if the correlation is better than the best then record the\n> -                scale and current subselection at which macbeth chart was\n> -                found. Also record the coordinates, macbeth chart and message.\n> -                \"\"\"\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 1\n> +        for img_br in all_images:\n> +            for i in range(3):\n> +                for j in range(3):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n\nCheckstyle jumps up here:\n\n+++ utils/raspberrypi/ctt/ctt_macbeth_locator.py\n#143: : E226 missing whitespace around arithmetic operator\n+                    w_s, h_s = i*w_inc, j*h_inc\n#143: : E226 missing whitespace around arithmetic operator\n+                    w_s, h_s = i*w_inc, j*h_inc\n#144: : E226 missing whitespace around arithmetic operator\n+                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n#144: : E226 missing whitespace around arithmetic operator\n+                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n#173: : E226 missing whitespace around arithmetic operator\n+                    w_s, h_s = i*w_inc, j*h_inc\n#173: : E226 missing whitespace around arithmetic operator\n+                    w_s, h_s = i*w_inc, j*h_inc\n#174: : E226 missing whitespace around arithmetic operator\n+                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n#174: : E226 missing whitespace around arithmetic operator\n+                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n---\n8 potential issues detected, please review\n\n\nWhat would you prefer to do here?\n\n--\nKieran\n\n\n\n> +                    \"\"\"\n> +                    if the correlation is better than the best then record the\n> +                    scale and current subselection at which macbeth chart was\n> +                    found. Also record the coordinates, macbeth chart and message.\n> +                    \"\"\"\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 1\n>  \n>      \"\"\"\n>      scale 2\n> @@ -157,17 +166,19 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>          h_sel = int(h/2)\n>          w_inc = int(w/8)\n>          h_inc = int(h/8)\n> -        for i in range(5):\n> -            for j in range(5):\n> -                w_s, h_s = i*w_inc, j*h_inc\n> -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> -                if cor_ij > cor:\n> -                    cor = cor_ij\n> -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> -                    ii, jj = i, j\n> -                    w_best, h_best = w_inc, h_inc\n> -                    d_best = 2\n> +        # Again, loop over any brightened up images as well\n> +        for img_br in all_images:\n> +            for i in range(5):\n> +                for j in range(5):\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> +                    if cor_ij > cor:\n> +                        cor = cor_ij\n> +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> +                        ii, jj = i, j\n> +                        w_best, h_best = w_inc, h_inc\n> +                        d_best = 2\n>  \n>      \"\"\"\n>      The following code checks for macbeth charts at even smaller scales. This\n> @@ -238,7 +249,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n>      print error or success message\n>      \"\"\"\n>      print(msg)\n> -    Cam.log += '\\n' + msg\n> +    Cam.log += '\\n' + str(msg)\n>      if msg == success_msg:\n>          coords_fit = coords\n>          Cam.log += '\\nMacbeth chart vertices:\\n'\n> @@ -606,7 +617,7 @@ def get_macbeth_chart(img, ref_data):\n>                      '\\nNot enough squares found'\n>                      '\\nPossible problems:\\n'\n>                      '- Macbeth chart is occluded\\n'\n> -                    '- Macbeth chart is too dark of bright\\n'\n> +                    '- Macbeth chart is too dark or bright\\n'\n>                  )\n>  \n>              ref_cents = np.array(ref_cents)\n> -- \n> 2.34.1\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 A48C7BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  8 Jan 2024 17:51:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 076C462B49;\n\tMon,  8 Jan 2024 18:51:06 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 323F862B31\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  8 Jan 2024 18:51:04 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A7E64552;\n\tMon,  8 Jan 2024 18:50:00 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704736266;\n\tbh=bifI8CUegxyvXvFQ2ofwnuzemfpD7PrJCfprid47jbw=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=HYEm5twMmC9O5eT8zafY1fxTiogX3mjn439hVV29j+htLLwDkcp3BLqbGw5yHBmRh\n\tl/iALmSilS0j4Ot+1/wPupi7BPelBJcNoh0cEk523Lh0xTMF0mtc1zqqmUowtSNTRp\n\teMu77vS0XOPqbWvr5tMFXjmmd20k06Bs2fCiDCKn1reRJ6GK433uWW1jOjYaeR7K9M\n\to2eA9WhUZ0eL0VXwDqD1f5OSlYC0vflTwV/TBdfVTcLbCclJ89H6C7YDa+bsPN+K69\n\tJnEzA9Hh+ef9LweozguWq7eI8CiW7uZAoModDI3hY6Hk7PX5ud/UVo2V+bUndslAQI\n\tIhBq6aTPCrB+A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704736200;\n\tbh=bifI8CUegxyvXvFQ2ofwnuzemfpD7PrJCfprid47jbw=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=is6cUtCAztYW3L8rpx0BiAwarYPmQvav5vsFxxmvoATCqZsOn3naGQClCHarw1qb3\n\tlmd8KSC3rHYmDVeXWytfg1dq1Nb+RSuK9NHxt/7ReQ4UKO/hl0j+gKFR3sjsJwX0ee\n\tccfJhqBTRx8uIaWRpMoUOMSpp6ZWt8QKv+L8EiCo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"is6cUtCA\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","References":"<20231201110753.4288-1-david.plowman@raspberrypi.com>","To":"David Plowman <david.plowman@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 08 Jan 2024 17:51:01 +0000","Message-ID":"<170473626157.3044059.8454314884858714186@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28396,"web_url":"https://patchwork.libcamera.org/comment/28396/","msgid":"<CAHW6GYL2PNbzTcWprLajWbAJ4DTZ7++uV9yTtBg9Urt=HhVG1g@mail.gmail.com>","date":"2024-01-09T08:57:09","subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Kieran\n\nIt looks like those are really just bits of code that have had their\nindentation changed, but have otherwise always been there, is that\nright? I think I'd rather do a separate clean-up-the-style-complaints\npatch, if that's OK?\n\nDavid\n\nOn Mon, 8 Jan 2024 at 17:51, Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Quoting David Plowman via libcamera-devel (2023-12-01 11:07:53)\n> > Previously the code would brighten up images in case the Macbeth Chart\n> > is slightly dark, and also zoom in on sections of it to look for\n> > charts occupying less of the field of view. But it would not do both\n> > together.\n> >\n> > This change makes the search for smaller charts also repeat that\n> > search for the brightened up images that it made earlier, thereby\n> > increasing the chances of success for non-optimal tuning images.\n> >\n> > There are also a couple of very small drive-by typo fixes.\n> >\n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 69 ++++++++++++--------\n> >  1 file changed, 40 insertions(+), 29 deletions(-)\n> >\n> > diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > index 3e95df89..178aeed0 100644\n> > --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > @@ -57,6 +57,10 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >      \"\"\"\n> >      cor, mac, coords, msg = get_macbeth_chart(img, ref_data)\n> >\n> > +    # Keep a list that will include this and any brightened up versions of\n> > +    # the image for reuse.\n> > +    all_images = [img]\n> > +\n> >      \"\"\"\n> >      following bits of code tries to fix common problems with simple\n> >      techniques.\n> > @@ -71,6 +75,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >      if cor < 0.75:\n> >          a = 2\n> >          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> > +        all_images.append(img_br)\n> >          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n> >          if cor_b > cor:\n> >              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> > @@ -81,6 +86,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >      if cor < 0.75:\n> >          a = 4\n> >          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> > +        all_images.append(img_br)\n> >          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n> >          if cor_b > cor:\n> >              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> > @@ -128,23 +134,26 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >          h_inc = int(h/6)\n> >          \"\"\"\n> >          for each subselection, look for a macbeth chart\n> > +        loop over this and any brightened up images that we made to increase the\n> > +        likelihood of success\n> >          \"\"\"\n> > -        for i in range(3):\n> > -            for j in range(3):\n> > -                w_s, h_s = i*w_inc, j*h_inc\n> > -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > -                \"\"\"\n> > -                if the correlation is better than the best then record the\n> > -                scale and current subselection at which macbeth chart was\n> > -                found. Also record the coordinates, macbeth chart and message.\n> > -                \"\"\"\n> > -                if cor_ij > cor:\n> > -                    cor = cor_ij\n> > -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > -                    ii, jj = i, j\n> > -                    w_best, h_best = w_inc, h_inc\n> > -                    d_best = 1\n> > +        for img_br in all_images:\n> > +            for i in range(3):\n> > +                for j in range(3):\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n>\n> Checkstyle jumps up here:\n>\n> +++ utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> #143: : E226 missing whitespace around arithmetic operator\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> #143: : E226 missing whitespace around arithmetic operator\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> #144: : E226 missing whitespace around arithmetic operator\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> #144: : E226 missing whitespace around arithmetic operator\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> #173: : E226 missing whitespace around arithmetic operator\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> #173: : E226 missing whitespace around arithmetic operator\n> +                    w_s, h_s = i*w_inc, j*h_inc\n> #174: : E226 missing whitespace around arithmetic operator\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> #174: : E226 missing whitespace around arithmetic operator\n> +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> ---\n> 8 potential issues detected, please review\n>\n>\n> What would you prefer to do here?\n>\n> --\n> Kieran\n>\n>\n>\n> > +                    \"\"\"\n> > +                    if the correlation is better than the best then record the\n> > +                    scale and current subselection at which macbeth chart was\n> > +                    found. Also record the coordinates, macbeth chart and message.\n> > +                    \"\"\"\n> > +                    if cor_ij > cor:\n> > +                        cor = cor_ij\n> > +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > +                        ii, jj = i, j\n> > +                        w_best, h_best = w_inc, h_inc\n> > +                        d_best = 1\n> >\n> >      \"\"\"\n> >      scale 2\n> > @@ -157,17 +166,19 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >          h_sel = int(h/2)\n> >          w_inc = int(w/8)\n> >          h_inc = int(h/8)\n> > -        for i in range(5):\n> > -            for j in range(5):\n> > -                w_s, h_s = i*w_inc, j*h_inc\n> > -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > -                if cor_ij > cor:\n> > -                    cor = cor_ij\n> > -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > -                    ii, jj = i, j\n> > -                    w_best, h_best = w_inc, h_inc\n> > -                    d_best = 2\n> > +        # Again, loop over any brightened up images as well\n> > +        for img_br in all_images:\n> > +            for i in range(5):\n> > +                for j in range(5):\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > +                    if cor_ij > cor:\n> > +                        cor = cor_ij\n> > +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > +                        ii, jj = i, j\n> > +                        w_best, h_best = w_inc, h_inc\n> > +                        d_best = 2\n> >\n> >      \"\"\"\n> >      The following code checks for macbeth charts at even smaller scales. This\n> > @@ -238,7 +249,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> >      print error or success message\n> >      \"\"\"\n> >      print(msg)\n> > -    Cam.log += '\\n' + msg\n> > +    Cam.log += '\\n' + str(msg)\n> >      if msg == success_msg:\n> >          coords_fit = coords\n> >          Cam.log += '\\nMacbeth chart vertices:\\n'\n> > @@ -606,7 +617,7 @@ def get_macbeth_chart(img, ref_data):\n> >                      '\\nNot enough squares found'\n> >                      '\\nPossible problems:\\n'\n> >                      '- Macbeth chart is occluded\\n'\n> > -                    '- Macbeth chart is too dark of bright\\n'\n> > +                    '- Macbeth chart is too dark or bright\\n'\n> >                  )\n> >\n> >              ref_cents = np.array(ref_cents)\n> > --\n> > 2.34.1\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 9CCA0C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 08:57:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 856CD62B41;\n\tTue,  9 Jan 2024 09:57:24 +0100 (CET)","from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com\n\t[IPv6:2607:f8b0:4864:20::f2b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D00D61D72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 09:57:22 +0100 (CET)","by mail-qv1-xf2b.google.com with SMTP id\n\t6a1803df08f44-680d4584a81so22468836d6.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 09 Jan 2024 00:57:22 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704790644;\n\tbh=sQ5VMiqCE9i/qBt+p7e98olLzajwEcwOeoK9DwsludU=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=RDqj0l4ldYA+jVHd78E/F71nGgZovTlJ2/dUuTPeQH/dETknQrK0tVdM8Bq8dCSP/\n\tz/+N1JoVyrBYNtgfKwOVF7Xoq+yazC2VEVpsoM2NA5CvWHNlm+CsG34+zuCUhss3T/\n\tr2skc0xUx8JL292Tbxm+8ClTDyi8KmyFxSrXrqwuwEQRX9mZxeLMetHlznRJK79uLF\n\t7JnSbOybXpAYNWmNVDuETCXZodmjOBeoqx76YDJnR00g3z6JuxEQGKwqLb7W1ZVrNa\n\tpY8XRSg2M+d9qOzf6MhoAUMuSBj/n8hyv998vxnFvTw89s1/Pi0cUN5a7fUY1tWP9o\n\tAXUqFf9pigKEg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1704790641; x=1705395441;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=G3qmq82vcH9DjEFJtJLXyaWwti5x7jPRfIHw0tYuhEg=;\n\tb=CuzOblPVa8Q3ysD4tyakO7D1j5kNc4YZVzOXxEetW2NANN6QLbsdOtx3Ebg6GFAuJU\n\ttAswP+rmoOwZLOnVVbdvuOJjgvg3bghdQq5pIuftjxCKHMEK+NaAiXWTPV3OA4RNzziq\n\tCZG8sbIcFSQ8BA38QXTbeD3IHEQ0XxQ5xpc4Q19TDUPkp6zUgqDqEHlEGi1QvAOXyoTt\n\t3K59WApZKixJJyA4qiGN+QxTpsjbt4cSanVNA4CjcGWaojFq1hnM/oeuMVFcWTwMIKBd\n\t1vpIciLSQIbzx64lCd+7ls9mC9aapaXcxOsFSnbqeUkXpTM+xppaRhBHiVZNZlyzJ19B\n\tHSiw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"CuzOblPV\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1704790641; x=1705395441;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=G3qmq82vcH9DjEFJtJLXyaWwti5x7jPRfIHw0tYuhEg=;\n\tb=g8/JKGgftAKZOD1o17mFfr8xAtQe5VcUzltOb0kFLRbaF1DfvUCZRcGnKy64Mzwkx2\n\t3xLnx8vp2PawE88aHooWxMmHalP0ikS5JdQz6eePwH4Y0UZf9nc05zPyeGtQeGtDpczg\n\tybe7l+FE0hpbsCKbgWIVfpzKp3sRC1Dk+ln15E2Sk2F6Dhiy4Ru5aDbt7co573JJAqPv\n\tLiEVt2ZS4DbPYqnJM5RPMeikpvVQ+MTZWYIA46wLbfdtelYLd7/gZndkxCHyesLTVNys\n\tCzvKqRDgRJNxHDkOSyTAbVWxVTH0Oe/b8wnZuEjsK65zqX5vMR8WEgtEmEH4dOqWN10d\n\t3cog==","X-Gm-Message-State":"AOJu0Yye5ZNMWB6lnW+LQY3NJF3nJXjFfYTW11LW1ZbO3ZELTcjGkdlS\n\tw2buCduL6lxOg37nwZ4WVnTgvmOMJ6+kQlmVAcVRb5KSvtsBIQ==","X-Google-Smtp-Source":"AGHT+IFvFWWnx4FLcb0/ABZqEsu+DRP+qYcFC5mHVKLA4PJoL2/XuxUOt82uRmR7xuSkM0mnRPvymtfgEi9ZtWdp6CY=","X-Received":"by 2002:ad4:5bc9:0:b0:680:cc00:3f49 with SMTP id\n\tt9-20020ad45bc9000000b00680cc003f49mr431033qvt.2.1704790640796;\n\tTue, 09 Jan 2024 00:57:20 -0800 (PST)","MIME-Version":"1.0","References":"<20231201110753.4288-1-david.plowman@raspberrypi.com>\n\t<170473626157.3044059.8454314884858714186@ping.linuxembedded.co.uk>","In-Reply-To":"<170473626157.3044059.8454314884858714186@ping.linuxembedded.co.uk>","Date":"Tue, 9 Jan 2024 08:57:09 +0000","Message-ID":"<CAHW6GYL2PNbzTcWprLajWbAJ4DTZ7++uV9yTtBg9Urt=HhVG1g@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","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>","From":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28398,"web_url":"https://patchwork.libcamera.org/comment/28398/","msgid":"<170479359332.3044059.2825994344392022884@ping.linuxembedded.co.uk>","date":"2024-01-09T09:46:33","subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting David Plowman (2024-01-09 08:57:09)\n> Hi Kieran\n> \n> It looks like those are really just bits of code that have had their\n> indentation changed, but have otherwise always been there, is that\n\nAha yes I missed that.\n\nYes, I'll merge this and we can do any python style formatting updates\nseparately.\n\n--\nKieran\n\n\n> right? I think I'd rather do a separate clean-up-the-style-complaints\n> patch, if that's OK?\n> \n> David\n> \n> On Mon, 8 Jan 2024 at 17:51, Kieran Bingham\n> <kieran.bingham@ideasonboard.com> wrote:\n> >\n> > Quoting David Plowman via libcamera-devel (2023-12-01 11:07:53)\n> > > Previously the code would brighten up images in case the Macbeth Chart\n> > > is slightly dark, and also zoom in on sections of it to look for\n> > > charts occupying less of the field of view. But it would not do both\n> > > together.\n> > >\n> > > This change makes the search for smaller charts also repeat that\n> > > search for the brightened up images that it made earlier, thereby\n> > > increasing the chances of success for non-optimal tuning images.\n> > >\n> > > There are also a couple of very small drive-by typo fixes.\n> > >\n> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  utils/raspberrypi/ctt/ctt_macbeth_locator.py | 69 ++++++++++++--------\n> > >  1 file changed, 40 insertions(+), 29 deletions(-)\n> > >\n> > > diff --git a/utils/raspberrypi/ctt/ctt_macbeth_locator.py b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > > index 3e95df89..178aeed0 100644\n> > > --- a/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > > +++ b/utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > > @@ -57,6 +57,10 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >      \"\"\"\n> > >      cor, mac, coords, msg = get_macbeth_chart(img, ref_data)\n> > >\n> > > +    # Keep a list that will include this and any brightened up versions of\n> > > +    # the image for reuse.\n> > > +    all_images = [img]\n> > > +\n> > >      \"\"\"\n> > >      following bits of code tries to fix common problems with simple\n> > >      techniques.\n> > > @@ -71,6 +75,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >      if cor < 0.75:\n> > >          a = 2\n> > >          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> > > +        all_images.append(img_br)\n> > >          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n> > >          if cor_b > cor:\n> > >              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> > > @@ -81,6 +86,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >      if cor < 0.75:\n> > >          a = 4\n> > >          img_br = cv2.convertScaleAbs(img, alpha=a, beta=0)\n> > > +        all_images.append(img_br)\n> > >          cor_b, mac_b, coords_b, msg_b = get_macbeth_chart(img_br, ref_data)\n> > >          if cor_b > cor:\n> > >              cor, mac, coords, msg = cor_b, mac_b, coords_b, msg_b\n> > > @@ -128,23 +134,26 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >          h_inc = int(h/6)\n> > >          \"\"\"\n> > >          for each subselection, look for a macbeth chart\n> > > +        loop over this and any brightened up images that we made to increase the\n> > > +        likelihood of success\n> > >          \"\"\"\n> > > -        for i in range(3):\n> > > -            for j in range(3):\n> > > -                w_s, h_s = i*w_inc, j*h_inc\n> > > -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > > -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > > -                \"\"\"\n> > > -                if the correlation is better than the best then record the\n> > > -                scale and current subselection at which macbeth chart was\n> > > -                found. Also record the coordinates, macbeth chart and message.\n> > > -                \"\"\"\n> > > -                if cor_ij > cor:\n> > > -                    cor = cor_ij\n> > > -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > > -                    ii, jj = i, j\n> > > -                    w_best, h_best = w_inc, h_inc\n> > > -                    d_best = 1\n> > > +        for img_br in all_images:\n> > > +            for i in range(3):\n> > > +                for j in range(3):\n> > > +                    w_s, h_s = i*w_inc, j*h_inc\n> > > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > > +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> >\n> > Checkstyle jumps up here:\n> >\n> > +++ utils/raspberrypi/ctt/ctt_macbeth_locator.py\n> > #143: : E226 missing whitespace around arithmetic operator\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > #143: : E226 missing whitespace around arithmetic operator\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > #144: : E226 missing whitespace around arithmetic operator\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > #144: : E226 missing whitespace around arithmetic operator\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > #173: : E226 missing whitespace around arithmetic operator\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > #173: : E226 missing whitespace around arithmetic operator\n> > +                    w_s, h_s = i*w_inc, j*h_inc\n> > #174: : E226 missing whitespace around arithmetic operator\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > #174: : E226 missing whitespace around arithmetic operator\n> > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > ---\n> > 8 potential issues detected, please review\n> >\n> >\n> > What would you prefer to do here?\n> >\n> > --\n> > Kieran\n> >\n> >\n> >\n> > > +                    \"\"\"\n> > > +                    if the correlation is better than the best then record the\n> > > +                    scale and current subselection at which macbeth chart was\n> > > +                    found. Also record the coordinates, macbeth chart and message.\n> > > +                    \"\"\"\n> > > +                    if cor_ij > cor:\n> > > +                        cor = cor_ij\n> > > +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > > +                        ii, jj = i, j\n> > > +                        w_best, h_best = w_inc, h_inc\n> > > +                        d_best = 1\n> > >\n> > >      \"\"\"\n> > >      scale 2\n> > > @@ -157,17 +166,19 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >          h_sel = int(h/2)\n> > >          w_inc = int(w/8)\n> > >          h_inc = int(h/8)\n> > > -        for i in range(5):\n> > > -            for j in range(5):\n> > > -                w_s, h_s = i*w_inc, j*h_inc\n> > > -                img_sel = img[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > > -                cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > > -                if cor_ij > cor:\n> > > -                    cor = cor_ij\n> > > -                    mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > > -                    ii, jj = i, j\n> > > -                    w_best, h_best = w_inc, h_inc\n> > > -                    d_best = 2\n> > > +        # Again, loop over any brightened up images as well\n> > > +        for img_br in all_images:\n> > > +            for i in range(5):\n> > > +                for j in range(5):\n> > > +                    w_s, h_s = i*w_inc, j*h_inc\n> > > +                    img_sel = img_br[w_s:w_s+w_sel, h_s:h_s+h_sel]\n> > > +                    cor_ij, mac_ij, coords_ij, msg_ij = get_macbeth_chart(img_sel, ref_data)\n> > > +                    if cor_ij > cor:\n> > > +                        cor = cor_ij\n> > > +                        mac, coords, msg = mac_ij, coords_ij, msg_ij\n> > > +                        ii, jj = i, j\n> > > +                        w_best, h_best = w_inc, h_inc\n> > > +                        d_best = 2\n> > >\n> > >      \"\"\"\n> > >      The following code checks for macbeth charts at even smaller scales. This\n> > > @@ -238,7 +249,7 @@ def find_macbeth(Cam, img, mac_config=(0, 0)):\n> > >      print error or success message\n> > >      \"\"\"\n> > >      print(msg)\n> > > -    Cam.log += '\\n' + msg\n> > > +    Cam.log += '\\n' + str(msg)\n> > >      if msg == success_msg:\n> > >          coords_fit = coords\n> > >          Cam.log += '\\nMacbeth chart vertices:\\n'\n> > > @@ -606,7 +617,7 @@ def get_macbeth_chart(img, ref_data):\n> > >                      '\\nNot enough squares found'\n> > >                      '\\nPossible problems:\\n'\n> > >                      '- Macbeth chart is occluded\\n'\n> > > -                    '- Macbeth chart is too dark of bright\\n'\n> > > +                    '- Macbeth chart is too dark or bright\\n'\n> > >                  )\n> > >\n> > >              ref_cents = np.array(ref_cents)\n> > > --\n> > > 2.34.1\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 25B54C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 09:46:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E2C7562B41;\n\tTue,  9 Jan 2024 10:46:37 +0100 (CET)","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 7B90361D72\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 10:46:36 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 61E63552;\n\tTue,  9 Jan 2024 10:45:32 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704793597;\n\tbh=PWRK2y1fQcjZVyiNx/okMWUX+pYW6qRvciYnqbvYuGA=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=d45sfHgtQp2Kr7cJ75XEV2PpI7hvgiSC56qGHlZfZDxl/r9g6OncSfON4JZv/8Ifd\n\th96cPFzW3sCQZY1GrmfDG5Fck81TJ/9Io6yVQr/IQjfRlNbNqnatHKKVdTkZvkOcs6\n\tSzCf5kVvHs/WK87noQ+wsxnmUJZ8Go1koPP6bBHPb+ywETahM6fdjGrQkPK85IPHoV\n\tSH98eJgRuf+WNjpwOtbt38VU+Udi7OWNuObFq4os7WSjJoz8lVSulu6uMy7jCMQJHr\n\tTHDNITpDn/U6XFxhjof6JsxgqUFbqz/7Idwyh+dtQ7kbG7k1MCuFyDZr9QZK/uNCbX\n\t3erO9ZN9pzJCw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704793532;\n\tbh=PWRK2y1fQcjZVyiNx/okMWUX+pYW6qRvciYnqbvYuGA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=iLM9Gesuut+pno0dRTc5eVEfqst7wVuaz4MI7vLPaVrg8J6XNXYpVs/1jmCPbQN4q\n\tR6V7yZf8fq4UmBZ0ufhtCqrsAWaCjP24hsPnBGE6PUenHjYUamwqPm+row22aFhRUb\n\tMzBU+DIikweqv3xUtf9aoI+KlsDatrwgyVNG9jM0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iLM9Gesu\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAHW6GYL2PNbzTcWprLajWbAJ4DTZ7++uV9yTtBg9Urt=HhVG1g@mail.gmail.com>","References":"<20231201110753.4288-1-david.plowman@raspberrypi.com>\n\t<170473626157.3044059.8454314884858714186@ping.linuxembedded.co.uk>\n\t<CAHW6GYL2PNbzTcWprLajWbAJ4DTZ7++uV9yTtBg9Urt=HhVG1g@mail.gmail.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Date":"Tue, 09 Jan 2024 09:46:33 +0000","Message-ID":"<170479359332.3044059.2825994344392022884@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Improve the\n\tMacbeth Chart search reliability","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]