Obtaining Histogram of the size of apples in an image

In an image containing multiple apples, the histogram is plotted based on the size of apples present in the image into the three bin size.
14 Downloads
Updated 21 Nov 2021

View License

For test Images to perform this operation, click here: TEST IMAGES
In this project, an image containing multiple apple is taken and the following steps are implemented to compute the histogram of size of apples in an image.
  1. Color clustering is done to separate the images from the background.
  2. Used active contour to segment the objects in the image.
  3. Based on the color threshold, the segmentation of red apples from the image is done and other threshold values are used to segment the green apples from the image.
  4. Morphological operations are done to get the proper shape and size of the apples as in the original image.
  5. Area of each of the apple is calculated and the histogram is plotted based on the range obtained from the size of the objects.
Some samples:

Cite As

NEMANTH KUMAR M S (2024). Obtaining Histogram of the size of apples in an image (https://www.mathworks.com/matlabcentral/fileexchange/102324-obtaining-histogram-of-the-size-of-apples-in-an-image), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.6

update

1.0.5

update text

1.0.4

description update

1.0.3

files update

1.0.2

file update

1.0.1

Updated file

1.0.0