Reputation: 4784
I'm trying to build a basic video tracker that tracks an object by his histogram, i have a region (rectangle) where the object is initially located. And i want to get the histogram of the image in that region. (and then to look around in the next frame for that histogram).
How can i get an histogram in a specific area as efficiently as possible ?
p.s I work with c# + emgu .. but if there is no solution in emgu but there is in OpenCV it will be helpful too Thanks.
Upvotes: 0
Views: 1381
Reputation: 6615
the Emgu densehistogram class has a built in mask argument. I haven't used it but it might help.
hist.Calculate<Byte>(new Image<Gray, byte>[] { ImageFrame }, true, MASKGOESHERE);
Upvotes: 0
Reputation: 8725
What about setting ROI (region of interest) and work with it?
Upvotes: 1