Ask Your Question
0

About python version of ridge detection

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

After installing the opencv, I try use the ridge detection function https://docs.opencv.org/3.4.1/d4/d36/...

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
0

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

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

Comments

Thanks a lot!

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

I try use the example here https://docs.opencv.org/3.4.0/d4/d36/... 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 -0600 )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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 1,048 times

Last updated: Mar 13 '18