Open Anima-t3d opened 5 years ago
What version of OpenCV do you have installed?
How can I check? I think I saw something like 4.0.1
when I was running the install.
The issue is in node-opencv
var opencv = process.env.PKG_CONFIG_OPENCV3 === "1" ? "opencv3" : ' "opencv >= 2.3.1"';
The reason it errors is that you are using opencv 4. node-opencv has not been updated to opencv 4. You could try uninstall opencv 4 and install opencv 3 instead.
I ran brew uninstall opencv
and brew install opencv@3
, got a lot of warnings but it went through.
When I try to run the receipt-scanner
I get the following issue:
{ Error: Command failed: tesseract /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/tmp-1089275wv7gp4xOyq.png /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/node-tesseract-26fc5357-ccbb-4907-bf33-4784bdeb264d -l eng -psm 3
Error, unknown command line argument '-psm'
at ChildProcess.exithandler (child_process.js:297:12)
at ChildProcess.emit (events.js:193:13)
at maybeClose (internal/child_process.js:1001:16)
at Socket.stream.socket.on (internal/child_process.js:405:11)
at Socket.emit (events.js:193:13)
at Pipe._handle.close (net.js:614:12)
killed: false,
code: 1,
signal: null,
cmd:
'tesseract /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/tmp-1089275wv7gp4xOyq.png /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/node-tesseract-26fc5357-ccbb-4907-bf33-4784bdeb264d -l eng -psm 3' }
Seems like it's no longer supported in tesseract 4 and now uses --psm
I tried brew uninstall tesseract
and brew install tesseract@3
but couldn't find such version to install.
Yeah looking at https://github.com/desmondmorris/node-tesseract it doesn't support tesseract 4 yet.
@Schultzer Seems like node-tesseract is no longer maintained, there are a few pull requests addressing this issue already: https://github.com/desmondmorris/node-tesseract/pull/62
I applied the update as seen in desmondmorris/node-tesseract#62 in my local node_module
, however I got the following error:
{ Error: Command failed: tesseract /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/tmp-13564744nKwcbZlrp.png /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/node-tesseract-9f229b6e-506e-4271-8414-c4062099c744 -l eng --psm 3 --oem undefined
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
at ChildProcess.exithandler (child_process.js:297:12)
at ChildProcess.emit (events.js:193:13)
at maybeClose (internal/child_process.js:1001:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:266:5)
killed: false,
code: 1,
signal: null,
cmd:
'tesseract /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/tmp-13564744nKwcbZlrp.png /var/folders/s1/2w_5_wds32xd4t4pf5kddtgm0000gn/T/node-tesseract-9f229b6e-506e-4271-8414-c4062099c744 -l eng --psm 3 --oem undefined' }
Seems related to #61
When I run
npm install git+https://git@github.com/danschultzer/receipt-scanner.git
I get the following error:I tried re-installing and also https://stackoverflow.com/a/46743865/3163075 to no avail.
Might be related to https://github.com/peterbraden/node-opencv/issues/325