(self, dpt, cube, com, sc, joints3D, M, pad_value=0)
return new_dpt, new_joints3D, new_cube, Mnew
Virtually scale the hand by applying different cube
        :param dpt: cropped depth image with different CoM
        :param cube: metric cube of size (sx,sy,sz)
        :param com: original center of mass, in image coordinates (x,y,z)
        :param sc: scale factor for cube
        :param joints3D: 3D joint coordinates, cropped to old CoM
        :param pad_value: value of padding
        :return: adjusted image, new 3D joint coordinates, new center of mass in image coordinates
Virtually scale the hand by applying different cube
        :param dpt: cropped depth image with different CoM
        :param cube: metric cube of size (sx,sy,sz)
        :param com: original center of mass, in image coordinates (x,y,z)
        :param sc: scale factor for cube
        :param joints3D: 3D joint coordinates, cropped to old CoM
        :param pad_value: value of padding
        :return: adjusted image, new 3D joint coordinates, new center of mass in image coordinates
Virtually scale the hand by applying different cube : param dpt : cropped depth image with different CoM : param cube : metric cube of size ( sx sy sz ) : param com : original center of mass in image coordinates ( x y z ) : param sc : scale factor for cube : param joints3D : 3D joint coordinates cropped to old CoM : param pad_value : value of padding : return : adjusted image new 3D joint coordinates new center of mass in image coordinates
def scaleHand(self, dpt, cube, com, sc, joints3D, M, pad_value=0):
        """
        Virtually scale the hand by applying different cube
        :param dpt: cropped depth image with different CoM
        :param cube: metric cube of size (sx,sy,sz)
        :param com: original center of mass, in image coordinates (x,y,z)
        :param sc: scale factor for cube
        :param joints3D: 3D joint coordinates, cropped to old CoM
        :param pad_value: value of padding
        :return: adjusted image, new 3D joint coordinates, new center of mass in image coordinates
        """

        # if scale is 1, nothing to do
        if numpy.allclose(sc, 1.):
            return dpt, joints3D, cube, M

        new_cube = [s*sc for s in cube]

        # check for 1/0.
        if not numpy.allclose(com[2], 0.):
            # scale to original size
            Mnew = self.comToTransform(com, new_cube, dpt.shape)
            new_dpt = self.recropHand(dpt, Mnew, numpy.linalg.inv(M), dpt.shape, background_value=pad_value,
                                      nv_val=32000., thresh_z=True, com=com, size=cube)
        else:
            Mnew = M
            new_dpt = dpt

        new_joints3D = joints3D

        return new_dpt, new_joints3D, new_cube, Mnew
def scaleHand ( self , dpt , cube , com , sc , joints3D , M , pad_value = 0 ) : # if scale is 1, nothing to do if numpy . allclose ( sc , 1. ) : return dpt , joints3D , cube , M new_cube = [ s * sc for s in cube ] # check for 1/0. if not numpy . allclose ( com [ 2 ] , 0. ) : # scale to original size Mnew = self . comToTransform ( com , new_cube , dpt . shape ) new_dpt = self . recropHand ( dpt , Mnew , numpy . linalg . inv ( M ) , dpt . shape , background_value = pad_value , nv_val = 32000. , thresh_z = True , com = com , size = cube ) else : Mnew = M new_dpt = dpt new_joints3D = joints3D return new_dpt , new_joints3D , new_cube , Mnew