You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: