renderer/viewer2D.py [687:730]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    pt2d = np.reshape(pt2d,(-1,2))          #Just in case. Make sure (32, 2)

    #Draw via opencv
    if not isinstance(image, np.ndarray):#not image: #If no image is given, generate Blank image
        image = np.ones((1000,1000,3),np.uint8) *255

    radius = 4


    #SMPL 24 joints used for LBS
    link2D = [ [0,3],[3,6],[6,9],[9,12],[12,15],  #root-> torso -> head
                    [9,13],[13,16],[16,18],[18,20],[20,22], #Nect-> left hand
                    [9,14], [14,17], [17,19], [19,21], [21,23],  #Nect-> right hand
                    [0,1], [1,4], [4,7], [7,10], # left Leg
                    [0,2], [2,5], [5,8], [8,11] #right leg
                    ]

    bLeft = [ 0,0,0,
        1, 1, 1,
        0,0,0,
        1,1,1,
        1,1,1,
        11,0,11,0]

    # for i in np.arange( len(link) ):
    for k in np.arange( len(pt2d) ):
        cv2.circle(image, (int(pt2d[k][0]), int(pt2d[k][1]) ), radius, (0,255,0),-1)

    for k in np.arange( len(link2D) ):
        parent = link2D[k][0]
        child = link2D[k][1]
        if color is not None:
            c = color
        else:
            if True:#bLeft[k]:
                c = (0,0,255)#BGR, RED
            else:
                c = (0,0,0)

        cv2.line(image, (int(pt2d[parent][0]), int(pt2d[parent][1])), (int(pt2d[child][0]), int(pt2d[child][1])), c, radius - 2)

    if bVis:
        ImShow(image)
    return image
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



renderer/viewer2D.py [734:777]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    pt2d = np.reshape(pt2d,(-1,2))          #Just in case. Make sure (32, 2)

    #Draw via opencv
    if not isinstance(image, np.ndarray):#not image: #If no image is given, generate Blank image
        image = np.ones((1000,1000,3),np.uint8) *255

    radius = 4


    #SMPL 24 joints used for LBS
    link2D = [ [0,3],[3,6],[6,9],[9,12],[12,15],  #root-> torso -> head
                    [9,13],[13,16],[16,18],[18,20],[20,22], #Nect-> left hand
                    [9,14], [14,17], [17,19], [19,21], [21,23],  #Nect-> right hand
                    [0,1], [1,4], [4,7], [7,10], # left Leg
                    [0,2], [2,5], [5,8], [8,11] #right leg
                    ]

    bLeft = [ 0,0,0,
        1, 1, 1,
        0,0,0,
        1,1,1,
        1,1,1,
        11,0,11,0]

    # for i in np.arange( len(link) ):
    for k in np.arange( len(pt2d) ):
        cv2.circle(image, (int(pt2d[k][0]), int(pt2d[k][1]) ), radius, (0,255,0),-1)

    for k in np.arange( len(link2D) ):
        parent = link2D[k][0]
        child = link2D[k][1]
        if color is not None:
            c = color
        else:
            if True:#bLeft[k]:
                c = (0,0,255)#BGR, RED
            else:
                c = (0,0,0)

        cv2.line(image, (int(pt2d[parent][0]), int(pt2d[parent][1])), (int(pt2d[child][0]), int(pt2d[child][1])), c, radius - 2)

    if bVis:
        ImShow(image)
    return image
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



