Извлечение объектов (размера сетки) из изображенияPython

Программы на Python
Гость
Извлечение объектов (размера сетки) из изображения

Сообщение Гость »


Я работаю с изображением
Фактическое изображение:
[img]https://i.stack .imgur.com/OiV7H.jpg[/img]
Я использовал такие методы, как, 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)  `


Источник: https://stackoverflow.com/questions/781 ... m-an-image

Вернуться в «Python»