imglib / imglib2-algorithm

Image processing algorithms for ImgLib2
http://imglib2.net/
Other
22 stars 20 forks source link

Added integral images of squares #16

Closed stelfrich closed 8 years ago

stelfrich commented 8 years ago

This adds the option for integral images of higher order while keeping the API consistent. Not providing an order will generate the standard integral image by summing up the values.

StephanPreibisch commented 8 years ago

Hi, thanks for the effort. Just a question, are you referring to what's explained here? https://en.wikipedia.org/wiki/Summed_area_table#Extensions

stelfrich commented 8 years ago

Just a question, are you referring to what's explained here? https://en.wikipedia.org/wiki/Summed_area_table#Extensions

I had stumbled across this publication. But yes, that Wiki page describes the same principles that I have been working on at the recent hackathon.

axtimwalde commented 8 years ago

Nice! @StephanPreibisch @stelfrich are you aware of the 2011 pre-ImgLib2 2D implementations in Fiji? Is anybody working on the blockmatching part, I'd be interested in using this.

StephanPreibisch commented 8 years ago

I am aware of it, but not working on it @axtimwalde. Would be great to port it though :)

StephanPreibisch commented 8 years ago

@stelfrich great, did you run a test on it to make sure it still works right after the added changes?

stelfrich commented 8 years ago

@StephanPreibisch @stelfrich are you aware of the 2011 pre-ImgLib2 2D implementations in Fiji?

I was not aware of it, but I will take a look. Concerning the block matching: I don't think anyone is working on it at the moment (but I might be mistaken). But it might come in handy.

@stelfrich great, did you run a test on it to make sure it still works right after the added changes?

@StephanPreibisch I ran a test that is not included in this PR. Would you like me to add one that compares a computed integral image with expected outcome?

StephanPreibisch commented 8 years ago

If you could add some sort of JUnit test would be great of course ... e.g. compute the sum of pixels at some random locations in the image via the Integral Image and "by hand"? Would that be too much to ask? I know, we also did not do it before, but it would be good to start :)

stelfrich commented 8 years ago

@StephanPreibisch Definitely not too much to ask. I have implemented your idea, however, only for 2D for now.

StephanPreibisch commented 8 years ago

Great, thanks so much! And I assume it also works ... :)