Optical palpation is an emerging elastography technique that generates two-dimensional images of mechanical stress at the tissue surface, with clinical applications such asintraoperative cancer detection and scar assessment. It has been implemented using various imaging systems, however, an analysis of how deformation of the sample and layer influences image formation has not been performed. Here, an analysis framework is presented, which assesses performance independently of the imaging system used. Optical palpation of varying samples and layers is simulated using finite element analysis and validated with experiments on silicone phantoms, providing a characterization of detectability, feature resolution, and contrast ratio. Using our framework, we demonstrate that computational optical palpation, which incorporates realistic assumptions of layer deformation, improves the feature resolution up to a factor of four. This framework can guide the development of optical palpation and aid in the selection of appropriate imaging system and layer properties for a given application.