Segmentation fault (core dumped) OpenCV
Hi There!
I am trying to use the OpenCV and SIFT method on ROS. When I try to use the SIFT I get an error "Segmentation fault (core dumped)"
The example code snippet is shown below.
img = cv2.imread("messi5.jpg")
gray= cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
sift = cv2.FeatureDetector_create("SIFT")
sift.detect(gray,None)
cv2.imshow("window",gray)
If I delete the "sift.detect(gray,None)" line it works, but doesn't answer the purpose of the work.
I tried to find similar SOLVED questions but no success. So, any recommendation?
The recommendation is to post this question here
Did you try to look what is in sift variable?
Actually, I have just put the code snippet related to OpenCV. Indeed, I was gonna use that function in my own code, but I tried to run all code, it failed then tried to run this little example it failed again.
So, I have just wanted to learn whether anyone faced such a similar problem. But thanks, I will try to get an answer from there, too.
If you are using opencv 3 it might be that SIFT is not included. The maintainers moved it to an extra repository because of the patent on SIFT.
Actually, I use opencv (2.4) which is installed with ros-indigo. Later, I installed ros-indigo-opencv3 package and corrected the code according to the opencv3 requirements, but it did not work again.
Hey mkorkmaz, I am facing the same error with the same system configuration. Did you find any solution?