How to use the integral images in opencv java Api

asked 2015-05-07 04:01:05 -0500

RB gravatar image

i am making some image processing and intensive calculations, so the result is very slow, and i want to use the integral image.

is there any function i opencv with java API that allow using integral images?

edit retag flag offensive close merge delete

Comments

while you can access integral() in java, to so something useful with it, you'd have to access the output pixels, hmm.

berak gravatar imageberak ( 2015-05-07 04:11:43 -0500 )edit

@berak sorry i did not get what you want to say..would you please clarify?

RB gravatar imageRB ( 2015-05-07 04:17:38 -0500 )edit
1

yea, sorry, that was lame.

just do not put() or get() a single pixel, instead use some 'bulk' access:

int [] pixels = new int[img.total()*img.elemSize()]; img.get(0,0,pixels); // work with java pixels array img.put(0,0,pixels);

berak gravatar imageberak ( 2015-05-07 04:23:18 -0500 )edit