Patch Detail
Show a patch.
GET /api/patches/20520/?format=api
{ "id": 20520, "url": "https://patchwork.libcamera.org/api/patches/20520/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20520/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20240703141726.252368-7-stefan.klug@ideasonboard.com>", "date": "2024-07-03T14:16:55", "name": "[v3,06/23] libtuning: Fix imports", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8089ebf967e0577e0adb6fec140337333baa9e39", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/20520/mbox/", "series": [ { "id": 4437, "url": "https://patchwork.libcamera.org/api/series/4437/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4437", "date": "2024-07-03T14:16:49", "name": "Add ccm calibration to libtuning", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4437/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20520/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20520/checks/", "tags": {}, "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 6E2FABEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 3 Jul 2024 14:17:53 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 146766333B;\n\tWed, 3 Jul 2024 16:17:53 +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 C6AE66333B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 3 Jul 2024 16:17:49 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:9263:c199:9587:576])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A88094CA;\n\tWed, 3 Jul 2024 16:17:21 +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=\"BacAVCJp\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1720016241;\n\tbh=7aE52oCUh9ZNIxxT8s5bnyRaWjcCtyo80eVfD4vW8jY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=BacAVCJptjzS1PwzFf/bNMTJBlOp2h9JRjEz2ZWWyJcjwAbbW12/FTCF6hikm/dU3\n\tgRP4S/KDlllQbkDxHkX2jzpiNcGsxJtVEGFFymh66D+C/iI5JNtVu1wxr3+c/cQsuo\n\tMl/nrdYBIjiaTDXovNBhuMwrbH9Y/sA+DCTaZDjo=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v3 06/23] libtuning: Fix imports", "Date": "Wed, 3 Jul 2024 16:16:55 +0200", "Message-ID": "<20240703141726.252368-7-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240703141726.252368-1-stefan.klug@ideasonboard.com>", "References": "<20240703141726.252368-1-stefan.klug@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>" }, "content": "Fix imports to match new structure in the files copied from Raspberry\nPi. Add missing imports in macbeth.py.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/tuning/libtuning/ctt_awb.py | 4 +++-\n utils/tuning/libtuning/ctt_ccm.py | 12 +++++++-----\n utils/tuning/libtuning/macbeth.py | 5 +++++\n 3 files changed, 15 insertions(+), 6 deletions(-)", "diff": "diff --git a/utils/tuning/libtuning/ctt_awb.py b/utils/tuning/libtuning/ctt_awb.py\nindex 5ba6f978a228..f3a1ce779e21 100644\n--- a/utils/tuning/libtuning/ctt_awb.py\n+++ b/utils/tuning/libtuning/ctt_awb.py\n@@ -4,10 +4,12 @@\n #\n # camera tuning tool for AWB\n \n-from ctt_image_load import *\n import matplotlib.pyplot as plt\n from bisect import bisect_left\n from scipy.optimize import fmin\n+import numpy as np\n+\n+from .image import Image\n \n \n \"\"\"\ndiff --git a/utils/tuning/libtuning/ctt_ccm.py b/utils/tuning/libtuning/ctt_ccm.py\nindex 59753e332ee9..f37adaf45538 100644\n--- a/utils/tuning/libtuning/ctt_ccm.py\n+++ b/utils/tuning/libtuning/ctt_ccm.py\n@@ -4,12 +4,14 @@\n #\n # camera tuning tool for CCM (colour correction matrix)\n \n-from ctt_image_load import *\n-from ctt_awb import get_alsc_patches\n-import colors\n-from scipy.optimize import minimize\n-from ctt_visualise import visualise_macbeth_chart\n import numpy as np\n+from scipy.optimize import minimize\n+\n+from . import ctt_colors as colors\n+from .image import Image\n+from .ctt_awb import get_alsc_patches\n+from .utils import visualise_macbeth_chart\n+\n \"\"\"\n takes 8-bit macbeth chart values, degammas and returns 16 bit\n \"\"\"\ndiff --git a/utils/tuning/libtuning/macbeth.py b/utils/tuning/libtuning/macbeth.py\nindex 81f3e87c9088..265a33d68378 100644\n--- a/utils/tuning/libtuning/macbeth.py\n+++ b/utils/tuning/libtuning/macbeth.py\n@@ -1,6 +1,7 @@\n # SPDX-License-Identifier: BSD-2-Clause\n #\n # Copyright (C) 2019, Raspberry Pi Ltd\n+# Copyright (C) 2024, Ideas on Board Oy\n #\n # Locate and extract Macbeth charts from images\n # (Copied from: ctt_macbeth_locator.py)\n@@ -11,6 +12,10 @@ import cv2\n import os\n from pathlib import Path\n import numpy as np\n+import warnings\n+from sklearn import cluster as cluster\n+\n+from .ctt_ransac import get_square_verts, get_square_centres\n \n from libtuning.image import Image\n \n", "prefixes": [ "v3", "06/23" ] }