TypeError: Image data of dtype object cannot be converted to float
TypeError: Image data of dtype object cannot be converted to float
# initialize the figure
fig = plt.figure("Images")
images = ("Original", original), ("Contrast", contrast), ("Photoshopped", shopped)
# loop over the images
for (i, (name, image)) in enumerate(images):
# show the image
ax = fig.add_subplot(1, 3, i + 1)
ax.set_title(name)
plt.imshow(image, cmap = plt.cm.gray)
plt.show()
plt.axis("off")
# show the figure
# compare the images
compare_images(original, original, "Original vs. Original")
compare_images(original, contrast, "Original vs. Contrast")
compare_images(original, shopped, "Original vs. Photoshopped")
Where is imread? Do you use opencv function?
i cannot see anything opencv related here
Where is line number to get an error?