How to install opencv-contrib

I use Jetson Xavier NX Jetpack4.4(opencv4.1.1).
I want to install opencv-contrib, because I get the error below.

AttributeError: module ‘cv2’ has no attribute ‘bgsegm’

I know I need opencv-contrib to get rid of this error.

I checked nvidia forum topics.
However, I couldn’t find script file on github.
Please tell me how to install opencv-contrib.
I’m in trouble
Help me

Thank you!

1 Like

I need the same thing, plus I need to build opencv with CUDA and GStreamer.

May not be the best method.

sudo apt-get isntall python3-opencv

First Aid Enemy, but I solved my problem