2020-09-26 08:07:05 -0600 | received badge | ● Popular Question (source) |
2015-03-03 05:58:18 -0600 | commented question | cvtColor TypeError: BGR2GRAY works with my images, and I can imshow, and imwrite the output. However using demosaicing (CV_BayerGR2BGR=49) the out = cv2.cvtColor(img,49,3) syntax does not work because the output does not pass the test for 3 or 4 channels: cv2.error: demosaicing.cpp:1647: error: (-215) scn == 1 && (dcn == 3 || dcn == 4) in function demosaicing Using the alternate form: cv2.cvtColor(img, out, 49) when out is defined as 3 band, passes the test but fails with the TypeError: TypeError: only length-1 arrays can be converted to Python scalars |
2015-03-02 13:06:41 -0600 | asked a question | cvtColor TypeError: TypeError: only length-1 arrays can be converted to Python scalars These are the images: This is my problem: Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: only length-1 arrays can be converted to Python scalars |