I’ve started using EmguCV in C# and there is a bit of an adjustment, as method calls here are not all 1-to-1 as they are in C++.
If I have a histogram image to work with I call “hist”, and I wanted to access its elements to push to another vector, I would simply:
d.push_back(hist.at(i - 1));
There does not seem to be a .at method available in the emgu wrapper. Does anyone have experience with this, and would this be its C# equivalent?:
var histMatData = hist.GetData();
d.Add((float)histMatData.GetValue(i-1, 0)); //crashes when doing (0, i-1)
While I am at it, I want to make a new image with a Scalar specified. But there is no option in any constructor in EmguCV’s Mat object. How could I do this?
I can make two separate topics if that is considered more appropriate. Thanks in advance for any advice.