Count and measure objects in a photo
15 views (last 30 days)
Show older comments
Diego Fonseca
on 21 Aug 2023
Commented: Diego Fonseca
on 22 Aug 2023
Hello everybody.
Sorry for the question, but I am new to image processing. I am collecting trash at a beach and I was wondering if it would be possible to automatically count and measure some of the itens we collect, such as styrofoam pieces, which are too abundant for mannualy counting and measuruing.
I have a chroma key and I thought about placing the collected itens on it, take a picture and automatically count and measure the items.
I put an example picture attached (the ideia was to test the concept in order to improve the photo acquisiton). There are several colors, shapes and sizes of styrofoam pieces and they are usually dirty (collected from beaches).
I tried several demos and functions, but they overestimate (a lot) the number of items (they recongnize several dots instead of unique pieces). Which steps do you suggest me to use? Are there any modifications I could do to the photo (less items, smaller region, agroup items according to their size or color ....)?
Thanks in advance, best regards!
Accepted Answer
Image Analyst
on 22 Aug 2023
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
Please check out the Color Thresholder app on the Apps tab of the tool ribbon. You can use that to generate code to find a mask for the objects - just have it find everything except green. Let me know if you have trouble.
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!