Image Filtering Using Histograms for Large Pixel Value Ranges
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for applying bilateral and trilateral filters to images are computationally slow, especially when dealing with large ranges of pixel values, as they require O(n2) operations due to the use of Gaussian functions for spatial components, which is inefficient for large filter radii.
Innovation Solution
The use of a 2-D box filter as the spatial component in combination with histogram techniques to speed up the filtering process, allowing for O(n) operations by generating and adjusting histograms for pixel values within defined ranges, thereby reducing computational complexity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a Gaussian function is used as the spatial component of the bilateral filter, then the filter accurately computes pixel values based on spatial closeness and photometric similarity, but the computational complexity increases to O(n2) operations for each pixel
Solution Approach 1:
The patent segments the continuous Gaussian spatial weighting function into discrete rectangular regions with constant weights. Instead of computing continuous Gaussian weights for each pixel pair, the image space is divided into rectangular zones where pixels within each zone share the same weight, reducing the computational burden while preserving the essential spatial decay behavior of the Gaussian function.
Solution Approach 2:
The patent changes the functional form of the spatial component from a continuous Gaussian function to a piecewise constant rectangular function. This parameter transformation allows the use of histogram-based techniques and reduces the computational complexity from O(n2) to O(n) operations per pixel, while maintaining the filtering effect through adjusted weight parameters.
2Productivity
If histogram based techniques are used to speed up bilateral filtering, then the filtering operation is accelerated, but the technique is not effective when the input data set spans a large range of integral or floating point values
Solution Approach 1:
The patent introduces a new dimension by combining spatial segmentation (rectangular regions in image space) with value-range segmentation (histograms). This two-dimensional approach allows the use of histograms not just for value distribution but also for spatial region characterization, enabling efficient filtering even when pixel values span large ranges by creating region-specific histograms that capture local statistics.
Solution Approach 2:
The patent performs preliminary computation by pre-calculating histograms for rectangular regions and storing them for reuse. These pre-computed histograms capture the distribution of pixel values within each spatial region, allowing subsequent filtering operations to quickly query and combine these pre-existing statistics rather than computing everything from scratch for each pixel.
3Measurement precision
If a large filter radius is used to process a wide area around each pixel, then more neighboring pixels are considered for accurate filtering, but the number of operations required increases significantly
Solution Approach 1:
The patent segments the large filter radius area into multiple rectangular regions, each with its own pre-computed histogram. Instead of processing all pixels within the large radius individually, the segmentation allows the algorithm to aggregate statistics from multiple regions efficiently, reducing the time complexity from quadratic to linear with respect to the filter radius while maintaining comprehensive coverage of the neighborhood.
Solution Approach 2:
The patent performs preliminary computation of histograms for all rectangular regions before the actual filtering pass. This pre-computation stores the essential statistical information needed for filtering, so that during the filtering phase, the algorithm only needs to query and combine these pre-existing histograms rather than re-processing the raw pixel data, significantly reducing processing time for large filter radii.
Data Source
AI summary
One embodiment of the present invention provides a system for applying a filter to an image whose pixel values can span a large range of values. During operation the system receives an image to which the filter is to be applied. The system then selects a first region within the image which is associated with a first pixel. Next, the system generates a first histogram using pixels within the first region whose values are within a first range of pixel values. Next, the system determines a new value for the first pixel using the first histogram. The system then selects a second region within the image which is associated with a second pixel. Next, the system determines if the second pixel value is within a second range of pixel values. If the second pixel value is within the second range of pixel values, the system determines a non-overlapping region between the first region and the second region. The system then generates a second histogram using the first histogram and pixel values in the non-overlapping region. Next, the system determines a new value for the second pixel using the second histogram.


