We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1902f8 commit 8491b94Copy full SHA for 8491b94
splitmergechannels.py
@@ -7,6 +7,7 @@
7
import argparse
8
import cv2
9
import numpy as np
10
+from numpy import dtype
11
12
#E:/naresh/learning/books/pyimage/Books/ppocv/code/images/trex.png
13
#ap = argparse.ArgumentParser()
@@ -16,7 +17,9 @@
16
17
image = cv2.imread("E:/naresh/learning/books/pyimage/Books/ppocv/code/images/trex.png")
18
19
b,g,r=cv2.split(image)
-cv2.imshow("blue",b)
20
+zero=np.zeros(image.shape[:2],dtype="uint8")
21
+blue=cv2.merge([b,zero,zero])
22
+cv2.imshow("original",image)
23
orimage=cv2.merge([b,g,r])
-cv2.imshow("ori",orimage)
-cv2.waitKey(0)
24
+cv2.imshow("blue",blue)
25
+cv2.waitKey(0)
0 commit comments