How to access pixels using pixel index in Mat::forEach?
Feature addition!
It would be great if Mat::forEach method allows us to access the neighboring pixels for interpolation! As per this Question, the current implementation of Mat::forEach method will not allow us to access the neighboring pixels.
Any help regarding this feature addition will be so helpful!
A similar implementation is the cuda kernal functions, where we can access any pixels from a single kernel! My idea is to reuse the cuda kernels code for CPU with minimum effort!
it probably gets better, if you can add, what kind of problem you're trying to solve ..
Yes with a single kernel you can access any pixels. But I have got some difficulty to understand how with a parallel (multithread) application you can access any pixel witthout conflict
@LBerger Yes that make sense! We cannot access any pixel without conflict!
again, maybe you can add some context here. could it be done with a filter matrix ?
No i may use pixel dependent kernal's like in demosaicing ,you need to use different interpolation methods for RGB for a single pixel!
Also i cannot use cvtcolor for demosaicing because i may need to use white balance too while demosaicing!