Here is my code:
It shows an error every time
Reading from this git hub issue
that talks about the same issue that you're having, it says the following:
This a secondary error that basically just means the image you are trying to process didn't load and was empty.
If you grabbed the image dara from the camera, it means the camera connection failed or isn't configured correctly. If you loaded an image file, it means the loading failed.
We can understand where this issue is comming from by looking at your code. The path to the image is malformed:
image = cv2.imread("r../input/C:/Users/Hp/Satellite image dataset/train_images/train/image_t8_007.jpg")
There are two issues here:
r
should be outside of the string and not inside of itThe imread()
call should look like this:
image = cv2.imread(r"C:/Users/Hp/Satellite image dataset/train_images/train/image_t8_007.jpg")