Point Counter

In addition to the augmented reality project, I also carried out this project to use in my computer vision presentation in my class during the first semester of my university.

My goal in this project is to count the lentils I sprinkled on the White Paper. Which is purely on the theme of computer vision, I wanted to realize this project with my basic knowledge without using any library that is ready. I used the nested for loop to process all the pixels in a picture. This app keeps you waiting for a while because of it works on the phone's CPU. This is a very bad situation for the user experience because the application cannot respond during the wait. I used AsycnTask to improve the user experience and showed the process how much is left to the participants of my presentation with progress bar.

Point Counter Output


To detect the dominant color points, I detected the dominant color outside of the black and white colors and marked the colors close to that color rating.

The next stage is the process of counting these points. I had the most trouble in this part. Because the application counted pixel-oriented, it was far above the actual number. I reached the actual number by removing the remaining points in 3 unit frames to the top left of all points from the list of counts. Due to the quality of the image, white pixels can be formed and because white pixels cause the wrong result therefore I made 3 unit frames. As you can see in the picture on the left, counting is performed based on the red dot on the bottom right of the lentil grains.

As with other educational projects, you can find the source codes for this project on my GitHub page.