Skip to content

version 4.5.1 findFundamentalMat Magsac algorithm SegmentFault across platforms on specific keypoint input #19639

@ConvMech

Description

@ConvMech
System information (version)
  • OpenCV => 4.5.1
  • Operating System / Platform => both on ubuntu 18.04 and macbook catalina
  • Compiler => installed using pip
Detailed description

Magsac in cv2.findFundamentalMat() crashes on a specific pair of input points

Steps to reproduce
>>> import cv2
>>> cv2.__version__
'4.5.1'
>>> import numpy as np
>>> x = np.array([[941, 890],
...        [596, 940],
...        [898, 941],
...        [894, 933],
...        [586, 938],
...        [902, 933],
...        [887, 935]])
>>> y = np.array([[1416,  806],
...        [1157,  852],
...        [1380,  855],
...        [1378,  843],
...        [1145,  849],
...        [1378,  843],
...        [1378,  843]])
>>> cv2.findFundamentalMat(x, y, cv2.USAC_MAGSAC, 3, 0.99)
Python .py code
import numpy as np
import cv2 as cv

x = np.array([[941, 890],
        [596, 940],
        [898, 941],
        [894, 933],
        [586, 938],
        [902, 933],
        [887, 935]])

y = np.array([[1416,  806],
        [1157,  852],
        [1380,  855],
        [1378,  843],
        [1145,  849],
        [1378,  843],
        [1378,  843]])

res = cv.findFundamentalMat(x, y, cv.USAC_MAGSAC, 3, 0.99)

print(res)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions