  Compensated convex transforms have been introduced for extended real-valued
functions defined over $\mathbb{R}^n$. In their application to image
processing, interpolation, and shape interrogation, where one deals with
functions defined over a bounded domain, one was making the implicit assumption
that the function coincides with its transform at the boundary of the data
domain. In this paper, we introduce local compensated convex transforms for
functions defined in bounded open convex subsets $\Omega$ of $\mathbb{R}^n$ by
making specific extensions of the function to the whole space, and establish
their relations to globally defined compensated convex transforms via the mixed
critical Moreau envelopes. We find that the compensated convex transforms of
such extensions coincide with the local compensated convex transforms in the
closure of $\Omega$. We also propose a numerical scheme for computing Moreau
envelopes, establishing convergence of the scheme with the rate of convergence
depending on the regularity of the original function. We give an estimate of
the number of iterations needed for computing the discrete Moreau envelope. We
then apply the local compensated convex transforms to image processing and
shape interrogation. Our results are compared with those obtained by using
schemes based on computing the convex envelope from the original definition of
compensated convex transforms.
