How to count objects in an image?

H_109 · Feb 11, 2023 · 2.1K views
Question
Hello, I want to count the number of flowers in an image classified by its color and shape, the flowers are sometimes overlapped, and there are only 3 (or 4 types but color would be specified): 1- Jasmin: white 2- Rose: red 3- Tulip: Violet I need help to code this in matlab please
Expert Answer
Profile picture of Prashant Kumar
Prashant Kumar PhD Expert
Answered Sep 8, 2026
The approprite approach based on the type of input images, though you can follow the following (General Case)
Steps:
  1. Do the segmentation
  2. Separate all Flowers using Morphological Operation
  3. Mask the original Image (Only ROIs are there)
  4. Use color detection to counts the number of flowers (Approx Area can be use for confirmation)
 
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!