Ask Your Question

Feature vector Hu Moments of a video

asked 2016-02-16 10:33:20 -0500

bob409 gravatar image

I know how to find the Hu Moments for a frame that is double hu[7]; HuMoments(mom, hu);

But now i want to compute the huMoments for each frame in a video and store them to do classification afterwards. How to store huMoments for a video as a feature vector?

edit retag flag offensive close merge delete


be aware, that humoments only work nicely for a single contour.

throwing a whole video frame at it, might be a bad idea.

berak gravatar imageberak ( 2016-02-16 21:26:51 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-16 17:58:25 -0500

Tetragramm gravatar image

I'm afraid Hu Moments don't compare quite so easily. If you look at the implementation of matchShapes in the imgproc dll, you can see the math used to compare them.

In any case, you'll want to just hold them as a list of double[7]. Overall, it's a small amount of memory, even compared to one frame of video. Pick your favorite linear data structure, vector being the usual one.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-02-16 10:33:20 -0500

Seen: 177 times

Last updated: Feb 16 '16