dfd-tud / deda

https://dfd.inf.tu-dresden.de
GNU General Public License v3.0
1.57k stars 92 forks source link

OpenCV false build path? #13

Closed jkuhnregnier closed 5 years ago

jkuhnregnier commented 5 years ago

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 5 years ago

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 newdots.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 https://github.com/dfd-tud/deda/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AEQRD0QlSxkEy5-MEZDjg4QxzzFeKbgIks5unKG5gaJpZM4Xyi_X .

jkuhnregnier commented 5 years ago

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 notifications@github.com 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 <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 newdots.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 https://github.com/dfd-tud/deda/issues/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 https://github.com/dfd-tud/deda/issues/13#issuecomment-431689614, or mute the thread https://github.com/notifications/unsubscribe-auth/Acghp9kJvH9R6vlSzh-3XBuVWXkYwvOfks5unLU4gaJpZM4Xyi_X.

timojuez commented 5 years ago

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.

jkuhnregnier commented 5 years ago

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 notifications@github.com 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 https://github.com/dfd-tud/deda/issues/13#issuecomment-431934085, or mute the thread https://github.com/notifications/unsubscribe-auth/Acghp7jq6wtExjUSEq0fioAsSMEGMVrwks5unhM4gaJpZM4Xyi_X.

timojuez commented 5 years ago

If you give a PDF to opencv it produces an error. The rest were just hints ;)

jkuhnregnier commented 5 years ago

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 main() File "deda_parse_print.py", line 83, in 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 notifications@github.com 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 https://github.com/dfd-tud/deda/issues/13#issuecomment-431992472, or mute the thread https://github.com/notifications/unsubscribe-auth/AcghpwwWGdzp27rthXLNli_H1_3v6QMCks5unjdPgaJpZM4Xyi_X.

timojuez commented 5 years ago

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 main() File "deda_parse_print.py", line 83, in 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 notifications@github.com 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 < https://github.com/dfd-tud/deda/issues/13#issuecomment-431992472>, 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 https://github.com/dfd-tud/deda/issues/13#issuecomment-431994479, or mute the thread https://github.com/notifications/unsubscribe-auth/AEQRD0PaE_JV_QGh06Lph_3LNtLXzCi5ks5unjiFgaJpZM4Xyi_X .