import cv2
import os

import matplotlib.pyplot as plt

from qrcode import QRColoredCode
from qrcode.util import ColorSet

from qrdecode.main import QRProcessor
from qrdecode.utils.biostrip import ColorLines, Biostrip, np
from qrdecode.utils.image import ImageProcessor
from pyctorama import TPSColorProcessor

bgr = cv2.imread('/home/amoralca16/Documents/ProjectQR/qrdecode/scripts/images/clustered.png', cv2.IMREAD_COLOR)
rgb = bgr[...,::-1]
plt.imshow(rgb)
cv2.imwrite('kmeans.png', rgb)