(self, sample)
return ret
Denormalize sample from metric 3D to image coordinates
        :param sample: joints in (x,y,z) with x,y and z in mm
        :return: joints in (x,y,z) with x,y in image coordinates and z in mm
Denormalize sample from metric 3D to image coordinates
        :param sample: joints in (x,y,z) with x,y and z in mm
        :return: joints in (x,y,z) with x,y in image coordinates and z in mm
Denormalize sample from metric 3D to image coordinates : param sample : joints in ( x y z ) with x y and z in mm : return : joints in ( x y z ) with x y in image coordinates and z in mm
def joint3DToImg(self, sample):
        """
        Denormalize sample from metric 3D to image coordinates
        :param sample: joints in (x,y,z) with x,y and z in mm
        :return: joints in (x,y,z) with x,y in image coordinates and z in mm
        """
        ret = np.zeros((3,), np.float32)
        # convert to metric using f
        if sample[2] == 0.:
            ret[0] = self.ux
            ret[1] = self.uy
            return ret
        ret[0] = sample[0]/sample[2]*self.fx+self.ux
        ret[1] = sample[1]/sample[2]*self.fy+self.uy
        ret[2] = sample[2]
        return ret
def joint3DToImg ( self , sample ) : ret = np . zeros ( ( 3 , ) , np . float32 ) # convert to metric using f if sample [ 2 ] == 0. : ret [ 0 ] = self . ux ret [ 1 ] = self . uy return ret ret [ 0 ] = sample [ 0 ] / sample [ 2 ] * self . fx + self . ux ret [ 1 ] = sample [ 1 ] / sample [ 2 ] * self . fy + self . uy ret [ 2 ] = sample [ 2 ] return ret