Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector.
Any help as to how I can do this?????
1 | initial version |
Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector.
Any help as to how I can do this?????
2 | No.2 Revision |
Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector.
Any help as to how I can do this?????
Example: Image of a stone
This is the edge extracted image I have got after pre processing
Here's the code I'm using to access the contours
ret, thresh = cv2.threshold(dnoise,127,255,0)
dnoise, contours, hieararchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_NONE)
print(contours)
for ar_i, arr in enumerate(contours):
for row_i, row in enumerate(arr):
if (row_i==0):
for el in row:
print("\n",format(el))
3 | No.3 Revision |
Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector.
Any help as to how I can do this?????
Example: Image of a stone
This is the edge extracted image I have got after pre processing
Here's the code I'm using to access the contours
ret, thresh = cv2.threshold(dnoise,127,255,0)
dnoise, contours, hieararchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_NONE)
print(contours)
for ar_i, arr in enumerate(contours):
for row_i, row in enumerate(arr):
if (row_i==0):
for el in row:
print("\n",format(el))
I don't want to use inbuilt ellipse function in cv!
4 | No.4 Revision |
Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector.vector(least number of points with which I can reconstruct the edges again).
Any help as to how I can do this?????
Example: Image of a stone
This is the edge extracted image I have got after pre processing
Here's the code I'm using to access the contours
ret, thresh = cv2.threshold(dnoise,127,255,0)
dnoise, contours, hieararchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_NONE)
print(contours)
for ar_i, arr in enumerate(contours):
for row_i, row in enumerate(arr):
if (row_i==0):
for el in row:
print("\n",format(el))
I don't want to use inbuilt ellipse function in cv!
5 | retagged |
Hi
I have a simple irregular shape. I have a broken edges of this shape in black and white after pre-processing it. I extracted the contours from this image.
I want to convert this contour to a simple vector(least number of points with which I can reconstruct the edges again).
Any help as to how I can do this?????
Example: Image of a stone
This is the edge extracted image I have got after pre processing
Here's the code I'm using to access the contours
ret, thresh = cv2.threshold(dnoise,127,255,0)
dnoise, contours, hieararchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_NONE)
print(contours)
for ar_i, arr in enumerate(contours):
for row_i, row in enumerate(arr):
if (row_i==0):
for el in row:
print("\n",format(el))
I don't want to use inbuilt ellipse function in cv!