A sensor device comprising a two-dimensional array of ultrasonic transducers, wherein the two-dimensional array of ultrasonic transducers is substantially flat, a non-uniform contact layer overlying the two-dimensional array of ultrasonic transducers, and a sensor processor is described. The sensor device is configured to: transmit ultrasonic signals using the two-dimensional array of ultrasonic transducers for reflection from an object in contact with the non-uniform contact layer, wherein the ultrasonic signals traverse the non-uniform contact layer, receive reflected ultrasonic signals at the two-dimensional array of ultrasonic transducers, obtain non-uniformity data characterizing the non-uniform contact layer, control operating parameters of the sensor device based on the non-uniformity data, and generate an image of the object in contact with the non-uniform contact layer based on the reflected ultrasonic signals, wherein the image is corrected for non-uniformity of the non-uniform contact layer.