✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
import cv2image = cv2.imread('image.jpg')cv2.imshow('Original image', image)image_gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)...contours, hierarchy = cv2.findContours(image = image_thresh, mode = cv2.RETR_TREE, method = cv2.CHAIN_APPROX_NONE)image_contours_objects = image.copy()cv2.drawContours(image = image_contours_objects, contours = contours, contourIdx = -1, color = (0, 255, 0), thickness = 2, lineType = cv2.LINE_AA)cv2.imwrite('image_contours_objects.jpg', image_contours_objects)cv2.imshow('The outlines of the objects in the image are found', image_contours_objects)cv2.waitKey(0)cv2.destroyAllWindows()Для наведеного вище коду вкажіть рядок, який треба вставити на місці ..., щоб комп’ютерна програма мовою Python за допомогою бібліотеки OpenCV реалізовувала до файлу з іменем “image.jpg” з поточної папки визначення контурів об’єктів на зображенні та зберігала результат у файлі з іменем “image_contours_objects.jpg” у поточній папці: