Exemplo n.º 1
0
def run_feat_ext_example():
    """
        FUNC: examples of usage of feature extraction
    """
    # load binary depth file
    depthFile = './depth_data/a01_s01_e01_sdepth.bin'
    depthSequence = loadDepthFile(depthFile, fType = 'bin')
    
    dmhi = calDepthMHI(depthSequence)
    resizedDmhi = cv2.resize(dmhi, (128, 128))
    phog_vec = extractPHOGFeature(resizedDmhi)
Exemplo n.º 2
0
def run_seq_rep_example():
    """
        FUNC: examples of usage of sequence representation
    """
    # load binary depth file
    depthFile = './depth_data/a01_s01_e01_sdepth.bin'
    depthSequence = loadDepthFile(depthFile, fType = 'bin')
    
    dmht = calDepthMHT(depthSequence)
    
    # visualization
    cv2.imshow('front dmhi', dmht[0])
    cv2.imshow('top dmhi', dmht[1])
    cv2.imshow('side dmhi', dmht[2])
    cv2.waitKey()
        
    # any projections of frames in a sequence
    r_alpha = 0.
    r_beta = math.pi / 3.
    rProjSeq = rotateDepthSequence(depthSequence, r_alpha, r_beta)
    r_dmhi = calDepthMHI(rProjSeq)
    cv2.imshow('rotate projections', r_dmhi), cv2.waitKey()