def compute_fmeasure(db_path, seg_path, sys_type):
    # import pdb; pdb.set_trace()
    engine = create_engine()
    # engine.addpath(r'C:\Users\Siphiwe Phiri\Desktop\weizmann-image_segmantation', nargout=0)
    res = engine.ComputeFMeasure(db_path, seg_path, sys_type)
    engine.quit()
    return res
Ejemplo n.º 2
0
def py_mat_read_imageJ_roi(path, rc):
    engine = matlab.engine.start_matlab()
    r = rc[0]
    c = rc[1]
    ret = engine.read_ImageJ_roi(path, r, c)
    engine.quit()
    return mat(ret)
Ejemplo n.º 3
0
def terminate_matlab_engine(app, exception):

    global engine

    if engine is not None:

        engine.quit()
        engine = None
Ejemplo n.º 4
0
def terminate_matlab_engine(app, exception):

    global engine

    if engine is not None:

        engine.quit()
        engine = None
Ejemplo n.º 5
0
def main():
    engine = matlab.engine.start_matlab()

    basic(engine)

    call_matlab_function(engine)
    call_user_function(engine)

    engine.quit()
Ejemplo n.º 6
0
            elems = line.split(';')
            genres = eval(elems[1])
            genre_members.close()
            return genres


# makes a list of all different genres in the data
def createGenreSet():
    genre_members = open('data/membership_of_genres.csv', 'r')
    allGenres = []
    allGenres = set(allGenres)
    line = genre_members.readline()
    while line:
        elems = line.split(';')
        genres = eval(elems[1])
        for i in range(len(genres)):
            genre, member = genres[i]
            if member not in allGenres:
                allGenres.add(genre)

        line = genre_members.readline()
    genre_members.close()
    return allGenres


# main
FLS(2)

# close connection with MATLAB
engine.quit()
Ejemplo n.º 7
0
def quit_matlab(engine):
    engine.quit()
Ejemplo n.º 8
0
def destroy(proc_index):
    if engine:
        engine.quit()
Ejemplo n.º 9
0
def quitMatlab():
    global engine
    if type(engine)== matlab.engine.matlabengine.MatlabEngine:
        engine.quit()
    engine = None
Ejemplo n.º 10
0
def stop_engine(engine):
    if engine is not None:
        engine.quit()
Ejemplo n.º 11
0
def destroy(proc_index):
    if engine:
        engine.quit()
Ejemplo n.º 12
0
def quitMatlab():
    global engine
    if type(engine) == matlab.engine.matlabengine.MatlabEngine:
        engine.quit()
    engine = None