Hello all I need to find the vertices (x & y coordinates) of the given shape in image, after doing segmentation and edge extraction following is the image obtained :

And following are the vertices whose coordinates I need to find :

Hello all I need to find the vertices (x & y coordinates) of the given shape in image, after doing segmentation and edge extraction following is the image obtained :

And following are the vertices whose coordinates I need to find :

I think you may want to use Hough Line Transform to find the lines first. Then, you can get the intersections from the lines detected. You may find the tutorial of OpenCV about Hough Line Transform here.
Here is my results using the Hough Line Transform:

Code:
import numpy as np
import cv2 as cv2
import math
img_path = 'hSAdf.png'
# Read the original image
img = cv2.imread(img_path)
# Convert to graycsale
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
dst = cv2.threshold(img_gray, 50, 255, cv2.THRESH_BINARY)[1]
cdst = cv2.cvtColor(dst, cv2.COLOR_GRAY2BGR)
lines = cv2.HoughLines(dst, 1, np.pi / 180, 180, None, 0, 0)
# Drawing the lines
if lines is not None:
for i in range(0, len(lines)):
rho = lines[i][0][0]
theta = lines[i][0][1]
a = math.cos(theta)
b = math.sin(theta)
x0 = a * rho
y0 = b * rho
pt1 = (int(x0 + 10000*(-b)), int(y0 + 10000*(a)))
pt2 = (int(x0 - 10000*(-b)), int(y0 - 10000*(a)))
cv2.line(cdst, pt1, pt2, (0,0,255), 3, cv2.LINE_AA)
cv2.imshow("Detected Lines (in red) - Standard Hough Line Transform", cdst)
cv2.imwrite("output.png", cdst)
cv2.waitKey(0)
Here I did not use a Canny Edge Detection because I think the image itself is very line-clear, which make an edge detection redundant.
The function HoughLines() returns the rho in pixels and theta in radians of the line, which correspond to the line equation:
Edit 1: A simple convertion between rho, theta and m, c:
m = tan(theta + PI/2)
c = rho / sin(theta)
Image from Socret Lee
I think that you may continue on adjusting the line detection function. You can manually adjust the threshold, even limit the line's gradient in the function. Then, you can target one line by cropping and limiting the gradient.
Or you can reject the intersections of lines having ~90 degrees difference. Then, you will get the points you need.
Using Contour detection and approximation you can get the external vertices, and count them:
[1737 197] [616 199] [225 596] [ 226 1708] [ 610 2102] [1717 2121] [2118 1732] [2134 601]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import cv2
import numpy as np
img = cv2.imread("input.png", 0)
def fillhole(input_image):
'''
input gray binary image get the filled image by floodfill method
Note: only holes surrounded in the connected regions will be filled.
:param input_image:
:return:
'''
im_flood_fill = input_image.copy()
h, w = input_image.shape[:2]
mask = np.zeros((h + 2, w + 2), np.uint8)
im_flood_fill = im_flood_fill.astype("uint8")
cv2.floodFill(im_flood_fill, mask, (0, 0), 255)
im_flood_fill_inv = cv2.bitwise_not(im_flood_fill)
img_out = input_image | im_flood_fill_inv
return img_out
res = fillhole(img)
contours = cv2.findContours(res, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)[0]
peri = cv2.arcLength(contours[945], True)
approx = cv2.approxPolyDP(contours[945], 0.04 * peri, True)
im = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
s = 10
for p in approx:
p = p[0]
print(p)
im[p[1]-s:p[1]+s, p[0]-s:p[0]+s] = (255, 255, 0)
cv2.drawContours(im, contours, 945, (0, 200, 255), 3)
cv2.namedWindow("img", cv2.WINDOW_NORMAL)
cv2.imshow("img", im)
cv2.waitKey(0)