-
Notifications
You must be signed in to change notification settings - Fork 11
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
error in cvtColor() call #5
Comments
something with the image because it works for many other images I have. The weird thing is the hosted version (live) of rastercarve handle the print just fine. Maybe a different version on the hosted site? Any ideas on how to work around this (e.g. try and older version of the code)? |
Hi, Thanks for reporting this issue. I'm guessing the cause is a failed call to opencv's imread(), probably because something is weird about your image. Could you post the image here so we can investigate further? The hosted site is running in a Docker container with opencv-python 4.2.0.32 on Debian Buster, if that's of any help to you. |
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->There are actually a few that fail. One thing in common though is I edited them with the standard Microsoft (Windows 10) photo editor and added a ‘Vanilla’ filter to it (to make it look black and white) and that might have made the photo include something that the openCV stuff doesn’t like. Photo attached that should give the error (although, like I said the hosted site processes it fine). Thanks! From: Franklin WeiSent: Sunday, August 29, 2021 7:05 PMTo: built1n/rastercarveCc: mjcastillo; AuthorSubject: Re: [built1n/rastercarve] error in cvtColor() call (#5) Hi,Thanks for reporting this issue. I'm guessing the cause is a failed call to opencv's imread(), probably because something is weird about your image. Could you post the image here so we can investigate further?The hosted site is running in a Docker container with opencv-python 4.2.0.32 on Debian Buster, if that's of any help to you.—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.
|
I am getting an error running this locally with an image that work when I run it on the hosted live version, so pretty sure the image is good, Here is the error. Any ideas on why this assertion is failing? Something likely wrong in my environment (windows 10, python3)?
Traceback (most recent call last):
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\rastercarve-script.py", line 33, in
sys.exit(load_entry_point('rastercarve==1.0.8', 'console_scripts', 'rastercarve')())
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\rastercarve_main_.py", line 458, in main
doEngrave()
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\rastercarve_main_.py", line 315, in doEngrave
img = ~cv2.cvtColor(cv2.imread(glob_args.filename), cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
PS C:\Users\Mikej\Downloads\rastercarve-master\rastercarve-master> rastercarve --width 5 -d .05 -s 100 --metric --no-line-numbers examples/105-0521_IMG.JPG > out.nc
Traceback (most recent call last):
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\rastercarve-script.py", line 33, in
sys.exit(load_entry_point('rastercarve==1.0.8', 'console_scripts', 'rastercarve')())
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\rastercarve_main_.py", line 458, in main
doEngrave()
File "C:\Users\Mikej\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\rastercarve_main_.py", line 315, in doEngrave
img = ~cv2.cvtColor(cv2.imread(glob_args.filename), cv2.COLOR_BGR2GRAY)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-q3d_8t8e\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
The text was updated successfully, but these errors were encountered: