I,m trying encode, send and put some noise,and decode an Image in Python app using Reed-Solomon coder
I have converted imagage from PIL to numpy array. Now I'm trying to encode this array and then decode it. But I have problem with code word. It's too long. Does anyone know how to solve this problem. Thank You in advance
Error message: ValueError: Message length is max 223. Message was 226
import unireedsolomon as rs
from PIL import Image
import numpy as np
class REED
def __init__(self):
self.img = None
self.numpyImg = None
def loadPictureAndConvertToNumpyArray(self):
self.img = Image.open('PATH')
self.img.load()
self.numpyImg = np.array(self.img)
def reedSolomonEncode(self):
coder = rs.RSCoder(255,223)
self.numpyImg = coder.encode(self.numpyImg)