Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use libfovis for stereo camera such as Bumblebee #7

Open
GoogleCodeExporter opened this issue Aug 7, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

I write my stereo odometry just like the fovis_ros stereo_odometer.cpp. I can 
compile my code, but it failed once i run. The error is:
"Assertion failed: FOVIS_IS_ALIGNED16(a) && FOVIS_IS_ALIGNED16(b), file 
...\fovis\refine_feature_match.cpp, line 25".


Here is my code:
//==============================================//

    fovis::CameraIntrinsicsParameters cameraParams(640,480,517.3,516.5,318.6,255.3);
fovis::Rectification rect(cameraParams);
fovis::VisualOdometryOptions options = getDefaultOptions();
fovis::VisualOdometry* odom = new fovis::VisualOdometry(&rect, options); // 
setup the visual odometry

fovis::StereoCalibrationParameters stereoParams;
stereoParams.left_parameters = stereoParams.right_parameters = cameraParams;
stereoParams.right_to_left_rotation[0] = 1;
stereoParams.right_to_left_rotation[1] = 0;
stereoParams.right_to_left_rotation[2] = stereoParams.right_to_left_rotation[3] 
= 0;
stereoParams.right_to_left_translation[0] = -0.12;
stereoParams.right_to_left_translation[1] = 0;
stereoParams.right_to_left_translation[2] = 0;
fovis::StereoCalibration stereoCalib(stereoParams);
fovis::StereoDepth* depth = new fovis::StereoDepth(&stereoCalib,options);

cv::Mat img_left,img_right;
for(int i=1;i<100;i++)
{
    img_left = cv::imread(data_dir+"l"+num2str(i)+".jpg",cv::IMREAD_GRAYSCALE);
    img_right = cv::imread(data_dir+"r"+num2str(i)+".jpg",cv::IMREAD_GRAYSCALE);

    depth->setRightImage(img_right.data);
    odom->processFrame(img_left.data,depth);
    cout<<odom->getMotionEstimateStatus()<<endl;
}
//==============================================//
Note that I am build my code in vs2008,windows 64bit and i build fovis code 
from source.

Original issue reported on code.google.com by [email protected] on 13 Jan 2015 at 12:39

@GoogleCodeExporter
Copy link
Author

Hi there, How did you get a third party camera to work with FoVis? I am trying 
to port in cv::Mat images, with minimal luck. Thanks for your time!

Original comment by [email protected] on 8 Jun 2015 at 6:34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant