From e39389cf7ad1d888ea889b63558ad51fa77971e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=A1=E5=9D=82=E6=98=B4?= Date: Tue, 10 Sep 2024 10:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=B8=89=E4=B8=AA=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=98=BE=E7=A4=BArgb=E9=80=9A=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/2024,9,10/main.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/2024,9,10/main.py b/test/2024,9,10/main.py index 11a8fb4..9eae4cd 100644 --- a/test/2024,9,10/main.py +++ b/test/2024,9,10/main.py @@ -7,19 +7,24 @@ img = cv.imread("opencv_logo.png",cv.IMREAD_UNCHANGED) height,width,channel=img.shape # show infos +print(img.shape) print("height=\t",height) print("width=\t",width) -print("channel=\t",height) +print("channel=\t",channel) # split channels blue,green,red=cv.split(img) # show channels ## red channel -#cv.imshow("channel", red) +cv.namedWindow("red channel") +cv.imshow("red channel", red) ## green channel -cv.imshow("channel", green) +cv.namedWindow("green channel") +cv.imshow("green channel", green) ## blue channel -#cv.imshow("channel", blue) +cv.namedWindow("blue channel") +cv.imshow("blue channel", blue) + cv.waitKey(0) -cv.destroyWindow("channel") \ No newline at end of file +cv.destroyAllWindows() \ No newline at end of file