Ask Your Question

mrersatz's profile - activity

2020-03-30 06:19:52 -0600 marked best answer Turn HFS result into Contours

I suspect I'm missing something obvious but I can't sort out the best way to turn my segmented results into contours. I am using the cv2.hfs module and the preview looks great for my purposes. But I need to get a set of contours with centers, orientation etc. But the output of performSegmentCpu gives me a posterized or false-color image.

What's the best way to turn this into a set of contours?

Do I need to iterate through the whole output checking for unique pixel values and then do some kind of threshold for those pixels so I can run it through findContours?

The docs mention that the default result of hfs.performSegmentCpu is a "matrix of index" but I can't imagine what that is or how I would access it.

2020-03-30 06:19:52 -0600 received badge  Scholar (source)
2020-03-30 06:19:46 -0600 commented answer Turn HFS result into Contours

Thanks for the updates. It's working quite well now using compare.

2020-03-29 12:36:08 -0600 commented answer Turn HFS result into Contours

I am not familiar with this kind of array access and I have not found any relevant docs in NumPy or elsewhere. Any refer

2020-03-29 11:20:12 -0600 asked a question Turn HFS result into Contours

Turn HFS result into Contours I suspect I'm missing something obvious but I can't sort out the best way to turn my segme

2020-03-27 10:53:43 -0600 answered a question Agricultural field boundary segmentation and delineation

You might have some luck using the HFS segmentation technique built into the more recent versions: import cv2 import nu