Show a patch.

GET /api/1.1/patches/20465/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 20465,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20465/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20465/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240628104828.2928109-7-stefan.klug@ideasonboard.com>",
    "date": "2024-06-28T10:46:59",
    "name": "[v2,06/25] libtuning: Fix imports",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8089ebf967e0577e0adb6fec140337333baa9e39",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20465/mbox/",
    "series": [
        {
            "id": 4430,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4430/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4430",
            "date": "2024-06-28T10:46:53",
            "name": "Add ccm calibration to libtuning",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4430/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20465/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20465/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 3EEF9BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Jun 2024 10:48:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0351C62E24;\n\tFri, 28 Jun 2024 12:48:58 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B8AE62CA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jun 2024 12:48:56 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:82ab:924:d918:cd24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 11173BEB;\n\tFri, 28 Jun 2024 12:48:32 +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=\"iq+uJxJV\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719571712;\n\tbh=Wa7unklc57RPxC0RmHXNKLkzAnKMCNb8aY1ShcdpRiM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=iq+uJxJVAXokFiehC+eNnEGLcyiTklfbxULkrL10+y0mRQ8Qr5DRQkEtBe8SSj18N\n\tKetsApBVWQGwGFDG3SogDfFYsRwRzsVS5n2mQUljc9rLzlgg7jgTNaP0IOKuaEWjhh\n\t1p3J8EKnpyaAFmlJ03+8OtwL5z2XeVng2CnMhumQ=",
        "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>",
        "Subject": "[PATCH v2 06/25] libtuning: Fix imports",
        "Date": "Fri, 28 Jun 2024 12:46:59 +0200",
        "Message-ID": "<20240628104828.2928109-7-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240628104828.2928109-1-stefan.klug@ideasonboard.com>",
        "References": "<20240628104828.2928109-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.  Added missing imports in macbeth.py\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@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": [
        "v2",
        "06/25"
    ]
}