How can I detect black color and mark bounding box from overall gray image?
15 Ansichten (letzte 30 Tage)
KALYAN ACHARJYA am 23 Feb. 2022
Foremost segment that Black ROI regions, then apply the following-
#1 It can be done using regionprops
#2 To add the bounding box use rectangle function.
Please try, it is absolutely possible.
Weitere Antworten (1)
Image Analyst am 23 Feb. 2022
What does "detect" mean to you. You can easily threshold it, like find pixels darker than, say, 20 by doing
mask = grayImage < 20;
Now what? What do you want to do now that it's been detected. Maybe get its Area and Centroid?
props = regionprops(mask, 'Area', 'Centroid');
You'll want to look at my Image Segmentation Tutorial for a quick start lesson: