In the world of image processing, separating objects from the background is a common task. One effective technique to achieve this is threshold segmentation. This is a technique to partition an image into foreground and background by turning it into a binary image, which involves selecting a threshold value, where all pixels brighter than this value are marked as one value (often white) and all other the opposite value (often black).
The Otsu’s method, named after Nobuyuki Otsu, automatically determines the optimal threshold value from the image’s histogram. It works by finding the threshold that minimizes the variance within the classes (foreground and background) and maximizes the variance between them. The histogram for the image below is shown as follows:
Below are the codes for plotting the histograms in Python and MATLAB:
Below are the codes for extracting object from the image in Python and MATLAB:
Below is also a research paper on Otsu image segmentation published in February 2021 for those who might be interested to check out:
YouTube Tutorial
The video that goes through the above in streaming format is below.
If you’re a poor professor, subjected to RateMyProfessor.com, and half of all those assigned grades to you chose the number 3 and the other half chose the number 5, you would receive the average grade 4, which you could read as the majority thinking you’re pretty good. However, in reality, half think you’re mediocre, and the other half love you. Or maybe you’re a little edgy and get half 1s and half 5s. Anyone who sees the average grade, a 3, will probably presume you are right bang in the middle of all the mediocre stand-up comics or professors and scroll ahead, when actually you must be something quite special to invoke such strong reactions!
CodeChat
November’s CodeChat will be held this Friday, November 24 at 5pm EST. We will have a discussion on how to design games in Python and MATLAB, the theme for the month and as always you will have the opportunity to connect with other industry professionals to gain valuable market insights in addition to learning some code algorithms. You may sign up here for a meeting reminder or the meeting link is here if you would like to join directly.
As always, you can share any feedback you may have by replying to this email or in the Substacker’s message board.