Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sub Mat in mulidimensional Mat

I want convert some codes from python to c++ . for example we have 3 dimensional array like (25 * 40 * 10) and we want to separate array, in python we have numpy arrays and simply do it with:

Probs = Y[...,0]
Affines = Y[...,2:] 
rx,ry = Y.shape[:2]
ywh = Y.shape[1::-1]
iwh = np.array(I.shape[1::-1],dtype=float).reshape((2,1))

but how can I implement this line in c++ with Mat?

Sub Mat in mulidimensional Mat

I want to convert some codes from python to c++ . for example we have 3 dimensional array like (25 * 40 * 10) and we want to separate array, in python we have numpy arrays and simply do it with:

Probs = Y[...,0]
Affines = Y[...,2:] 
rx,ry = Y.shape[:2]
ywh = Y.shape[1::-1]
iwh = np.array(I.shape[1::-1],dtype=float).reshape((2,1))

but how can I implement this line in c++ with Mat?

click to hide/show revision 3
retagged

updated 2019-09-30 07:28:46 -0500

berak gravatar image

Sub Mat in mulidimensional Mat

I want to convert some codes from python to c++ . for example we have 3 dimensional array like (25 * 40 * 10) and we want to separate array, in python we have numpy arrays and simply do it with:

Probs = Y[...,0]
Affines = Y[...,2:] 
rx,ry = Y.shape[:2]
ywh = Y.shape[1::-1]
iwh = np.array(I.shape[1::-1],dtype=float).reshape((2,1))

but how can I implement this line in c++ with Mat?