Graphics Processing Units (GPUs) are increasingly used to accelerate scientific applications. The state-of-the-art limits the adaptability of GPU kernels to both problem parameters and hardware characteristics. This makes writing high performance libraries for GPUs challenging. We address these challenges through Kernel Specialization (KS) which supports both user and hardware parameters and produces highly optimized GPU code. We apply KS to Particle Image Velocimetry (PIV), a technique used to obtain instantaneous velocity measurements in fluids for such diverse applications as aircraft design and artificial heart design. KS helps the user search PIV's highly non-linear design space, supports a wide range of PIV parameters, and results in improved acceleration times over existing kernels.