Пример #1
0
    blue_x = cv2.Sobel(np.float32(image_blue), cv2.CV_32F, 1, 0, ksize=1)
    blue_y = cv2.Sobel(np.float32(image_blue), cv2.CV_32F, 0, 1, ksize=1)

    red = create_vector_array(red_x, red_y)
    green = create_vector_array(green_x, green_y)
    blue = create_vector_array(blue_x, blue_y)

    red = reduce_vector_array(red)
    red = reduce_vector_array(red)
    red = reduce_vector_array(red)
    red = reduce_vector_array(red)
    red = reduce_vector_array(red)
    red = reduce_vector_array(red)
    red = reduce_vector_array(red)

    # cv2.imshow('Original', img)
    # cv2.imshow('Sobel vertical', gx)
    # cv2.imshow('Sobel horizontal', gy)
    # cv2.imshow('Sobel vertical red', red_x)
    # cv2.imshow('Sobel horizontal red', red_y)
    # cv2.imshow('Sobel vertical green', green_x)
    # cv2.imshow('Sobel horizontal green', green_y)
    # cv2.imshow('Sobel vertical blue', blue_x)
    # cv2.imshow('Sobel horizontal blue', blue_y)

    # mag, ang = cv2.cartToPolar(gx, gy)
    # cv2.waitKey(0)

    window = MainWindow(512, 512, "Gradient art project")
    window.main_loop()