简体   繁体   中英

Contouring 2D Array with OpenCV (Python)

I have a simple question:

I have a 2D Array, with each 'x' and 'y' coordinate having a height 'z'. Can OpenCV be used on NumPy arrays to extract contours in Python? I've seen numerous examples with JPG, PNG etc but can't find examples with an input array.

I just want to compare the quality/suitability of the contour on DICOM arrays in my research. Thanks in advance!

Image is simply an array. So, if you can do the same with images then obviously it's possible with the array as well. So, the answer to your question is yes. You can use the OpenCV to extract the contours from the NumPy array.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM