I need help with measurement project

Good morning, I am doing my thesis and I plan to make an application to measure the thickness of the banana with the camera of the cell phone and with that determine if it is valid for harvesting. Is there a library that can be used for that or a course where this is explained?