diff --git a/test/2024,9,10/.idea/.gitignore b/test/2024,9,10/.idea/.gitignore new file mode 100644 index 0000000..359bb53 --- /dev/null +++ b/test/2024,9,10/.idea/.gitignore @@ -0,0 +1,3 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml diff --git a/test/2024,9,10/.idea/2024,9,10.iml b/test/2024,9,10/.idea/2024,9,10.iml new file mode 100644 index 0000000..d0876a7 --- /dev/null +++ b/test/2024,9,10/.idea/2024,9,10.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test/2024,9,10/.idea/inspectionProfiles/profiles_settings.xml b/test/2024,9,10/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/test/2024,9,10/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/test/2024,9,10/.idea/misc.xml b/test/2024,9,10/.idea/misc.xml new file mode 100644 index 0000000..12e1d9d --- /dev/null +++ b/test/2024,9,10/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/test/2024,9,10/.idea/modules.xml b/test/2024,9,10/.idea/modules.xml new file mode 100644 index 0000000..5630355 --- /dev/null +++ b/test/2024,9,10/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test/2024,9,10/.idea/vcs.xml b/test/2024,9,10/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/test/2024,9,10/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/2024,9,10/main.py b/test/2024,9,10/main.py new file mode 100644 index 0000000..11a8fb4 --- /dev/null +++ b/test/2024,9,10/main.py @@ -0,0 +1,25 @@ +import cv2 as cv + +# read image +img = cv.imread("opencv_logo.png",cv.IMREAD_UNCHANGED) + +# get height and width, channel of img +height,width,channel=img.shape + +# show infos +print("height=\t",height) +print("width=\t",width) +print("channel=\t",height) + +# split channels +blue,green,red=cv.split(img) + +# show channels +## red channel +#cv.imshow("channel", red) +## green channel +cv.imshow("channel", green) +## blue channel +#cv.imshow("channel", blue) +cv.waitKey(0) +cv.destroyWindow("channel") \ No newline at end of file diff --git a/test/2024,9,10/opencv_logo.png b/test/2024,9,10/opencv_logo.png new file mode 100644 index 0000000..a3aa906 Binary files /dev/null and b/test/2024,9,10/opencv_logo.png differ