Ask Your Question

About python version of ridge detection

asked 2018-03-13 21:03:28 -0500

After installing the opencv, I try use the ridge detection function

It seems there is no attribute ximgproc in python module cv2. I try other function in the tutorial, there is not such problem.

Can you help me with that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-13 23:32:58 -0500

berak gravatar image

if you need anything from opencv_contrib, you have to build opencv libs locally, the prebuild cv2 does not have any of it.

for a build receipe, see here

edit flag offensive delete link more


Thanks a lot!

mikeaalv gravatar imagemikeaalv ( 2018-03-14 11:19:22 -0500 )edit

I try use the example here It is really not clear to me how to use it.

Can you provide a short example on using ridge detection in python.

mikeaalv gravatar imagemikeaalv ( 2018-03-14 11:23:06 -0500 )edit

something like:

img = cv.imread("my.png", 0); # try grayscale first
filtered = cv.ximgproc_RidgeDetectionFilter.getRidgeFilteredImage(img)
berak gravatar imageberak ( 2018-03-14 11:26:17 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-03-13 21:03:28 -0500

Seen: 340 times

Last updated: Mar 13 '18