image-classification-python icon indicating copy to clipboard operation
image-classification-python copied to clipboard

Error::!ssize.empty() in function 'cv::resize'

Open fngwira14 opened this issue 6 years ago • 7 comments

Code::

read the image and resize it to a fixed-size

image = cv2.imread(file) image = cv2.resize(image, fixed_size)

Error:::

error Traceback (most recent call last) in 1 # read the image and resize it to a fixed-size 2 image = cv2.imread(file) ----> 3 image = cv2.resize(image, fixed_size)

error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

fngwira14 avatar Dec 23 '19 02:12 fngwira14

Greetings @Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

fngwira14 avatar Dec 23 '19 02:12 fngwira14

Greetings @Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

Even i have the same issue Plaese help @Gogul09

antaovanessa1 avatar Apr 21 '20 07:04 antaovanessa1

Greetings @Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

did u solve the issue?

nirupamudoi avatar May 04 '20 18:05 nirupamudoi

Greetings @Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

did u solve the issue?

hey make sure all your images(100) are numbered (from 1-100). Also make sure to change images_per_class accordingly in the code.

antaovanessa1 avatar May 06 '20 15:05 antaovanessa1

Hey there, each class of my dataset consists of images that I have arranged in ascending order. I have about 6000 images in each class. But even after I arranged all the images from 1-6000 I still get this error. Can u please elaborate how u solved this issue?

On Wed, 6 May, 2020, 8:36 pm antaovanessa1, [email protected] wrote:

Greetings @Gogul09 https://github.com/Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

did u solve the issue?

hey make sure all your images(100) are numbered (from 1-100). Also make sure to change images_per_class accordingly in the code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Gogul09/image-classification-python/issues/11#issuecomment-624705280, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSA4MQ2PTKDDBSZRHSYPH3RQF4IHANCNFSM4J6O4MWA .

nirupamudoi avatar Jul 02 '20 17:07 nirupamudoi

Make sure all the images are of jpg format

On Thu, 2 Jul 2020 at 10:52 PM, nirupamudoi [email protected] wrote:

Hey there, each class of my dataset consists of images that I have arranged in ascending order. I have about 6000 images in each class. But even after I arranged all the images from 1-6000 I still get this error. Can u please elaborate how u solved this issue?

On Wed, 6 May, 2020, 8:36 pm antaovanessa1, [email protected] wrote:

Greetings @Gogul09 https://github.com/Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance.

did u solve the issue?

hey make sure all your images(100) are numbered (from 1-100). Also make sure to change images_per_class accordingly in the code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/Gogul09/image-classification-python/issues/11#issuecomment-624705280 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AJSA4MQ2PTKDDBSZRHSYPH3RQF4IHANCNFSM4J6O4MWA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Gogul09/image-classification-python/issues/11#issuecomment-653130748, or unsubscribe https://github.com/notifications/unsubscribe-auth/APIODDYTIHVWO7WAJRT5BF3RZS65VANCNFSM4J6O4MWA .

antaovanessa1 avatar Jul 02 '20 17:07 antaovanessa1

Hey there, each class of my dataset consists of images that I have arranged in ascending order. I have about 6000 images in each class. But even after I arranged all the images from 1-6000 I still get this error. Can u please elaborate how u solved this issue? On Wed, 6 May, 2020, 8:36 pm antaovanessa1, @.***> wrote: Greetings @Gogul09 https://github.com/Gogul09 , I am using the code but on a different dataset with 100 images and i have that error this is coming out after running the code. Is it possible to have your support, sorry for the disturbance. did u solve the issue? hey make sure all your images(100) are numbered (from 1-100). Also make sure to change images_per_class accordingly in the code. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#11 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSA4MQ2PTKDDBSZRHSYPH3RQF4IHANCNFSM4J6O4MWA .

Make sure all your images are of the same format (.jpg)

antaovanessa1 avatar Jul 02 '20 17:07 antaovanessa1