Ask Your Question
2

cv.detail.BestOf2NearestRangeMatcher_create() missing

asked 2020-03-18 04:52:30 -0500

MicTie gravatar image

cv.detail.BestOf2NearestRangeMatcher_create(), used in stitching_detailed.py seems missing from OpenCv4.2.

Line 244++:


    if matcher_type == "affine":
        matcher = cv.detail_AffineBestOf2NearestMatcher(False, try_cuda, match_conf)
    elif range_width == -1:
        matcher = cv.detail.BestOf2NearestMatcher_create(try_cuda, match_conf)
    else:
        matcher = cv.detail.BestOf2NearestRangeMatcher_create(range_width, try_cuda, match_conf)
    return matcher 

Will this be added into a future version? Is there a current work-around?

Thanks?

edit retag flag offensive close merge delete

Comments

>>> help(cv2.detail) gives:

    BestOf2NearestMatcher_create(...)
    BestOf2NearestMatcher_create([, try_use_gpu[, match_conf[, num_matches_thresh1[, num_matches_thresh2]]]]) -> retval
    .

>>> cv2.__version__
'4.2.0-dev'
berak gravatar imageberak ( 2020-03-18 04:58:42 -0500 )edit

which error do you get, exactly ?

berak gravatar imageberak ( 2020-03-18 05:57:18 -0500 )edit
1

AttributeError: module 'cv2.detail' has no attribute 'BestOf2NearestRangeMatcher_create'

Im refering to BestOf2NearestRangeMatcher_create

MicTie gravatar imageMicTie ( 2020-03-18 05:59:09 -0500 )edit

ah, ok , i misread it.

berak gravatar imageberak ( 2020-03-18 06:02:43 -0500 )edit
1

I don't understand. test code is here

LBerger gravatar imageLBerger ( 2020-03-18 08:28:57 -0500 )edit

Merely OpenCV 3 not OpenCV 4

supra56 gravatar imagesupra56 ( 2020-03-18 09:32:15 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-03-18 08:44:51 -0500

MicTie gravatar image

updated 2020-03-18 09:35:03 -0500

supra56 gravatar image

Ln 34:

`cv.detail_BestOf2NearestRangeMatcher`

vs:

cv.detail**.**BestOf2NearestRangeMatcher**_create

cv.detail_BestOf2NearestRangeMatcher seems working! Thanks!

edit flag offensive delete link more

Comments

@MicTie. Thank!

supra56 gravatar imagesupra56 ( 2020-03-18 09:36:10 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-03-18 04:52:30 -0500

Seen: 98 times

Last updated: Mar 18