I'm reading about local binary pattern and I've the following code to extract local binary pattern.
from skimage import feature
import cv2 as cv
img = cv.imread("image.jpg",0)
lbp = feature.local_binary_pattern(img,8,1,"default")
cv.imshow("LBP",lbp)
the output image look like this
the original image is
But when I save image and load it back using the following code
from skimage import feature
import cv2 as cv
img = cv.imread("image.jpg",0)
lbp = feature.local_binary_pattern(img,8,1,"default")
cv.imwrite("new_lbp.jpg",lbp)
newim = cv.imread("new_lbp.jpg",0)
cv.imshow("new image",newim)
why does this two images looks different? can any body help me understand it?