GPU Histogram Generation via Image Patch Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional methods for calculating histograms on graphics processing units (GPUs) are time-consuming and inefficient, particularly on mobile devices, as they require full scans of the entire input image.
Innovation Solution
The method involves partitioning the input image into smaller patches and using fragment shaders on the GPU to count pixel values for each grayscale level, allowing for the creation of image histograms in a small number of fast GPU passes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional full-scan methods are used to calculate histograms on GPUs, then measurement precision is maintained, but productivity deteriorates due to time-consuming processing
Solution Approach 1:
The input image is divided into multiple overlapping patches, and histograms are calculated for each patch independently in parallel. The final histogram is obtained by combining the patch histograms through addition. This segmentation enables parallel processing while maintaining the accuracy of the complete image histogram.
2Quantity of substance
If full image scans are performed on mobile GPUs, then complete histogram data is obtained, but use of energy deteriorates due to high computational load
Solution Approach 1:
The image is segmented into patches that can be processed independently and in parallel. This reduces the computational burden on mobile GPUs by distributing the workload across multiple smaller processing units, thereby lowering energy consumption while still producing complete histogram data through combination of patch results.
Solution Approach 2:
Instead of processing the entire image at once, the method processes partial regions (patches) independently. Each patch contributes a portion of the final histogram, and the combination of these partial results yields the complete histogram, reducing the energy required for any single processing operation.
3Productivity
If hierarchical patch processing is implemented, then productivity is improved through parallel processing, but device complexity increases
Solution Approach 1:
The image is divided into a hierarchical structure of patches at different levels. This segmentation enables parallel processing at multiple scales, improving productivity by utilizing the GPU's parallel architecture effectively while organizing the complexity in a structured manner.
Solution Approach 2:
The hierarchical patch structure implements a nested organization where smaller patches are grouped into larger regions, which are themselves grouped into even larger regions. This nested structure allows for systematic parallel processing and efficient memory management, improving productivity while containing device complexity through organized hierarchy.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
In a graphics processing unit (GPU), receiving an input image comprising an array of pixels. Each pixel having a grayscale value from a range of N grayscale values. For each particular input patch of pixels of a set of input patches partitioning the input image and in parallel for each particular grayscale value the range, counting the number of pixels in the particular input patch having the particular grayscale value. In parallel for each particular input patch of pixels of a set of input patches partitioning the input image, creating an output image patch as an ordered sequence of N pixels, with the color value of the nth pixel in each corresponding output patch representing the count of pixels in the particular input patch having the nth grayscale value. Combining the output image patches into a single composite output image of N pixels, the pixel value of the nth pixel in the single composite output image corresponding to the count of pixels in the input image having the nth grayscale value.