コード例 #1
0
def displayImg(model,type,component,scale):
    Image=dbvalue(0,"");
    dbbgm_batch.init_process("bbgmDisplayDistImageProcess")
    dbbgm_batch.set_input_from_db(0,model);
    dbbgm_batch.set_input_string(1,type);
    dbbgm_batch.set_input_int(2,component);
    dbbgm_batch.set_input_bool(3,scale);
    print   dbbgm_batch.run_process();
    (Image.id,Image.type)=dbbgm_batch.commit_output(0);
    return Image
コード例 #2
0
def getSubband(image_string,nplanes,subband_type,depth,wavelet):
    subband=dbvalue(0,"");
    dbbgm_batch.init_process("bbgmWaveletUtilsProcess");
    dbbgm_batch.set_input_string(0,image_string);
    dbbgm_batch.set_input_int(1,nplanes);
    dbbgm_batch.set_input_string(2,subband_type);
    dbbgm_batch.set_input_int(3,depth);
    dbbgm_batch.set_input_from_db(4,wavelet);
    print   dbbgm_batch.run_process();
    (subband.id,subband.type)=dbbgm_batch.commit_output(0);    
    return subband
コード例 #3
0
def wvXform(image_string,image,wv_type,level,nplanes):
    Wavelet=dbvalue(0,"");
    dbbgm_batch.init_process("bbgmWaveletXformProcess");
    dbbgm_batch.set_input_string(0,image_string);
    dbbgm_batch.set_input_int(1,wv_type);
    dbbgm_batch.set_input_int(2,level);
    dbbgm_batch.set_input_from_db(3,image);
    dbbgm_batch.set_input_int(4,nplanes);
    print   dbbgm_batch.run_process();
    (Wavelet.id,Wavelet.type)=dbbgm_batch.commit_output(0);
    return Wavelet
コード例 #4
0
def updateImageStream(path,w_size,init_var,minimum_stdev,start_frame,end_frame):
    dbbgm_batch.init_process("vidlOpenIstreamProcess")
    print dbbgm_batch.set_input_string(0, path+"*.tiff");
    print dbbgm_batch.run_process();
    stream = dbvalue(0,"");
    model = dbvalue(0,"");
    (stream.id, stream.type) = dbbgm_batch.commit_output(0);
    dbbgm_batch.init_process("bbgmUpdateDistImageStreamProcess")
    print dbbgm_batch.set_input_from_db(1, stream); # input stream
    print dbbgm_batch.set_input_int(2, 3); # number of mixture components
    print dbbgm_batch.set_input_int(3, w_size); # window size
    print dbbgm_batch.set_input_float(4, init_var); # initial variance
    print dbbgm_batch.set_input_float(5, 3.0); # g_thresh
    print dbbgm_batch.set_input_float(6, minimum_stdev);# minimum standard deviation
    print dbbgm_batch.set_input_int(7, start_frame);# start frame
    print dbbgm_batch.set_input_int(8, end_frame);# end frame -1 == do all
    print dbbgm_batch.process_init();
    print dbbgm_batch.run_process();
    (model.id, model.type) = dbbgm_batch.commit_output(0);
    print dbbgm_batch.remove_data(stream.id);
    return model