Ask Your Question
2

cv2.split() doesn't work beyond 512

asked 2013-05-20 11:02:11 -0600

Abid Rahman K gravatar image

Hi, I have an array of size (10,10,1000) and I want to split it into 1000 arrays of 10x10. So I used cv2.split() function for that. But it doesn't work.

So, on close examination, I saw that cv2.split() doesn't work for arrays with depth more than 512.

See below :

In [101]: j = np.arange(3*3*512).reshape((3,3,512)); k = cv2.split(j); print len(k)
512

In [102]: j = np.arange(3*3*513).reshape((3,3,513)); k = cv2.split(j); print len(k)
1

What is the problem here ? Is it a bug or is there anything else to do to make it work ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-05-21 21:02:55 -0600

Abid Rahman K gravatar image

I got the answer here :

http://stackoverflow.com/questions/16653514/cv2-split-doesnt-work-beyond-512-channels

Open CV defines a maximum amount of channels with the variable CV_CN_MAX.

"The maximum possible number of channels is defined by the CV_CN_MAX constant, which is currently set to 512." You can read that here

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-20 11:02:11 -0600

Seen: 494 times

Last updated: May 21 '13