(self, humans, scale_h = None)
return skeletons, scale_h
Get skeleton data of (x, y * scale_h) from humans.
        Arguments:
            humans {a class returned by self.detect}
            scale_h {float}: scale each skeleton's y coordinate (height) value.
                Default: (image_height / image_widht).
        Returns:
            skeletons {list of list}: a list of skeleton.
                Each skeleton is also a list with a length of 36 (18 joints * 2 coord values).
            scale_h {float}: The resultant height(y coordinate) range.
                The x coordinate is between [0, 1].
                The y coordinate is between [0, scale_h]
Get skeleton data of (x, y * scale_h) from humans.
        Arguments:
            humans {a class returned by self.detect}
            scale_h {float}: scale each skeleton's y coordinate (height) value.
                Default: (image_height / image_widht).
        Returns:
            skeletons {list of list}: a list of skeleton.
                Each skeleton is also a list with a length of 36 (18 joints * 2 coord values).
            scale_h {float}: The resultant height(y coordinate) range.
                The x coordinate is between [0, 1].
                The y coordinate is between [0, scale_h]
Get skeleton data of ( x y * scale_h ) from humans . Arguments : humans { a class returned by self . detect } scale_h { float } : scale each skeleton s y coordinate ( height ) value . Default : ( image_height / image_widht ) . Returns : skeletons { list of list } : a list of skeleton . Each skeleton is also a list with a length of 36 ( 18 joints * 2 coord values ) . scale_h { float } : The resultant height ( y coordinate ) range . The x coordinate is between [ 0 1 ] . The y coordinate is between [ 0 scale_h ]
def humans_to_skels_list(self, humans, scale_h = None): 
        ''' Get skeleton data of (x, y * scale_h) from humans.
        Arguments:
            humans {a class returned by self.detect}
            scale_h {float}: scale each skeleton's y coordinate (height) value.
                Default: (image_height / image_widht).
        Returns:
            skeletons {list of list}: a list of skeleton.
                Each skeleton is also a list with a length of 36 (18 joints * 2 coord values).
            scale_h {float}: The resultant height(y coordinate) range.
                The x coordinate is between [0, 1].
                The y coordinate is between [0, scale_h]
        '''
        if scale_h is None:
            scale_h = self._scale_h
        skeletons = []
        NaN = 0
        for human in humans:
            skeleton = [NaN]*(18*2)
            for i, body_part in human.body_parts.items(): # iterate dict
                idx = body_part.part_idx
                skeleton[2*idx]=body_part.x
                skeleton[2*idx+1]=body_part.y * scale_h
            skeletons.append(skeleton)
        return skeletons, scale_h
def humans_to_skels_list ( self , humans , scale_h = None ) : if scale_h is None : scale_h = self . _scale_h skeletons = [ ] NaN = 0 for human in humans : skeleton = [ NaN ] * ( 18 * 2 ) for i , body_part in human . body_parts . items ( ) : # iterate dict idx = body_part . part_idx skeleton [ 2 * idx ] = body_part . x skeleton [ 2 * idx + 1 ] = body_part . y * scale_h skeletons . append ( skeleton ) return skeletons , scale_h