October 2018
Intermediate to advanced
472 pages
10h 57m
English
We will first start off with the image_cropping() function. This function accepts an image ID and its corresponding joint coordinates. It loads the image into memory and then crops the image so that it only includes the section of the image that's bound within the coordinates. The cropped image is then padded so that the joints and limbs are completely visible. For the added padding, the joint coordinates are also adjusted accordingly. When it has done this, the image is returned. This is the most important part of the transformation. Take your time and dissect the function to see exactly what is happening (the crop_pad_inf and crop_pad_sup parameters control the amount of padding):
def image_cropping(image_id, joints, crop_pad_inf ...
Read now
Unlock full access