logo

Crowdly

Browser

Add to Chrome

import cv2 import numpy as np image = cv2.imread('blob.jpg', cv2.IMREAD_...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

import cv2

import numpy as np

image = cv2.imread('blob.jpg', cv2.IMREAD_GRAYSCALE)

cv2.imshow('Original', image)

params = cv2.SimpleBlobDetector_Params()

params.minThreshold = 0

params.maxThreshold = 255

params.filterByArea = True

...

params.filterByColor = True

params.blobColor = 0

params.filterByCircularity = True

params.minCircularity = 0.5

params.filterByConvexity = True

params.minConvexity = 0.67

params.filterByInertia = True

params.minInertiaRatio = 0.01

detector = cv2.SimpleBlobDetector_create(params)

keypoints = detector.detect(image)

image_with_keypoints = cv2.drawKeypoints(image, keypoints, np.array([]), (0, 0, 255), cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)

cv2.imshow('Keypoints', image_with_keypoints)

cv2.waitKey(0)

cv2.destroyAllWindows()

Для наведеного вище коду вкажіть рядок, який треба вставити на місці ..., щоб комп’ютерна програма мовою Python за допомогою бібліотеки OpenCV реалізовувала до файлу з іменем “blob.jpg” з поточної папки виявлення крапель на зображенні, що представлено вище на рисунку:

More questions like this

Want instant access to all verified answers on exam.nuwm.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome