I am working with a image
Actualimage:
I have used techniques like Canny, Hough transform to detect the line, and got this
Output:
Now I would like to extract the features like thickness size on each side in the grid cell indicated in the image. I need calculate area of specific
Part:
Can you enlighten me on this?
# Dilate the edge image to make the edges thicker
dialted_edge_image = cv2.dilate(edge_canny_image,kernel,iterations = 2)
# Perform a Hough Transform to detect lines
lines = probabilistic_hough_line(edge_canny_image, threshold=40, line_length=1, line_gap=2)
# Create a separate image for line detection
line_detected_image = np.dstack([edge_canny_image] * 3) # Convert to RGB for colored lines
for line in lines:
p0, p1 = line
cv2.line(line_detected_image, p0, p1, (255, 255, 255), 2) `







Okay, i am not sure with all the calculation you need but i can give you an approach to find the thicknesses of the sides.
To be able to provide accuracy and stability for future calculations:
I crop the image near the bright edges and since the thicknes changes accross the edge i measure it from different locations and calculate min max and average thickness. You may use the one suits your needs best.
and this is my code:
For your other calculations if you can explain them further i can try to help you.