Android Example Otsu Thresholding - binarization of images

This project demonstrates grayscaling of a multi colored image and then the binarization (i.e black or white pixels only) of the grayscaled image. The binarization is based on Otsu Thresholding as explained at www.labbookpages.co.uk/software/imgProc/otsuThreshold.html

The image on the left is an actual photo of a QR Code that I have taken. The centre image is a grayscaled image of the multi colored image on the left - it will change based on your selection of the various radio buttons. The image on the right is the binarized version of the centre grayscaled image. It is derived from the calculated Otsu threshold value of the centre grayscaled image

The Otsu threshold value for the selected greyscaled image is displayed in RED towards the right bottom of the activity.

Otsu Thresholding is one of many possible techniques employed in image processing - also has application in the decoding of 1D and 2D barcodes (such as for eg QR Codes)

Made use of Jpeg library by @agraham

Otsu.png
 

Attachments

  • JHS_OTSU_V2.zip
    61.2 KB · Views: 874
Last edited:
Top