Chessboard detection
import numpy as np
import cv2 as cv
import matplotlib.pyplot as plt

img = cv.imread("IMG-5386.jpg")
gray = cv.cvtColor(img,cv.COLOR_BGR2RGB)

found,corners = cv.findChessboardCorners(img,(5,9))
corners= corners.reshape(-1,2)
cv.drawChessboardCorners(gray,(9,9),corners,found)
plt.imshow(gray)

To calibrate and triangulate with cameras to see 3D movement, I make a setup with chessboard pattern, and cameras at fixed distances, and then use the chessboard code to calibrate.

Made a setup with and without external lighting. 

Then used the code above to locate chessboard, results below: (Used a 10cm distance for both, and tilted the second frame 30degrees).

Downloaded render of human body, so if used in master thesis, would need to cite! https://smplify.is.tue.mpg.de/download.php. Got this all from the easymocap github page, here: https://github.com/zju3dv/EasyMocap/blob/master/doc/installation.md.

Found code for raspberry camera here


Since the pictures with lightsource gave a lot of reflection, I placed masking tape on the 4 lights, and got better results.


  • No labels