Overview: I need to calibrate an image full automatically; I use the well-known library openCV. The issue is that, the function calibrateCamera() needs the number of objectPoints and Imagepoints to be equal. Since, the entire code needs to run automatically, i can’t specify the number of Objectpoints by creating 3D-vectors in np.mgrid(),see below.
objp = np.zeros((6*7,3), np.float32)
objp[:,:2] = np.mgrid[0:7,0:6].T.reshape(-1,2)
Question: Is there any function, which can automatically find dots in an image and return rows and columns, for the np.mgrid() function? The dots in the image are already created, such that i have the coordinate from them.
I tried to sort the x and y coordinates and make a for-loop, in which i find the the difference in magnitude, if the magnitude is smaller an the number one will be added in a dictionary. Thus, the magnitude is again pre-specified.