def saveFigure(errors, title, file_name):
        w = 12
        h = 4
        fig, axes = plt.subplots(figsize=(w, h))
        fig.subplots_adjust(left=0.1, right=0.98, top=0.9, bottom=0.15)
        font_size = 15
        plt.title(title)
        plt.plot(errors[:, 2], label="Lambert assumption")
        plt.plot(errors[:, 1], label="Lumo")
        plt.plot(errors[:, 0], label="Our result")
        plt.xlabel("Shape dataset")
        plt.ylabel("Error")
        plt.legend()

        file_path = shapeResultFile("ShapeEstimation", file_name, file_ext=".png")
        fig.savefig(file_path, transparent=True)

        print shapeFiles()[np.argmax(errors[:, 0] - errors[:, 2])]
        print shapeFiles()[np.argmin(errors[:, 0] - errors[:, 2])]
    def saveFigure(errors, title, file_name):
        w = 12
        h = 4
        fig, axes = plt.subplots(figsize=(w, h))
        fig.subplots_adjust(left=0.1, right=0.98, top=0.9, bottom=0.15)
        font_size = 15
        plt.title(title)
        plt.plot(errors[:, 2], label="Lambert assumption")
        plt.plot(errors[:, 1], label="Lumo")
        plt.plot(errors[:, 0], label="Our result")
        plt.xlabel("Shape dataset")
        plt.ylabel("Error")
        plt.legend()

        file_path = shapeResultFile("ShapeEstimation",
                                    file_name,
                                    file_ext=".png")
        fig.savefig(file_path, transparent=True)

        print shapeFiles()[np.argmax(errors[:, 0] - errors[:, 2])]
        print shapeFiles()[np.argmin(errors[:, 0] - errors[:, 2])]
def shapeFigure():
    fig, axes = plt.subplots(figsize=(10, 8))
    font_size = 15
    fig.subplots_adjust(left=0.02, right=0.98, top=0.98, bottom=0.02, hspace=0.1, wspace=0.1)
    fig.suptitle("", fontsize=font_size)

    num_rows = 4
    num_cols = 5
    plot_grid = SubplotGrid(num_rows, num_cols)

    for shape_file in shapeFiles():
        N_8U = loadRGBA(shape_file)
        plot_grid.showImage(N_8U, "")

    file_path = os.path.join(shapeResultsDir(), "3DModels.png")
    fig.savefig(file_path, transparent=True)
Beispiel #4
0
def shapeFigure():
    fig, axes = plt.subplots(figsize=(10, 8))
    font_size = 15
    fig.subplots_adjust(left=0.02,
                        right=0.98,
                        top=0.98,
                        bottom=0.02,
                        hspace=0.1,
                        wspace=0.1)
    fig.suptitle("", fontsize=font_size)

    num_rows = 4
    num_cols = 5
    plot_grid = SubplotGrid(num_rows, num_cols)

    for shape_file in shapeFiles():
        N_8U = loadRGBA(shape_file)
        plot_grid.showImage(N_8U, "")

    file_path = os.path.join(shapeResultsDir(), "3DModels.png")
    fig.savefig(file_path, transparent=True)