Ask Your Question
0

read smaller Mat 'pixel by pixel' while sliding over bigger Mat

asked 2013-05-18 07:31:12 -0600

keltik gravatar image

I want to read a fixed-size-submat from a bigger Mat while sliding it over the bigger one pixel by pixel (or maybe 5 pixel by 5 pixel or somtheing like that, i hope you get the idea). Is there a predefined function for that in openCV, if so which one is it? (Besides i am using Java with opencv 2.4.5..) I have an idea how to write it myself in java using Mat.submat(a,b,c,d), but i thought that the underlying c++ dll implementation would be a lot faster.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-05-20 09:51:08 -0600

Guanta gravatar image

To make it short: Afaik, you have to write that yourself (two for loops sliding over large matrix and using submat with the correct indices).

If you just need the points and a step-size of 6 (I think 6 is the default) suits you, you can use FeatureDetector.create(DENSE) (note: under C++ you could specify the step size, etc.).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-05-18 07:31:12 -0600

Seen: 554 times

Last updated: May 20 '13