# How can i compute perimeter and area of a skeletonized circle?

In opencv if i use findcontours function, i get contours and i can compute area, perimeter, convex hull. if i use a Skeletonized image of a circle how can i compute perimeter,area, convex hull of the skeletonized circle?

UPDATE

My skeletonize function:

import numpy as np
import cv2
import scipy.ndimage.morphology as m

def skeletonize(img):
h1 = np.array([[0, 0, 0],[0, 1, 0],[1, 1, 1]])
m1 = np.array([[1, 1, 1],[0, 0, 0],[0, 0, 0]])
h2 = np.array([[0, 0, 0],[1, 1, 0],[0, 1, 0]])
m2 = np.array([[0, 1, 1],[0, 0, 1],[0, 0, 0]])
hit_list = []
miss_list = []
for k in range(4):
hit_list.append(np.rot90(h1, k))
hit_list.append(np.rot90(h2, k))
miss_list.append(np.rot90(m1, k))
miss_list.append(np.rot90(m2, k))
img = img.copy()
while True:
last = img
for hit, miss in zip(hit_list, miss_list):
hm = m.binary_hit_or_miss(img, hit, miss)
img = np.logical_and(img, np.logical_not(hm))
if np.all(img == last):
break
return img

nomeimg = "JPEG/e(5).jpg"
ret,img = cv2.threshold(img,127,255,0)
element = cv2.getStructuringElement(cv2.MORPH_CROSS,(3,3))
img = 255 - img
img = cv2.dilate(img, element, iterations=7)
img = cv2.erode(img, element)

#element = cv2.getStructuringElement(cv2.MORPH_CROSS,(6,6))

skel = skeletonize(img)
skel = skel.astype(np.uint8)*255


• You get the radius ($r$) of the circle from the height of peak which represents the circle (the skeleton of an ideal circle would be a dot)
• Perimeter = $2\pi r$
• Area = $\pi r^2$
• Convex hull $\rightarrow$ draw a circle with radius $r$ at the position where the peak is