what is the fastest way to do patch-based image analysis
hi,
I am trying to do some analysis over an image but i need to do that patch by patch. I am using opencv python for this purpose. but this way it takes long time(3 mins) for an mid resolution image (1980 * 1020),
is there any fast way or its the best that i can get?!
why would the patch-based version be faster ?
What do you mean Berak? its way faster using c++ opencv, ok I know c++ is faster than python but the difference is more than i expected. and also I am doing very simple calculation on every patch why should it take that long?
How fast is the C++ version?
ah I am looking for high luminance occurrence in every patch:
about 20 sec FooBar
ah, ok. iterating with ranges over pixels is sloooow.
basically, you're looking for local maxima ?
yep, at this moment
start at least with parallel for loops for each patch since the operation is independent for each patch :)
StevenPuttemans: I would need later to go for neighborhood, so don't think parallel can help me :(
It depends, if you need a 4*4 neighborhood, then simply go for block processing in the parallel loop instead of single regions. Will still increase performance since you can do multiple blocks at a time.