VINS-Mono icon indicating copy to clipboard operation
VINS-Mono copied to clipboard

When I applied my own data , I met this prolem.

Open hjr553199215 opened this issue 5 years ago • 14 comments

OpenCV Error: Assertion failed (_mask.empty() || (_mask.type() == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3)) && _mask.sameSize(_image))) in goodFeaturesToTrack, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgproc/src/featureselect.cpp, line 366 terminate called after throwing an instance of 'cv::Exception' what(): /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/imgproc/src/featureselect.cpp:366: error: (-215) _mask.empty() || (_mask.type() == (((0) & ((1 << 3) - 1)) + (((1)-1) << 3)) && _mask.sameSize(_image)) in function goodFeaturesToTrack

[feature_tracker-2] process has died [pid 3247, exit code -6, cmd /home/hujiarui/catkin_ws/devel/lib/feature_tracker/feature_tracker __name:=feature_tracker __log:=/home/hujiarui/.ros/log/9b635d3e-5377-11e9-9bf0-48a47263891d/feature_tracker-2.log]. log file: /home/hujiarui/.ros/log/9b635d3e-5377-11e9-9bf0-48a47263891d/feature_tracker-2*.log

hjr553199215 avatar Mar 31 '19 05:03 hjr553199215

imu:100hz camera:20hz

hjr553199215 avatar Mar 31 '19 05:03 hjr553199215

Seems you are using fisheye camera but did not provide any mask image for that.

shaozu avatar Mar 31 '19 06:03 shaozu

I am not sure if the problem happens in the function "goodFeaturesToTrack()" or the fisheye camera.

hjr553199215 avatar Mar 31 '19 06:03 hjr553199215

Because the "mask" appears both in "fisheye camera" and "goodFeaturesToTrack()" ,so I am confused about the error message.

hjr553199215 avatar Mar 31 '19 06:03 hjr553199215

Maybe your camera resolution is different form configuration file. You can check euroc_config.yaml to make sure your camera resolution is right.

The-Forgotton-One avatar Apr 11 '19 13:04 The-Forgotton-One

Selection_002 Some how my error got solved by disabling fisheye mask("fisheye: 0" in config.yaml file) though I am using a fisheye lens. Don't know the reason yet. The mask dimensions were consistent.

G-KUMAR avatar May 05 '19 13:05 G-KUMAR

check resolution of image, the problem will be solved!

zhuoyueljl avatar May 21 '19 02:05 zhuoyueljl

I got the same error, the reason for that is that you're using an fisheye camera but you didn't provide a suitable fisheye mask image for that, which is exactly what @shaozu said

wallace-lai avatar Sep 24 '19 12:09 wallace-lai

I got the same error, the reason for that is that you're using an fisheye camera but you didn't provide a suitable fisheye mask image for that, which is exactly what @shaozu

hello, I set the fisheye option to 0 in the config file, but it's still come up with those error fisheye: 0 and here is my error info:

[ WARN] [1635304981.975412939]: waiting for image and imu...
regesterPub
OpenCV Error: Assertion failed (_mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image))) in goodFeaturesToTrack, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/featureselect.cpp, line 366
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/featureselect.cpp:366: error: (-215) _mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image)) in function goodFeaturesToTrack

[feature_tracker-1] process has died [pid 17354, exit code -6, cmd /home/ouyang/work/vins_work/devel/lib/feature_tracker/feature_tracker __name:=feature_tracker __log:=/home/ouyang/.ros/log/431a1c4c-36cf-11ec-9332-04d9f5d5195e/feature_tracker-1.log].
log file: /home/ouyang/.ros/log/431a1c4c-36cf-11ec-9332-04d9f5d5195e/feature_tracker-1*.log
[pose_graph-3] process has died [pid 17357, exit code -11, cmd /home/ouyang/work/vins_work/devel/lib/pose_graph/pose_graph __name:=pose_graph __log:=/home/ouyang/.ros/log/431a1c4c-36cf-11ec-9332-04d9f5d5195e/pose_graph-3.log].
log file: /home/ouyang/.ros/log/431a1c4c-36cf-11ec-9332-04d9f5d5195e/pose_graph-3*.log


It's seems the same function, but with diffrent opencv error,

imu:100hz camera:20hz besides, can you tell how to set the imu fps and image fps? I cound't found the option in the settingfile, and I just run: 1、roslaunch realsense2_camera rs_camera.luanch 2、roslaunch vins_estimator euroc.launch and the error apeared, should I record a rosbag and play it? looking for your reply, thank you very much!

Sherlock-hh avatar Oct 27 '21 03:10 Sherlock-hh

Yes, I also encountered the same problem, how did you solve it. We would like to know how the fisheye camera is configured in VINS-MONO

DandyLorenz avatar Mar 31 '22 08:03 DandyLorenz

I'm also stuck on this. Anyone willing to share more on this?

RalphCodesTheInternet avatar May 11 '22 14:05 RalphCodesTheInternet

您好!您的邮件我已经收到了,我将尽快回复,谢谢!

wallace-lai avatar May 11 '22 14:05 wallace-lai

我也遇到这个问题,有人解决了吗

r-eality-eng avatar Sep 19 '23 11:09 r-eality-eng

您好!您的邮件我已经收到了,我将尽快回复,谢谢!

wallace-lai avatar Sep 19 '23 11:09 wallace-lai