Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue related to resizing of the images #1

Open
ShalluSharma opened this issue Jul 13, 2018 · 8 comments
Open

Issue related to resizing of the images #1

ShalluSharma opened this issue Jul 13, 2018 · 8 comments

Comments

@ShalluSharma
Copy link

Dear gogul,

I am having an error of "C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize" and " in ()" when I am executing this code.

@BiQiWHU
Copy link

BiQiWHU commented Aug 1, 2018

So do I. I changed the image size into my own size, but this problem still occurs

@BiQiWHU
Copy link

BiQiWHU commented Aug 5, 2018

I have found the problem and fixed these two python file.
(1) The reason why cv::resize() has problem with images' heights and widths is that the code can not read image files at all, mainly because of the file path and '/'. So, some adaption has to be made in global.py to read image files correctly. Please refer to my update globalfeature.py.
(2) If u wanna run the file train_test.py smoothly, u will find there are still other some problems, e.g., how to import functions from global.py file and the definition of some variables. Please refer to my update train_testnew.py
After all these are fixed, I have successfully run this project in Spyder and Jupyter (Win8.1).

@BiQiWHU
Copy link

BiQiWHU commented Aug 5, 2018

Desktop.zip

@BiQiWHU
Copy link

BiQiWHU commented Aug 5, 2018

In Desktop.zip, two python files, named global feature.py and train_testnew.py respectively are packed.

@ShalluSharma
Copy link
Author

ShalluSharma commented Aug 5, 2018 via email

@BiQiWHU
Copy link

BiQiWHU commented Aug 14, 2018

Note that the image size is 256*256 in my dataset with 21 categories. When u use this code, please change this parameters so that it can fit ur dataset. Welcome

@shubhujain-97
Copy link

it is still giving the same error please help

@fngwira14
Copy link

Dear @Gogul09 ,
I have this error, mind helping out? @ShalluSharma @BiQiWHU @shubhujain-97
File "", line 18
fv_hu_moments = fd_hu_moments(image)
^
SyntaxError: invalid syntax

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants