Can the upper side of the bone be detected? Although this will be a simple task, if you look from above, from many points of view several sides are visible.
Here is an example of a bone, feel free to take your own photos: 
Usually you want to know what result you have achieved. It's easy for me to extract ALL points, but how to extract them only from above? In this special case, the upper side is the largest, but this may not always be true. I'm looking for someting that estimates the distortion of the top square (or circle in this case, which I can extract) in relation to the perspective given by the grid below.
An example program with some results is given below.
import numpy as np import cv2 img = cv2.imread('dice.jpg')
Some resulting images: 
python image-processing opencv scikit-image
tfv
source share