From patchwork Thu Jul 6 01:39:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Benson X-Patchwork-Id: 18799 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 8D1E5BDC71 for ; Fri, 7 Jul 2023 13:41:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C1A21628C6; Fri, 7 Jul 2023 15:41:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1688737282; bh=j4dRUEGnlluc4jdH6v3D4KjTa9C7hzGrjUItTCb52Vg=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=DfvfFOxflE29EZN+Mc/66tFzSfUR8gCcdDomihMVfM1oLfESmXlpdL011dne7C8sE 4L+KysmLC3+LQQQ4DUolJPPh1AIZzy7iTLDdaY+QL2HYi8TzlBfj8aB7POBTWodAG9 K0v9OZtRMfwwxb9t1KY5qgqacdo9BZntO9eKqf6/OPiuldTNeKGq1qLBFpRgJqaGdM 0fRoGiV1jtn1HFpR7NzRhZGvAOOLVAO6NbTddseQXWczzeRs8swFU8Trp2BffcB8jC 635UGf3j7thg+651sz/6mydSxhmC8AnK8Fi0+H4lj61PIzG1UnsflF/ZJLSgSrIxj6 sVNFf9Zy9k/ww== Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0789461E34 for ; Fri, 7 Jul 2023 14:07:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="oACcazfe"; dkim-atps=neutral Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so22781425e9.2 for ; Fri, 07 Jul 2023 05:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1688731664; x=1691323664; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yHw6REJa5lNlQKimXHEzzd+9856lwf9UXubEI4AyGbE=; b=oACcazfeB4iWOzFdNGs7ipM+eN+Aqv3oqrRWQMxDet+9a+Si6keYnOrM8tuWCgemwB FNiYXLKizMjjpGmcsek8PPJsU0Xx5fgjmoGmOQuqzKxiRxu0UOhZX686BNkLI0+o5+AC Bx7wo1TGaH2ByWbpXd9R9O1jFnpZxO0LjCfHS/N0Ui7SrwYypKdQvqpMkCKgobgyX1y5 C0GF4QKZvaK7q1rqUCH4t/DCLZEfLUG+ERV/hkEipnaZpfOiLf1l10nDUb6STd3h65iD rvK5WyWJIHmBzEzvqFHs4TLMV3MJyRd5mcGT0FlCcWZkyJBG3RDHIvmtC5+F4Anp7BWj RMaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688731664; x=1691323664; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yHw6REJa5lNlQKimXHEzzd+9856lwf9UXubEI4AyGbE=; b=E0vyKTAsVSHI2mUhJySlynj8cnJAXY2QfyXRvPUDlT5K+IeomDgX8ODMhbZmmJsKWe whH2j0Y2jKveH3WIGXrfJLq84RwfY8jkQUSYerqUOPJ5rf7tVNSSzdovwS5TeAH6wy6q tq+7pTcgXDc6mmE4KAiBVKYXKw3bI6sjtpV0jo7Tx8I8vTXXvezkk+PROZUWtoDOPa6C LxPlz3y/Vx24ar6BMqsUqRPotteKYIerhqWeBOJdw9Oj+ZdPu3LLWXcKLht2BAob2Ded /R9x53t3Ps5GCLODejj/bwyXWQb3d6mke9UE7P07rCooP1HWs+DBfY36A2lfnBFVdZ7C YdxA== X-Gm-Message-State: ABy/qLZncluOty5nOqYfUJTiOSWm5Szhpz1BJ0GaPDG2j0HMiTXm8xPD qJBX8ezu5b+GA1nDbtWavXtD6KobOY3/oQ/IU3KKBQ== X-Google-Smtp-Source: APBJJlGH/qLaCX4znRSETBVNPslKaRau8PCqLrnzUOKrkjy+RXSxVW6dBbB2Gejqs7Ekn1QYggh+bw== X-Received: by 2002:a05:600c:2907:b0:3fb:b3aa:1c87 with SMTP id i7-20020a05600c290700b003fbb3aa1c87mr5482864wmd.40.1688731664246; Fri, 07 Jul 2023 05:07:44 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id z13-20020a7bc7cd000000b003fc0062f0f8sm1155915wmk.9.2023.07.07.05.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jul 2023 05:07:43 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 6 Jul 2023 02:39:23 +0100 Message-Id: <20230706013926.218131-1-ben.benson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 07 Jul 2023 15:41:21 +0200 Subject: [libcamera-devel] [PATCH 0/3] Raspberry Pi Color Matrix and Tuning Tool Improvements X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ben Benson via libcamera-devel From: Ben Benson Reply-To: Ben Benson Cc: Ben Benson Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" There are 3 commits here that: 1. Improves the color matrirx fitting 2. Replaces the color matrices in the tuning files 3. tidies up the code in the tuning tool Thanks! Ben Ben Benson (3): utils: raspberrypi: ctt: Improved color matrix fitting ipa: rpi: vc4: data: Updated color matrices for RPi Cameras utils: raspberrypi: ctt: Code tidying src/ipa/rpi/vc4/data/imx219.json | 66 +++---- src/ipa/rpi/vc4/data/imx296.json | 160 +++------------ src/ipa/rpi/vc4/data/imx477.json | 93 +++------ src/ipa/rpi/vc4/data/imx708.json | 139 ++----------- src/ipa/rpi/vc4/data/imx708_wide.json | 49 +++-- src/ipa/rpi/vc4/data/ov5647.json | 66 +++---- utils/raspberrypi/ctt/colors.py | 30 +++ utils/raspberrypi/ctt/ctt_ccm.py | 259 +++++++++++++++++++++---- utils/raspberrypi/ctt/ctt_visualise.py | 38 ++++ 9 files changed, 437 insertions(+), 463 deletions(-) create mode 100644 utils/raspberrypi/ctt/colors.py create mode 100644 utils/raspberrypi/ctt/ctt_visualise.py