  We introduce discretizations of infinite-dimensional optimization problems
with total variation regularization and integrality constraints on the
optimization variables. We advance the discretization of the dual formulation
of the total variation term with Raviart--Thomas functions which is known from
literature for certain convex problems. Since we have an integrality
constraint, the previous analysis from Caillaud and Chambolle [10] does not
hold anymore. Even weaker $\Gamma$-convergence results do not hold anymore
because the recovery sequences generally need to attain non-integer values to
recover the total variation of the limit function. We solve this issue by
introducing a discretization of the input functions on an embedded, finer mesh.
A superlinear coupling of the mesh sizes implies an averaging on the coarser
mesh of the Raviart--Thomas ansatz, which enables to recover the total
variation of integer-valued limit functions with integer-valued discretized
input functions. Moreover, we are able to estimate the discretized total
variation of the recovery sequence by the total variation of its limit and an
error depending on the mesh size ratio. For the discretized optimization
problems, we additionally add a constraint that vanishes in the limit and
enforces compactness of the sequence of minimizers, which yields their
convergence to a minimizer of the original problem. This constraint contains a
degree of freedom whose admissible range is determined. Its choice may have a
strong impact on the solutions in practice as we demonstrate with an example
from imaging.
