OpenCV false build path?
jkuhnregnier opened this issue · comments
Julius commented
I'm wondering whether there is a false build path included in deda or whether it's just not correctly set up on my computer.
The call path is strange because there is no user "travis" on my computer, thus, I am wondering whether this is something that is hard-coded.
python3 deda_parse_print.py new_dots.pdf
OpenCV(3.4.1) Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /Users/travis/build/skvark/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp, line 731
Any idea?
timojuez commented
Hi Julius,
thanks for your message. Can you try again with a png or jpeg input? The
error message is indeed strange and obviously comes from opencv. Is
/Users/travis in your $PYTHONPATH?
Am So., 21. Okt. 2018 um 18:32 Uhr schrieb Julius <notifications@github.com
…:
I'm wondering whether there is a false build path included in deda or
whether it's just not correctly set up on my computer.
The call path is strange because there is no user "travis" on my computer,
thus, I am wondering whether this is something that is hard-coded.
python3 deda_parse_print.py new_dots.pdf
OpenCV(3.4.1) Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /Users/travis/build/skvark/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp, line 731
Any idea?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#13>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEQRD0QlSxkEy5-MEZDjg4QxzzFeKbgIks5unKG5gaJpZM4Xyi_X>
.
Julius commented
Hi Timo,
when inputting a PNG it works (see output):
Error detecting input image DPI. Assuming 0.000000 dpi. Specify parameter inputDpi!
Error detecting input image DPI. Assuming 0.000000 dpi. Specify parameter inputDpi!
Error detecting input image DPI. Assuming 0.000000 dpi. Specify parameter inputDpi!
Error detecting input image DPI. Assuming 0.000000 dpi. Specify parameter inputDpi!
No tracking dot pattern detected. For best results try a 300 dpi scan and a lossless file format.
Concerning your question with $PYTHONPATH, it isn’t even set. I also did `printenv | grep travis` but it came back with nothing.
… On Oct 21, 2018, at 7:56 PM, timojuez ***@***.***> wrote:
Hi Julius,
thanks for your message. Can you try again with a png or jpeg input? The
error message is indeed strange and obviously comes from opencv. Is
/Users/travis in your $PYTHONPATH?
Am So., 21. Okt. 2018 um 18:32 Uhr schrieb Julius ***@***.***
>:
> I'm wondering whether there is a false build path included in deda or
> whether it's just not correctly set up on my computer.
> The call path is strange because there is no user "travis" on my computer,
> thus, I am wondering whether this is something that is hard-coded.
>
> python3 deda_parse_print.py new_dots.pdf
> OpenCV(3.4.1) Error: Assertion failed (!buf.empty() && buf.isContinuous()) in imdecode_, file /Users/travis/build/skvark/opencv-python/opencv/modules/imgcodecs/src/loadsave.cpp, line 731
>
> Any idea?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#13>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AEQRD0QlSxkEy5-MEZDjg4QxzzFeKbgIks5unKG5gaJpZM4Xyi_X>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Acghp9kJvH9R6vlSzh-3XBuVWXkYwvOfks5unLU4gaJpZM4Xyi_X>.
timojuez commented
Ok. Besides please note that your PNG seems to be very small. Automatic dpi detection works on A4 pages but shows 0.00 here. You can also set the number from the scanner's dpi setting with parameter --inputDpi.
Julius commented
Thanks for the reply. Just out of curiosity, what does that have to do with the error produced by opencv?
… On Oct 22, 2018, at 8:49 PM, timojuez ***@***.***> wrote:
Ok. Besides please note that your PNG seems to be very small. Automatic dpi detection works on A4 pages but shows 0.00 here. You can also set the number from the scanner's dpi setting with parameter --inputDpi.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Acghp7jq6wtExjUSEq0fioAsSMEGMVrwks5unhM4gaJpZM4Xyi_X>.
timojuez commented
If you give a PDF to opencv it produces an error. The rest were just hints ;)
Julius commented
Hmm, ok! Thanks in any case!
Though I’m still getting errors which have nothing to do with OpenCV when I input the DPI as well:
python3 deda_parse_print.py -d 300 path/to/scanned-file.pdf
Traceback (most recent call last):
File "deda_parse_print.py", line 85, in <module>
main()
File "deda_parse_print.py", line 83, in <lambda>
main = lambda:Main()()
File "deda_parse_print.py", line 42, in __call__
verbose=self.args.verbose)
File "/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/print_parser.py", line 67, in __init__
self._createYD_instance(ydColourRange=cp)
File "/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/print_parser.py", line 87, in _createYD_instance
yd = YDX(**ydxArgs)
File "/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/extract_yd.py", line 641, in __init__
im,inked = self.processImage(im,*args,**xargs)
File "/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/extract_yd.py", line 231, in processImage
%tuple(reversed(im.shape[:2])))
AttributeError: 'NoneType' object has no attribute 'shape'
… On Oct 22, 2018, at 11:23 PM, timojuez ***@***.***> wrote:
If you give a PDF to opencv it produces an error. The rest were just hints ;)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AcghpwwWGdzp27rthXLNli_H1_3v6QMCks5unjdPgaJpZM4Xyi_X>.
timojuez commented
Please use a PNG and add -d whenever it does not detect the dpi right.
Converting a pdf to png may change the dpi. Do this carefully or use the
scanner program's png output.
Am Mo., 22. Okt. 2018 um 23:28 Uhr schrieb Julius <notifications@github.com
…:
Hmm, ok! Thanks in any case!
Though I’m still getting errors which have nothing to do with OpenCV when
I input the DPI as well:
python3 deda_parse_print.py -d 300 path/to/scanned-file.pdf
Traceback (most recent call last):
File "deda_parse_print.py", line 85, in <module>
main()
File "deda_parse_print.py", line 83, in <lambda>
main = lambda:Main()()
File "deda_parse_print.py", line 42, in __call__
verbose=self.args.verbose)
File
"/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/print_parser.py",
line 67, in __init__
self._createYD_instance(ydColourRange=cp)
File
"/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/print_parser.py",
line 87, in _createYD_instance
yd = YDX(**ydxArgs)
File
"/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/extract_yd.py",
line 641, in __init__
im,inked = self.processImage(im,*args,**xargs)
File
"/Users/user/Library/Python/3.6/lib/python/site-packages/libdeda/extract_yd.py",
line 231, in processImage
%tuple(reversed(im.shape[:2])))
AttributeError: 'NoneType' object has no attribute 'shape'
> On Oct 22, 2018, at 11:23 PM, timojuez ***@***.***> wrote:
>
> If you give a PDF to opencv it produces an error. The rest were just
hints ;)
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub <
#13 (comment)>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AcghpwwWGdzp27rthXLNli_H1_3v6QMCks5unjdPgaJpZM4Xyi_X
>.
>
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#13 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEQRD0PaE_JV_QGh06Lph_3LNtLXzCi5ks5unjiFgaJpZM4Xyi_X>
.