ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cvAlign Question

asked 2011-06-30 08:27:57 -0600

Kirielson gravatar image

Short version: Hello, I was wondering what cvAlign does in the inner functions.

Long version: I've been looking at cvCalcOpticalFlowPyrLK code and there's a function

pyrA = cvGetMat( pyrA, &pstubA );

if( pyrA->step*pyrA->height < icvMinimalPyramidSize( imgSize ) )
    CV_Error( CV_StsBadArg, "pyramid A has insufficient size" );

which then leads to this:

static int icvMinimalPyramidSize( CvSize imgSize )
{
    return cvAlign(imgSize.width,8) * imgSize.height / 3;
}

can anyone tell me what cvAlign does (is it bit alignment)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-06-30 09:08:16 -0600

Kirielson gravatar image

Okay I solved my problem. It seems for Python, at least where I'm running ROS's OpenCV for Python, the images and the pyramids are mixed up if you got the error: error: pyramid A has insufficient size. So wherever you would put your images, you would then put your pyramids and viceversa.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-06-30 08:27:57 -0600

Seen: 445 times

Last updated: Jun 30 '11