An ultrasonic sensor comprising: a two-dimensional array of ultrasonic transducers, wherein the two-dimensional array of ultrasonic transducers is substantially flat; a contact layer overlying the two-dimensional array of ultrasonic transducers; a matching layer between the two-dimensional array of ultrasonic transducers and the contact layer, wherein the matching layer has a non-uniform thickness overlying the two-dimensional array of ultrasonic transducers; and an array controller configured to control activation of ultrasonic transducers during an imaging operation for imaging a plurality of pixels at a plurality of positions within the two-dimensional array of ultrasonic transducers, such that during the imaging operation, the array controller is configured to: activate a first subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a first region of the two-dimensional array of ultrasonic transducers at a first transmission frequency, wherein the first transmission frequency is determined such that a first thickness of the matching layer at the first region is substantially equal to a quarter wavelength of the first transmission frequency; activate a second subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a second region of the two-dimensional array of ultrasonic transducers at a second transmission frequency, wherein the second transmission frequency is determined such that a second thickness of the matching layer at the second region is substantially equal to a quarter wavelength of the second transmission frequency, wherein the first region and the second region are non-overlapping regions of the two-dimensional array of ultrasonic transducers and wherein the first thickness and the second thickness are different; and combine the plurality of pixels into a compound fingerprint image, wherein the compound fingerprint image compensates for the non-uniform thickness of the matching layer. a two-dimensional array of ultrasonic transducers, wherein the two-dimensional array of ultrasonic transducers is substantially flat; a contact layer overlying the two-dimensional array of ultrasonic transducers; a matching layer between the two-dimensional array of ultrasonic transducers and the contact layer, wherein the matching layer has a non-uniform thickness overlying the two-dimensional array of ultrasonic transducers; and an array controller configured to control activation of ultrasonic transducers during an imaging operation for imaging a plurality of pixels at a plurality of positions within the two-dimensional array of ultrasonic transducers, such that during the imaging operation, the array controller is configured to: activate a first subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a first region of the two-dimensional array of ultrasonic transducers at a first transmission frequency, wherein the first transmission frequency is determined such that a first thickness of the matching layer at the first region is substantially equal to a quarter wavelength of the first transmission frequency; activate a second subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a second region of the two-dimensional array of ultrasonic transducers at a second transmission frequency, wherein the second transmission frequency is determined such that a second thickness of the matching layer at the second region is substantially equal to a quarter wavelength of the second transmission frequency, wherein the first region and the second region are non-overlapping regions of the two-dimensional array of ultrasonic transducers and wherein the first thickness and the second thickness are different; and combine the plurality of pixels into a compound fingerprint image, wherein the compound fingerprint image compensates for the non-uniform thickness of the matching layer. activate a first subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a first region of the two-dimensional array of ultrasonic transducers at a first transmission frequency, wherein the first transmission frequency is determined such that a first thickness of the matching layer at the first region is substantially equal to a quarter wavelength of the first transmission frequency; activate a second subset of ultrasonic transducers of the two-dimensional array of ultrasonic transducers associated with a second region of the two-dimensional array of ultrasonic transducers at a second transmission frequency, wherein the second transmission frequency is determined such that a second thickness of the matching layer at the second region is substantially equal to a quarter wavelength of the second transmission frequency, wherein the first region and the second region are non-overlapping regions of the two-dimensional array of ultrasonic transducers and wherein the first thickness and the second thickness are different; and combine the plurality of pixels into a compound fingerprint image, wherein the compound fingerprint image compensates for the non-uniform thickness of the matching layer.