Matlab Code for Segmentation of Image using Otsu Thresholding


Huge Price Drop : 50% Discount
Source Code + Demo Video

100 in stock

SKU: Matlab Code for Segmentation of Image using Otsu Thresholding Category:



The project presents an automatic gray scale image segmentation using iterative Triclass thresholding technique. This technique was extended from the standard Otsu method for image partitioning into foreground and background region effectively. The iterative method starts with Otsu’s threshold and computes the mean values of the two classes as separated by the threshold. Based on the Otsu’s threshold and the two mean values, the method separates the image into three classes instead of two regions. The first two classes are determined as the foreground and background and it will not be processed further. The third class is a desired region to be processed at next iteration. At the succeeding iteration, Otsu’s method is applied on the desired region to calculate a new threshold and two class means and the desired region is again separated into three classes, namely, foreground, background, and a new target region. The process stops when the Otsu’s thresholds calculated between two iterations is less than a predefined threshold. Then, all the intermediate foreground and background regions are, respectively, combined to create the final segmentation result. After this process, Morphological filtering will be used to smooth the segment the region by removing the back ground noise and false detection. Finally, the target regions are extracted with better accuracy. The simulated results will be shown that used algorithm for this process generates accurate detection of objects rather than previous methods.


  • Local thresholding
  • Gray level based Histogram thresholding
  • Multi level thresholding  method


  • Low performance accuracy in foreground detection
  • It is not provide a desired result in all lighting conditions
  • Presence of background noise in image having poor contrast.


A Gray scale image segmentation for detection of steel product defects and foreground objects based on,

  • Iterative Triclass thresholding under Otsu Method


Matlab Code for Segmentation of Image using Otsu Thresholding


  • Karhunen-loeve transform
  • Otsu method
  • Morphological filtering


  • Low Complexity
  • Better performance in Object detection
  • Presence of noise at background is low


  • Industrial vision for inspection system
  • Object recognition
  • Diagnosis in medical field


  • MATLAB 7.5 and above versions


[1] L. Herta and R. W. Schafer, “Multilevel threshold using edge matching,” Comput Vis., Graph., Image Process., vol. 44, no. 3, pp. 279–295, Mar. 1988.

[2] R. Kohler, “A segmentation system based on thresholding,” Comput. Graph. Image Process., vol. 15, no. 4, pp. 319–338, Apr. 1981.

[3] X. Xu, “A method based on rank-ordered filter to detect edges in cellular image,” Pattern Recognit. Lett., vol. 30, no. 6, pp. 634–640, Jun. 2009.

[4] S. Baukharouba, J. M. Rebordao, and P. L. Wendel, “An amplitude segmentation method based on the distribution function of an image,” Comput Vis., Graph., Image Process., vol. 29, no. 1, pp. 47–59, Jan. 1985.

[5] M. J. Carlotto, “Histogram analysis using scale-space approach,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 9, no. 1, pp. 121–129, Jan. 1987.

[6] J. Kittler and J. Illingworth, “Minimum error threshold,” Pattern Recognit., vol. 19, no. 1, pp. 41–47, Jan. 1986.

[7] P. Sirisha, C. N. Raju, and R. P. K. Reddy, “An efficient fuzzy technique for detection of brain tumor,” Int. J. Comput Technol., vol. 8, no. 2, pp. 813–819, 2013

[8] C. H. Bindu and K. S. Prasad, “An efficient medical image segmentation using conventional OTSU method,” Int. J. Adv. Sci. Technol., vol. 38, pp. 67–74, Jan. 2012.


There are no reviews yet.

Be the first to review “Matlab Code for Segmentation of Image using Otsu Thresholding”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.