Skip to content
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

JavaScript conversion - some help requested #7

Closed
pdr0663 opened this issue Jan 29, 2017 · 1 comment
Closed

JavaScript conversion - some help requested #7

pdr0663 opened this issue Jan 29, 2017 · 1 comment

Comments

@pdr0663
Copy link

pdr0663 commented Jan 29, 2017

Firstly, thank you for developing this code, it's quite impressive. I'm trying to port this to JavaScript to run in node.js on a little Raspberry Pi project I'm doing. I'm not familiar with C++, so some of the syntax is beyond me at this stage, and I'd appreciate a little help to interpret your code. I'll list the bits I don;t understand, and invite you to comment. I'm looking at your image.cpp code.

Mat gray(image.size(), CV_MAKETYPE(image.depth(), 1)); // To hold Grayscale Image
I'm not sure about this syntax. it looks to my eyes like a variable or function declaration, but seems to be neither. Are you declaring a variable with name "gray", and instantiating somehow? Is "gray" a function?

vector<vector<Point> > contours; vector<Vec4i> hierarchy; vector<Moments> mu(contours.size()); vector<Point2f> mc(contours.size());
This one's got me as well. Can't seem to find "mu" or "mc" as functions. Is "vector" a class in your project, or does it come from OpenCV? The syntax is completely foreign to me, perhaps you could explain what is being done in these lines...

Thanks for any help you can provide.

Paul

@pdr0663
Copy link
Author

pdr0663 commented Feb 1, 2017

Done, completed and working. A little slow in node.js...

Thanks for your fine work!

Paul

@pdr0663 pdr0663 closed this as completed Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant