I’m want to try using look up table (cvLUT) to check whether it is fast than the current way that I’m doing right now. The question is I don’t really understand how look up table works if I have different set of values Eg.
if(mean < 50)
//do gamma correction
else if(mean > 50 && mean < 100)
// do gamma correction
else
//do do gamma correction
I saw that we need to calculate the look up table first but the mean is calculated locally using local window. How can I do that? I tried stored the mean values in the vector and then use it but it is very slow when it’s stored in the vector.
I don’t think a lookup table is appropriate for what you are doing since the transformation is dependent on information in the local window. A lookup table is good if you want a transformation on all pixels that only depends on the pixel value and doesn’t depend on the value of other pixels.