andrewssobral / andrewssobral/bgslibrary

AttributeError: module 'pybgs' has no attribute 'DPAdaptiveMedian'

Offen
#173 9 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @andrewssobral Auf GitHub ansehen
fixed waiting for validation
Vorherrschende Sprache
C++
Sterne
2.3k
Forks
735
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi there, I need some help.

When I tried to run the **demo2.py**, it reported an **AttributeError: module 'pybgs' has no attribute 'DPAdaptiveMedian'**, then I annotated that line and ran again, same error happened but for the following line: **AttributeError: module 'pybgs' has no attribute 'DPGrimsonGMM'**

![demo2_1](https://user-images.githubusercontent.com/50175866/67369152-190ce900-f5ab-11e9-8dab-863448dbae54.png)

However, if I removed the whole **if is_cv2() or is_cv3()** section, the program could be executed successfully

![demo2_4](https://user-images.githubusercontent.com/50175866/67370230-e368ff80-f5ac-11e9-8a47-50e308990a57.png)

![demo2_2](https://user-images.githubusercontent.com/50175866/67369904-676eb780-f5ac-11e9-9606-6a4f3a2a37bc.png)

PC config.: Windows 10, Anaconda environment, Pycharm 2019.2.1, Visual studio 16 2019, OpenCV 3.4.2

I followed the https://github.com/andrewssobral/bgslibrary/wiki/Wrapper:-Python to install the **pybgs** whereas **the installation details were slightly different**, First I cloned this repository and added OpenCV_DIR system path, Next cmake ... BGS_PYTHON_SUPPORT=ON ... **failed**, So I wnet back to **Building Python wrapper from scratch** then used **python setup.py build** and **python setup.py install** as a result I saw the:
-- The C compiler ...
...
-- Configuring done
-- Generating done
-- Build files have been written to: ...

Therefore I utilized **VS 16 2019** to build the **bgslibrary.sln** in **.\bgslibrary\build\temp.win-amd64-3.7\Release**, which generated a file named **pybgs.cp37-win_amd64.pyd**

Based on this .pyd file I can smoothly run demo.py and demo2.py (removed a part), but the installation procedure and partial file names were not exactly the same as the tutorial, in addition the error "AttributeError: module 'pybgs' has no attribute 'DPAdaptiveMedian'".

I hope to know how to fix that.

Sincerely,

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.