Skip to content

setCharucoParameters results in segfault when using the python opencv #23440

@mostafarohani

Description

@mostafarohani

System Information

OpenCV python version: 4.7.0.74
Operating System / Platform: Ubuntu 18.04
Python version: 3.10

Detailed description

Setting CharucoParameters either in the constructor or using detector.setCharucoParameters causes a segfault
Screenshot 2023-03-30 at 3 42 21 PM
Screenshot 2023-03-30 at 3 42 28 PM

Steps to reproduce

dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_1000)
board = cv2.aruco.CharucoBoard((10, 10), 0.019, 0.015, dictionary)
detector = cv2.aruco.CharucoDetector(board)

works

but

dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_1000)
board = cv2.aruco.CharucoBoard((10, 10), 0.019, 0.015, dictionary)
charuco_parameters = cv2.aruco.CharucoParameters()
detector = cv2.aruco.CharucoDetector(board, charucoParams=charuco_parameters)

causes a segfault

dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_1000)
board = cv2.aruco.CharucoBoard((10, 10), 0.019, 0.015, dictionary)
charuco_parameters = cv2.aruco.CharucoParameters()
detector = cv2.aruco.CharucoDetector(board)
detector.setCharucoParameters(charuco_parameters)

also segfaults

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions