Q: Inheriting an OpenCV class from OpenCV-Python I am working on the Tracking algorithms in OpenCV, where the tracking algorithms are inheriting the super class Tracker. I know that OpenCV is implemented in C++ and OpenCV-Python uses binding with the C++ implementation.
Without modifying the C++ code, can I simply create another Python class (a different Tracker algoritihm) and inherit the Tracker class? For example, can I simply do something like code given below?
import cv2
video_source = '/video/%04d.png'

class MyNewTracker(cv2.Tracker):

    def test(self):  
        print("My test function") 

if __name__ == '__main__':
    video = cv2.VideoCapture(video_source)
    bbox = (648, 584, 69, 200)
    ok, frame = video.read()
    tracker = MyNewTracker()
    ok = tracker.init(frame, bbox)

Edit: When I actually run the code above, I don't get any syntax error or undeclared function or anything like that. However, I do get the good old "Segmentation fault (core dump)" error. Is this a sign that the inheritance works, but I am misusing the functions inside the super class Tracker.
Thanks!
