03-08-2021 07:08 AM
@PietH wrote:But what about the maximum value?
If I want to calculate a maximum value from the 9 pixels and the 16 surrounding pixels.
Is that possible with vision?
Not with a kernel for sure, and I don't think any other function will do that either.
I think you'll have to DIY that, by getting the 2D array (or 2D Array DVR), and looping over it in 2 for loops.
The tricky part is to make it efficient. You'd want to avoid getting 9 pixels, and get the max of that array, for each pixel. You'd be doing a lot of calculations twice.
Finding a smarter way to do it might not be easy though. Avoiding recalculations means using extra memory, and also making the copies. That might not be more efficient.
I'd make it work first. And optimize only if it's too slow.
03-09-2021 05:37 AM
Thanks! I will try it out with 2D Array DVR.
Peter