From patchwork Wed Oct 19 11:41:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 17638 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 1A011C0DA4 for ; Wed, 19 Oct 2022 11:42:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C512C62DFA; Wed, 19 Oct 2022 13:41:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1666179719; bh=F1Gkgb7lvFUF2jwLCrk43RD7/k0Fqqk3uMaTgeRwmM8=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=sZSMukAwcdT/5xBkMSN4kCvwheZprYDzlt/C4av8ZZo9RoPI8uEyJkM0XUaoB9yP2 d3Xt4VgiH2GvaE95rARd4LaFDboMAUccy7bmo8bX1n/o2YSzFbZ3b7n9XyVOQMbIFn n5Zs7VFAPcj4/2+T8RzbWNRmiY04C5SJ7o4kA6My8Jx89dhiGCpc8/5uUsXhs/36Bm hZY9Mz6NN/3+k3KVfZ2pgKvQxQD2vkbEd6U8Pr2PhJHgrMb58xtXTQrZmT7z+/XfOu 0nA/y4O3iW16apR91TjXtihZ2gmG8NsdeWKi7yDbyIlK8hgLQcGMeUcY+hE/faBhkq J5PKXP4XgI2gw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6785A62DFA for ; Wed, 19 Oct 2022 13:41:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Xxni9UsX"; dkim-atps=neutral Received: from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp [175.177.42.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EE0145A4; Wed, 19 Oct 2022 13:41:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1666179718; bh=F1Gkgb7lvFUF2jwLCrk43RD7/k0Fqqk3uMaTgeRwmM8=; h=From:To:Cc:Subject:Date:From; b=Xxni9UsXP4yj3D9Wa2gAFwZ1lv9y6xPGQ493GywMTrqnGq5BUJu8uQyVY0nM9LZPy w6rk0IhpGIp5pR40tpyC4rZeea6BsAZGuCqsG7YDe6nGjpy5VF3/o/MqKUid+NJ0ip jEjURYmQmz5I9SgmqHYqGt8CqwLwu1UE+eCgnm20= To: libcamera-devel@lists.libcamera.org Date: Wed, 19 Oct 2022 20:41:43 +0900 Message-Id: <20221019114143.479093-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] utils: raspberrypi: ctt: Fix alsc green averaging 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: Paul Elder via libcamera-devel From: Paul Elder Reply-To: Paul Elder Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The alsc component of ctt meant to average the two green channels into one, but used incorrect indexing resulting in only the first green channel being used. Fix this. Signed-off-by: Paul Elder Reviewed-by: Laurent Pinchart Reviewed-by: David Plowman --- utils/raspberrypi/ctt/ctt_alsc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/raspberrypi/ctt/ctt_alsc.py b/utils/raspberrypi/ctt/ctt_alsc.py index c0ba7b63..e51d6931 100644 --- a/utils/raspberrypi/ctt/ctt_alsc.py +++ b/utils/raspberrypi/ctt/ctt_alsc.py @@ -132,7 +132,7 @@ def alsc(Cam, Img, do_alsc_colour, plot=False): """ average the green channels into one """ - av_ch_g = np.mean((channels[1:2]), axis=0) + av_ch_g = np.mean((channels[1:3]), axis=0) if do_alsc_colour: """ obtain 16x12 grid of intensities for each channel and subtract black level