How can I detect black color and mark bounding box from overall gray image?
13 views (last 30 days)
KALYAN ACHARJYA on 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.
More Answers (1)
Image Analyst on 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: