(self, nori_id)
return Image.fromarray(np.array(img)[:,:,::-1])
Read Images
Read Images
Read Images
def read_img(self, nori_id):
        """
        Read Images
        """

        img_bytes = self.img_nr.get(nori_id)
        nparr = np.fromstring(img_bytes, np.uint8)
        img = cv2.imdecode(nparr, cv2.IMREAD_COLOR)

        return Image.fromarray(np.array(img)[:,:,::-1])
def read_img ( self , nori_id ) : img_bytes = self . img_nr . get ( nori_id ) nparr = np . fromstring ( img_bytes , np . uint8 ) img = cv2 . imdecode ( nparr , cv2 . IMREAD_COLOR ) return Image . fromarray ( np . array ( img ) [ : , : , : : - 1 ] )