I cannot figure out how to get the saliency module in Pycharm... I tried updating python, reinstalling pip, reinstalling opencv-contrib-python ( which threw me an error: 'ImportError: cannot import name main '. In Pycharm, I went to settings, Project Interpretor>Add>opencv-contrib-python and I also have opencv-python installed. Why do I still get an AttributeError?
My use of the saliency module:
vs = VideoStream(src=0).start()
sleep(0.2)
frame = vs.read()
frame = imutils.resize(frame, width=self.win_width)
sa = cv.saliency.MotionSaliencyBinWangApr2014_create()
sa.setImagesize(frame.shape[1], frame.shape[0])
sa.init()
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
(success, saliencyMap) = sa.computeSaliency(gray)