GithubHelp home page GithubHelp logo

node-fv's People

Contributors

dependabot[bot] avatar schulzch avatar sourcehunter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-fv's Issues

Run FormReader.find() and bypass barcode scanning?

Hello,
I'm having some issues running a .find() on an image. I am getting this error:

/Users/demouser/node_modules/fv/lib/find_barcodes.js:29
  clearedImage = new dv.Image(image);
                 ^
TypeError: expected (image: Image) or (image1: Image, image2: Image, image3: Image) or (format: String, image: Buffer, [width: Int32, height: Int32]) or no arguments at all

Would you happen to know why I am getting this error? I have verified that my image object is indeed there.

installation issue

I've tried it in many ways and on several different machines and it always happens the same error.

[email protected] install C:\Users\edson\node_modules\dv

node-gyp rebuild

C:\Users\edson\node_modules\dv>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Users\edson\node_modules\dv\build\deps\jpg\jpg.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.
Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on
disk.
C:\Users\edson\node_modules\dv\build\deps\lodepng\lodepng.vcxproj(20,3): error MSB4019: The imported project "C:\Micros
oft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file e
xists on disk.
C:\Users\edson\node_modules\dv\build\deps\tesseract\libtesseract.vcxproj(20,3): error MSB4019: The imported project "C:
\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the
file exists on disk.
C:\Users\edson\node_modules\dv\build\deps\zxing\libzxing.vcxproj(20,3): error MSB4019: The imported project "C:\Microso
ft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file ex
ists on disk.
C:\Users\edson\node_modules\dv\build\deps\opencv\libopencv.vcxproj(20,3): error MSB4019: The imported project "C:\Micro
soft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file
exists on disk.
C:\Users\edson\node_modules\dv\build\deps\lswms\liblswms.vcxproj(20,3): error MSB4019: The imported project "C:\Microso
ft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file ex
ists on disk.
C:\Users\edson\node_modules\dv\build\deps\leptonica\liblept.vcxproj(20,3): error MSB4019: The imported project "C:\Micr
osoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file
exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\edson\node_modules\dv
gyp ERR! node -v v7.1.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\edson\package.json'
npm WARN edson No description
npm WARN edson No repository field.
npm WARN edson No README data
npm WARN edson No license field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "fv"
npm ERR! node v7.1.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dv package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dv
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dv
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\edson\Desktop\Doc APOLO\ideias\fv\npm-debug.log

Installation error

Error while installing fv using npm

virtual memory exhausted: Cannot allocate memory
make: *** [Release/obj.target/libopencv/deps/opencv/modules/imgproc/src/color1.o] Error 1

form.match doesn't use coordinates from given schema

Hi,

first let me thank you for this great library! It saved me a lot of time!

I am not sure what I am doing wrong or if it is not supported:

I defined my schema as follows:

formSchema = {
    page: {
        x:0,
        y:0,
        width: 1833,
        height: 971
    },
    words: [],
    fields: [
        {
            path: 'age_1',
            type: 'text',
            box: {
                x: 385,
                y: 213,
                width: 65,
                height: 94
            }
        },
        {
            path: 'age_2',
            type: 'text',
            box: {
                x: 454,
                y: 213,
                width: 65,
                height: 94
            }
        },
            fieldValidator: function(value) {return true;}
        }
    ]
};

Whenever I call form.match like follows ...

form.match(formSchema, (function (_this) {
    return function (err, formData) {
        console.log(formData);
        //console.log(form.toObject());
        //return fs.writeFile('example.log.png', form.toImage().toBuffer('png'));
    };
})(this)); 

.. it doesn't match the given positions but has other x and y coordinates in the result set:

age_1: 
   { value: 'i',
     confidence: 75,
     box: { x: 306, y: 297, width: 203, height: 96 },
     conflicts: [] },
  age_2: 
   { value: 'Jahre',
     confidence: 88,
     box: { x: 542, y: 234, width: 81, height: 25 },
     conflicts: [] } }

I double checked the positions/coordinates with photoshop - they are correct as set up in the schema.
Any idea?

Thanks a lot!
Florian

Error Finding Barcodes

Processing: m10-printed.png
  Removing Red
Image { depth: 32, height: 1141, width: 1630 }
Removed
/Volumes/Storage/Git Projects/Scanalytics Server/node_modules/fv/lib/find_barcodes.js:29
  clearedImage = new dv.Image(image);
                 ^

TypeError: expected (image: Image) or (image1: Image, image2: Image, image3: Image) or (format: String, image: Buffer, [width: Int
32, height: Int32])
    at module.exports.findBarcodes (/Volumes/Storage/Git Projects/Scanalytics Server/node_modules/fv/lib/find_barcodes.js:29:18)
    at FormReader.module.exports.FormReader.find (/Volumes/Storage/Git Projects/Scanalytics Server/node_modules/fv/lib/form_reader
.js:179:11)
    at FormReader.find (/Volumes/Storage/Git Projects/Scanalytics Server/node_modules/fv/lib/form_reader.js:3:57)
    at processImage (/Volumes/Storage/Git Projects/Scanalytics Server/app.js:65:23)
    at /Volumes/Storage/Git Projects/Scanalytics Server/app.js:137:14
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:416:3)

I am trying to test fv and I'm getting this error when it tries to integrate with dv. FV was able to remove red i think because there was a difference in depth and did not produce an error after logging. I also logged the Image being given to the actual find_barcodes.js script and it looked like this Image { depth: 8, height: 1141, width: 1630 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.