import ipywidgets.widgets as widgets
image_widget1 = widgets.Image(format='jpg', )
image_widget2 = widgets.Image(format='jpg', )
# create a horizontal box container to place the image widget next to eachother
image_container = widgets.HBox([image_widget1, image_widget2])
# display the container in this cell's output
display(image_container)
img1 = cv2.imread('libaray.JPG',1)
image_widget1.value = bgr8_to_jpeg(img1) #原始的
image_widget2.value = bgr8_to_jpeg(img) #经过像素操作的