Ask Your Question

Why is the python binding not complete ?

asked 2018-11-07 08:07:47 -0500

Tyrossel gravatar image

Is there any reason why some functions or classes are not available in the python binding of OpenCV ?

This page in the documentation indicates how to export elements for python, and it is quite easy to use.

For example, the high-level cv2.Stitcher class is not very tunable, because the ExposureCompensator cannot be selected, or the stitch function does not exist with ROIs parameters.

edit retag flag offensive close merge delete



A pr is in progress and may be it will help you. "It is quite easy to use" yes but you should try yourself. Feel free to make a PR

LBerger gravatar imageLBerger ( 2018-11-07 08:25:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-11-07 08:18:29 -0500

berak gravatar image

the python bindings are auto-generated, and for some exotic c++ constructs there is no easy way to do this,

so none of those are exposed to the python api.

edit flag offensive delete link more


python binding it's easy ?

blender class is here

FeatherBlender is here

Now if you write:

   blender = cv.detail_FeatherBlender(1./blend_width)
   blender.prepare(corners, sizes)


blender.prepare(corners, sizes) TypeError: detail_FeatherBlender.prepare() takes at most 1 argument (2 given)

and if you write

        blender = cv.detail.Blender_createDefault(cv.detail.Blender_FEATHER)
LBerger gravatar imageLBerger ( 2019-01-03 09:30:46 -0500 )edit

Error :

  AttributeError: 'cv2.detail_Blender' object has no attribute 'setSharpness'
LBerger gravatar imageLBerger ( 2019-01-03 09:31:26 -0500 )edit

Question Tools

1 follower


Asked: 2018-11-07 08:07:47 -0500

Seen: 221 times

Last updated: Nov 07 '18