Python edge detection and curvature calculation

前端 未结 4 649
眼角桃花
眼角桃花 2021-01-31 22:56

I know the edge detection problem has been posted before (in Java: Count the number of objects in an Image, language independent: Image edge detection), but I want to know how t

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 23:19

    There is a very simple way to find contours in python with scikit image. It's really just a couple line of code, like this:

        from skimage import measure
        contours = measure.find_contours(gimg, 0.8)
    

    This returns the vector representation of the contour lines. In a separate array for each line. And it's also easy to decrease the number of points in a line by calculating an approximation. Here is a bit longer description with source code: image vectorization with python

提交回复
热议问题