Konubinix' opinionated web of thoughts

Computer Vision / Cv With Ipython

Fleeting

from IPython import get_ipython
import cv2
import numpy as np
#+HUGO: more

image = cv2.imread("pic.png")
res = image.copy()

def show(result):
    plt.clf()
    plt.imshow(res)
    plt.draw()

get_ipython().events.register("post_run_cell", show)

res = cv2.cvtColor(image, cv2.COLOR_BGR2LAB)
res = cv2.cvtColor(res, cv2.COLOR_LAB2BGR)