示例#1
0
def main():
    #print("ID:", myID())
    img_path = 'C:/Users/User/Desktop/vision/beach.jpg'

    # Basic read and display
    imDisplay(img_path, LOAD_GRAY_SCALE)
    imDisplay(img_path, LOAD_RGB)

    # Convert Color spaces
    img = imReadAndConvert(img_path, LOAD_RGB)
    yiq_img = transformRGB2YIQ(img)
    f, ax = plt.subplots(1, 2)
    ax[0].imshow(img)
    ax[1].imshow(yiq_img)
    plt.show()

    # Image histEq
    histEqDemo(img_path, LOAD_GRAY_SCALE)
    histEqDemo(img_path, LOAD_RGB)

    # Image Quantization
    quantDemo(img_path, LOAD_GRAY_SCALE)
    quantDemo(img_path, LOAD_RGB)
    img2 = imReadAndConvert(img_path, LOAD_GRAY_SCALE)
    plt.gray()
    plt.imshow(img2)
    plt.show()
    img_lst, err_lst = quantizeImage(img2, 3, 20)




    # Gamma
    gammaDisplay(img_path, LOAD_RGB)
示例#2
0
def main():
    print("ID:", myID())
    img_path = 'sample_image.jpg'

    # Basic read and display
    imDisplay(img_path, LOAD_GRAY_SCALE)
    imDisplay(img_path, LOAD_RGB)

    # Convert Color spaces
    img = imReadAndConvert(img_path, LOAD_RGB)
    yiq_img = transformRGB2YIQ(img)
    f, ax = plt.subplots(1, 2)
    ax[0].imshow(img)
    ax[1].imshow(yiq_img)
    plt.show()

    # Image histEq
    histEqDemo(img_path, LOAD_GRAY_SCALE)
    histEqDemo(img_path, LOAD_RGB)

    # Image Quantization
    quantDemo(img_path, LOAD_GRAY_SCALE)
    quantDemo(img_path, LOAD_RGB)

    # Gamma
    gammaDisplay(img_path, LOAD_GRAY_SCALE)
示例#3
0
def main():
    print("ID:", myID())
    img_path = '/home/omerugi/PycharmProjects/Ex0/testImg1.jpg'

    # # Basic read and display
    # imDisplay(img_path, LOAD_GRAY_SCALE)
    # imDisplay(img_path, LOAD_RGB)

    # Convert Color spaces
    # img = imReadAndConvert(img_path, LOAD_RGB)
    # yiq_img = transformRGB2YIQ(img)
    # f, ax = plt.subplots(1, 2)
    # ax[0].imshow(img)
    # ax[1].imshow(yiq_img)
    # plt.show()

    ##Image histEq
    # histEqDemo(img_path, LOAD_GRAY_SCALE)
    #histEqDemo(img_path, LOAD_RGB)

    # Image Quantization
    #quantDemo(img_path, LOAD_GRAY_SCALE)
    #quantDemo(img_path, LOAD_RGB)
    #
    # # Gamma
    gammaDisplay(img_path, LOAD_GRAY_SCALE)
示例#4
0
def main():
    print("ID:", myID())
    img_path = 'beach.jpg'

    # Basic read and display
    # imDisplay(img_path, LOAD_GRAY_SCALE)
    # imDisplay(img_path, LOAD_RGB)
    # # Convert Color spaces
    # img = imReadAndConvert(img_path, LOAD_RGB)
    # yiq_img = transformRGB2YIQ(img)
    #
    # f, ax = plt.subplots(1, 2)
    # ax[0].imshow(img)
    # ax[1].imshow(yiq_img)
    # # plt.show()
    #
    # # Image histEq
    # histEqDemo(img_path, LOAD_GRAY_SCALE)
    # histEqDemo(img_path, LOAD_RGB)
    #
    # # Image Quantization
    # quantDemo(img_path, LOAD_GRAY_SCALE)
    # quantDemo(img_path, LOAD_RGB)

    # Gamma
    gammaDisplay(img_path, LOAD_RGB)