Kornia enhancement on very large image tensors #1927
Replies: 1 comment 2 replies
-
The current code of CLAHE is based on the OpenCV implementation which contains some tricks to speed up the process. Probably for this reason the result is not the same as SciKit, anyway please compare the results with OpenCV. As far as I remember is not difficult to modify the code to get the same results as the original CLAHE algorithm but I do not remember exactly. Not sure how difficult can be injecting a histogram, I suppose it can be posible with a bypass of the function that computes the histograms. Anyway, for sure, the internal code needs to be changed so, I think it is easier to add a flag in the method to select nice results vs fast. |
Beta Was this translation helpful? Give feedback.
-
We're currently working with very large images that do not fit into the GPU memory, for which we'd like to use the CLAHE enhancement.
Problem statement:
Creating smaller patches of the image and applying the enhancement per patch creates unwanted artifacts. For example, a patch of low varying pixel values will be overly-enhanced, compared to other patches from the complete image.
We're currently using the Scikit-learn CLAHE implementation (which gives fine results but does not make use of the GPU) but we'd like to move toward the Kornia one, to improve the speed of this.
Questions:
Would it be feasible to apply the Kornia implementation of the CLAHE, per patch, using the pixel distribution information from the whole image? For example, we could pre-calculate and provide an histogram for the whole image).
Would it require important modifications to the Kornia code base?
Beta Was this translation helpful? Give feedback.
All reactions