✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
#include<opencv2/opencv.hpp>using namespace cv;int main(){ ... imshow('Original image', image); Mat image_gray; cvtColor(image, image_gray, COLOR_BGR2GRAY); Mat image_thresh; threshold(image_gray, image_thresh, 150, 255, THRESH_BINARY); vector<vector<Point>> contours; vector<Vec4i> hierarchy; findContours(image_thresh, contours, hierarchy, RETR_TREE, CHAIN_APPROX_NONE); Mat image_contours_objects = image.clone(); drawContours(image_contours_objects, contours, -1, Scalar(0, 255, 0), 2); imwrite("contours_objects_image.jpg", image_contours_objects); imshow("The outlines of the objects in the image are found", image_copy); waitKey(0); destroyAllWindows(); return 0;}Для наведеного вище коду вкажіть рядок, який треба вставити на місці ..., щоб комп’ютерна програма мовою C++ за допомогою бібліотеки OpenCV реалізовувала до файлу з іменем “image.jpg” з поточної папки визначення контурів об’єктів на зображенні та зберігала результат у файлі з іменем “image_contours_objects.jpg” у поточній папці: