StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

mooshueting
I've used FindFundamentalMat with a CvMat I've created from the points generated by FindChessboardCorners. The documentation specifies that StereoRectifyUncalibrated can use the same format of corresponding points as FindFundamentalMat.

However, when I try to use StereoRectifyUncalibrated, I get the following error:

OpenCV Error: Assertion failed (CV_IS_MAT(_points1) && CV_IS_MAT(_points2) && (_points1->rows == 1 || _points1->cols == 1) && (_points2->rows == 1 || _points2->cols == 1) && CV_ARE_SIZES_EQ(_points1, _points2)) in cvStereoRectifyUncalibrated, file /home/moos/prog/opencv/OpenCV-2.1.0/src/cv/cvcalibration.cpp, line 2539

It seems that the array of points for StereoRectifyUncalibrated should be 1 dimensional, but how can I then specify x and y coordinates for the corresponding points?

Can anybody shine some light on this?

I'm using OpenCV 2.1 with Python bindings for Python 2.6.1

Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

sirulrichvolliechtenstein
I'm having the same trouble :|

Any idea?

--- In [hidden email], "mooshueting" <mooshueting@...> wrote:

>
> I've used FindFundamentalMat with a CvMat I've created from the points generated by FindChessboardCorners. The documentation specifies that StereoRectifyUncalibrated can use the same format of corresponding points as FindFundamentalMat.
>
> However, when I try to use StereoRectifyUncalibrated, I get the following error:
>
> OpenCV Error: Assertion failed (CV_IS_MAT(_points1) && CV_IS_MAT(_points2) && (_points1->rows == 1 || _points1->cols == 1) && (_points2->rows == 1 || _points2->cols == 1) && CV_ARE_SIZES_EQ(_points1, _points2)) in cvStereoRectifyUncalibrated, file /home/moos/prog/opencv/OpenCV-2.1.0/src/cv/cvcalibration.cpp, line 2539
>
> It seems that the array of points for StereoRectifyUncalibrated should be 1 dimensional, but how can I then specify x and y coordinates for the corresponding points?
>
> Can anybody shine some light on this?
>
> I'm using OpenCV 2.1 with Python bindings for Python 2.6.1
>


Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

Neuroforge
This post has NOT been accepted by the mailing list yet.
Hi,

I've just discovered this bug... anything like a solution yet?

Daniel
Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

Di Xiao
In reply to this post by sirulrichvolliechtenstein
I met the same issue for OpenCV 2.3.0.

Any one got solution about it or I was using it wrongly?

Regards,

Di

--- In [hidden email], "sirulrichvolliechtenstein" <joao.miguel.soares@...> wrote:

>
> I'm having the same trouble :|
>
> Any idea?
>
> --- In [hidden email], "mooshueting" <mooshueting@> wrote:
> >
> > I've used FindFundamentalMat with a CvMat I've created from the points generated by FindChessboardCorners. The documentation specifies that StereoRectifyUncalibrated can use the same format of corresponding points as FindFundamentalMat.
> >
> > However, when I try to use StereoRectifyUncalibrated, I get the following error:
> >
> > OpenCV Error: Assertion failed (CV_IS_MAT(_points1) && CV_IS_MAT(_points2) && (_points1->rows == 1 || _points1->cols == 1) && (_points2->rows == 1 || _points2->cols == 1) && CV_ARE_SIZES_EQ(_points1, _points2)) in cvStereoRectifyUncalibrated, file /home/moos/prog/opencv/OpenCV-2.1.0/src/cv/cvcalibration.cpp, line 2539
> >
> > It seems that the array of points for StereoRectifyUncalibrated should be 1 dimensional, but how can I then specify x and y coordinates for the corresponding points?
> >
> > Can anybody shine some light on this?
> >
> > I'm using OpenCV 2.1 with Python bindings for Python 2.6.1
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

hololad
The code reshapes the input arrays into two-dimensional matrices, so it looks like the input arrays should be (x1, x2, x3, ..., xN, y1, y2, y3, ... yN).

This is strange and not consistent with other functions, and the only explanation I can think of is that the number of points is implicit in the length of the array.  With 2xN or Nx2 the number of points could be ambiguous.

--- In [hidden email], "Di Xiao" <xiaodi6868@...> wrote:

>
> I met the same issue for OpenCV 2.3.0.
>
> Any one got solution about it or I was using it wrongly?
>
> Regards,
>
> Di
>
> --- In [hidden email], "sirulrichvolliechtenstein" <joao.miguel.soares@> wrote:
> >
> > I'm having the same trouble :|
> >
> > Any idea?
> >
> > --- In [hidden email], "mooshueting" <mooshueting@> wrote:
> > >
> > > I've used FindFundamentalMat with a CvMat I've created from the points generated by FindChessboardCorners. The documentation specifies that StereoRectifyUncalibrated can use the same format of corresponding points as FindFundamentalMat.
> > >
> > > However, when I try to use StereoRectifyUncalibrated, I get the following error:
> > >
> > > OpenCV Error: Assertion failed (CV_IS_MAT(_points1) && CV_IS_MAT(_points2) && (_points1->rows == 1 || _points1->cols == 1) && (_points2->rows == 1 || _points2->cols == 1) && CV_ARE_SIZES_EQ(_points1, _points2)) in cvStereoRectifyUncalibrated, file /home/moos/prog/opencv/OpenCV-2.1.0/src/cv/cvcalibration.cpp, line 2539
> > >
> > > It seems that the array of points for StereoRectifyUncalibrated should be 1 dimensional, but how can I then specify x and y coordinates for the corresponding points?
> > >
> > > Can anybody shine some light on this?
> > >
> > > I'm using OpenCV 2.1 with Python bindings for Python 2.6.1
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

hololad
Correction:  it reshapes the input into a 1-row, 2-channel array, so the inputs should be (x1, y1, x2, y2, x3, y3, ...).  However, this isn't the only issue I've had with this function, because when I apply the output homography matrices to the input points, it seems to align the pairs of points along the X axis, not the Y axis as it should.  Something about this function seems completely at odds with the rest of the CV library, and I have yet to get it to work properly.

--- In [hidden email], "hololad" <jimirwin@...> wrote:

>
> The code reshapes the input arrays into two-dimensional matrices, so it looks like the input arrays should be (x1, x2, x3, ..., xN, y1, y2, y3, ... yN).
>
> This is strange and not consistent with other functions, and the only explanation I can think of is that the number of points is implicit in the length of the array.  With 2xN or Nx2 the number of points could be ambiguous.
>
> --- In [hidden email], "Di Xiao" <xiaodi6868@> wrote:
> >
> > I met the same issue for OpenCV 2.3.0.
> >
> > Any one got solution about it or I was using it wrongly?
> >
> > Regards,
> >
> > Di
> >
> > --- In [hidden email], "sirulrichvolliechtenstein" <joao.miguel.soares@> wrote:
> > >
> > > I'm having the same trouble :|
> > >
> > > Any idea?
> > >
> > > --- In [hidden email], "mooshueting" <mooshueting@> wrote:
> > > >
> > > > I've used FindFundamentalMat with a CvMat I've created from the points generated by FindChessboardCorners. The documentation specifies that StereoRectifyUncalibrated can use the same format of corresponding points as FindFundamentalMat.
> > > >
> > > > However, when I try to use StereoRectifyUncalibrated, I get the following error:
> > > >
> > > > OpenCV Error: Assertion failed (CV_IS_MAT(_points1) && CV_IS_MAT(_points2) && (_points1->rows == 1 || _points1->cols == 1) && (_points2->rows == 1 || _points2->cols == 1) && CV_ARE_SIZES_EQ(_points1, _points2)) in cvStereoRectifyUncalibrated, file /home/moos/prog/opencv/OpenCV-2.1.0/src/cv/cvcalibration.cpp, line 2539
> > > >
> > > > It seems that the array of points for StereoRectifyUncalibrated should be 1 dimensional, but how can I then specify x and y coordinates for the corresponding points?
> > > >
> > > > Can anybody shine some light on this?
> > > >
> > > > I'm using OpenCV 2.1 with Python bindings for Python 2.6.1
> > > >
> > >
> >
>


Reply | Threaded
Open this post in threaded view
|

Re: StereoRectifyUncalibrated not accepting same array as FindFundamentalMat

xyz123
This post has NOT been accepted by the mailing list yet.
I am surprised this bug hasn't been fixed till now. I too see this issue on my mac.