Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using cv reduce in Python

I'm trying to use cv reduce to get the projection of an image onto the x and y axis.

I used:

x_sum = cv2.reduce(img, 0,, cv2.CV_32S)

I get this error:

OpenCV Error: Unsupported format or combination of formats (Unsupported combination of input and output array formats) in reduce.

I can't find any more detailed documentation on how to use reduce in Python. Does anyone know where I've gone wrong?

Alternatively, is there another method I could use? calcHist() seems to only find the colour histogram of the image.