Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

We propose in this paper to study all the digitizations generated from an euclidean curve by the action of a given group of transformations. This is done in order to use them for the evaluation of Euclidean geometric features digital estimators. Indeed, from the set of digitizations of a curve at a given resolution, one can get the set of values (and associated statistics) an estimator produces.

Many continuous geometric characteristics have been adapted to digital curves. This is the case of length, derivative, tangent, curvature, convexity, area. The performance of the developed estimators has been evaluated from an experimental point of view on one or more curves with one or more resolutions [1, 2, 5, 7, 8, 10, 12, 13, 16], or theoretically by the property of the multigrid convergence [3, 4, 7, 9, 1216]. An estimator is said to be multigrid convergent on a given curve set if its estimation converges toward the true value for any curve of the set when the grid step h tends to 0. This property insures that one can obtain an estimation of the characteristic with the desired precision provided the resolution is sufficiently high. It is used for an objective comparison of the estimators but it is not made to give precise information at a given resolution.

To complete this criterion, estimator comparison criteria at a fixed resolution have been proposed to estimate the perimeter [14] and the curvature [7]. For a given digital curve S, these criteria calculate the minimum of the (continuous) estimator on a family of continuous curves whose digitization at a given resolution is S. This minimum is then used as reference. These criteria imply two arbitrary choices, (1) the family of continuous curves, which must be relatively small to enable the calculation of the minimum (2) the choice of the statistical estimate that gives the criterion. Indeed, the two proposed criteria use the minimum estimation but it could have been, e.g., the mean estimation or the maximum likelihood estimation. These choices are constrained by the feasibility of the computation.

In all experimental or theoretical computations presented above, at a given resolution, a single digitization is associated with a continuous curve. However, during the digitization from the continuous curve, a certain variability is possible (for example, the position of the shape relatively to the sensor during the acquisition) and there does not exist an absolute grid that comes with the Euclidean space. We propose to take this variability into account when considering not one but a set of digitizations generated by the action of a group of transformations on the continuous curve before the step of digitization. The study of such a set of digitizations, at least for its combinatorial aspect, can be found in [6, 11] for the straight lines and the circles (actually the discs). In this article, we consider the case of function graphs and we limit ourselves to the group of translations. After a reduction of the problem, a bound for the cardinal of the set of curve digitizations up to translations is provided and an application to length estimation is presented.

2 Notations and Definitions

In this work, we restrict ourselves to the digitizations of function graphs. So, let us consider a function \(f:D\rightarrow \mathbb {R}\) where D is a closed bounded interval whose width is at least 2. We write \(\mathcal {C}(f)\) for the graph of f: \(\mathcal {C}(f)=\{(x,f(x))\mid x\in D\}\). The aim of this paper is to study the set of the digitizations of \(\mathcal {C}(f)\) obtained using the grids generated by the action of the group of translations on the standard grid. Equivalently, we can consider a unique grid, the standard one, and let the group of translations acts on the graph \(\mathcal {C}(f)\). This is the technical point of view that we have adopted in the present article. As a first consequence of this choice, we can assume without loss of generality that \(\min (D) = 0\) and \(f(0)=0\).

The common methods to model the digitization of the graph \(\mathcal {C}(f)\) are closely related to each other. In this paper, we assume an object boundary quantization (OBQ). This method associates to the graph \(\mathcal {C}(f)\) the digitization set \(\mathcal {D}ig(f)=\{(k,\left\lfloor f(k)\right\rfloor )\mid k\in D\cap \mathbb {N}\}\) where \(\left\lfloor \cdot \right\rfloor \) denotes the floor function. We write \(\mathbf {f}\) for the discrete function defined on \(\varGamma =D\cap \mathbb {N}\) whose graph is \(\mathcal {D}ig(f)\). The set \(\mathcal {D}ig(f)\) contains the uppermost grid points which lie in the hypograph of f, hence it can be understood as a part of the boundary of a solid object. Provided the slope of f is limited by 1 in modulus, \(\mathcal {D}ig(f)\) is an 8-connected digital curve. Otherwise, one generally uses symmetries on the graph \(\mathcal {C}(f)\) in order to come down to the previous case. Nevertheless, in this paper, we make no assumption on the slope of f since we are not concerned with connectivity.

Let \(u=(x,y)\in \mathbb {R}^2\). The translate by \(-u\) of the graph \(\mathcal {C}(f)\) is the graph of the function \(f_u\) defined by

$$f_u:t\in (D - x)\mapsto f(t+x)-y.$$

The digitization set \(\mathcal {D}ig(f_u)\) is a finite subset of \(\mathbb {Z}^2\) and we are only interested in the relative positions of its elements (in other words, \(\mathbb {Z}^2\) is viewed as a geometrical subset of the Euclidean plane without any preferential origin). Thus, rather than the set \(\mathcal {D}ig(f_u)\), we will consider its translate \(\mathcal {D}ig_0(f_u) \) whose leftmost point is the origin (0, 0). We write \(\mathbf {f}_{u}\) for the function whose graph is \(\mathcal {D}ig_0(f_u)\) and we write \(\varGamma _x\) for the domain of \(\mathbf {f}_u\) (\(\varGamma _x = (D-x)\cap \mathbb {N}\)).

The next proposition will allow us to reduce the space of the translation vectors that have to be considered in our study and, incidentally, we will be able to give an expression of the function \(\mathbf {f}_u\).

Proposition 1

Let u, v \(\in \mathbb {R}^2\) such that \(u - v\in \mathbb {Z}^2\). Then, \(\mathcal {D}ig(f_{v}) = \mathcal {D}ig(f_{u}) + u-v\).

Proof

We set \(u = (u_x, u_y)\), \(v = (v_x, v_y)\) and \(w=u-v=(w_x, w_y)\). Then \((x,y)\in \mathcal {D}ig(f_v)\) iff \(x+v_x\in \mathbb {Z}~\text {and}~y = \left\lfloor f(x+v_x) - v_y\right\rfloor \). On the one hand \(x+v_x\in \mathbb {Z}\) iff \(x+u_x\in \mathbb {Z}\) for \(w_x=u_x-v_x\in \mathbb {Z}\). On the other hand, since \(w_y\in \mathbb {Z}\), we have

$$\left\lfloor f(x+v_x) - v_y\right\rfloor = \left\lfloor f(x + v_x) - u_y\right\rfloor + w_y = \left\lfloor f\big ((x - w_x) +u_x\big )-u_y\right\rfloor + w_y.$$

Thus \((x,y)\in \mathcal {D}ig(f_v)\) iff \((x, y) \in \mathcal {D}ig(f_{u}) + w\).    \(\square \)

As a consequence of Proposition 1, we have \(\mathcal {D}ig_0(f_{u+w}) = \mathcal {D}ig_0(f_u)\) for any \(w\in \mathbb {Z}^2\). Hence, in the sequel we may assume without loss of generality that the translation vector u lies in \([0,1)^2\). Then, from the hypotheses on f we derive that the smaller integer in \(D-x\), the domain of \(f_u\), is 0. Moreover, we can now define the discrete function \(\mathbf {f}_u\) as follows

$$\mathbf {f}_{u}:k\in \varGamma _x \mapsto \left\lfloor f_u(k)\right\rfloor - \left\lfloor f_u(0)\right\rfloor .$$

Let \(I\subseteq [0,1)^2\). The family of all the digitization sets \(\mathcal {D}ig_0(f_u)\), \(u\in I\), is noted \(\mathcal D^{I}(f)\) and we write \(\mathcal D(f)\) for \(\mathcal D^{[0,1)^2}(f)\). We have the following straightforward property

$$\begin{aligned} \forall I, J\subseteq [0,1),\ {\text {card}}~{\mathcal {D}^{I\cup J}(f)} \le {\text {card}}~{\mathcal {D}^I(f)} + {\text {card}}~{\mathcal {D}^{J}(f)}. \end{aligned}$$
(1)

3 Combinatorial Properties of \(\mathcal D(f)\)

In this section, \([\![x, y]\!]\) stands for \([x, y]\cap \mathbb {Z}\), \(\langle {x}\rangle \) denotes the fractional part, that is \(\langle {x}\rangle = x -\left\lfloor x\right\rfloor \), and we write \(\langle \!\langle {x}\rangle \!\rangle \) for the ‘upper fractional part’: \(\langle \!\langle {x}\rangle \!\rangle = \langle {-x}\rangle \). Both \(\langle {x}\rangle \) and \(\langle \!\langle {x}\rangle \!\rangle \) lie in [0, 1).

3.1 0n the Cardinal of the Digitization Set \(\mathcal {D}ig(f_u)\)

When translating the graph \(\mathcal {C}(f)\) by a vector \(u(x, y)\in [0,1)^2\), the domain of the discrete function \(\mathbf {f}_u\) can change in size. In this subsection, we describe these changes.

Lemma 1

Let \(a, b\in \mathbb {R}\). Then,

$${\text {card}}\big ([a,b]\cap \mathbb {Z}\big ) = \left\lfloor b-a\right\rfloor + \varepsilon $$

where \(\varepsilon = 0\) if \(\langle \!\langle {a}\rangle \!\rangle + \langle {b}\rangle \ge 1\) and \(\varepsilon = 1\) otherwise.

Proof

Firstly, we observe that

$$\begin{aligned} {\text {card}}([\![a, b]\!]) = {\text {card}}([\![\left\lceil a\right\rceil , \left\lfloor b\right\rfloor ]\!]) = \left\lfloor b\right\rfloor - \left\lceil a\right\rceil + 1 = b - \langle {b}\rangle - (a + \langle \!\langle {a}\rangle \!\rangle ) + 1. \end{aligned}$$

That is,

$$\begin{aligned} {\text {card}}([\![a, b]\!]) = b - a - (\langle \!\langle {a}\rangle \!\rangle + \langle {b}\rangle - 1). \end{aligned}$$

Secondly, from the very definition of \(\langle {\cdot }\rangle \) and \(\langle \!\langle {\cdot }\rangle \!\rangle \), we have

$$ -1\le \langle \!\langle {a}\rangle \!\rangle + \langle {b}\rangle - 1 < 1. $$

Then, setting \(\varepsilon = 0\) if \(\langle \!\langle {a}\rangle \!\rangle + \langle {b}\rangle - 1 \ge 0\) and \(\varepsilon = 1\) otherwise, we have

$$ b-a-1<{\text {card}}([\![a, b]\!]) - \varepsilon \le b-a . $$

Taking into account that \({\text {card}}([\![a, b]\!])\in \mathbb {N}\), we conclude that

$${\text {card}}([\![a, b]\!]) - \varepsilon = \left\lfloor b-a\right\rfloor .$$

   \(\square \)

Proposition 2

Let \( D=[0,\ell ]\) and \(x\in [0,1)\). Then,

$$ {\text {card}}~{(D-x)\cap \mathbb {N}} = {\left\{ \begin{array}{ll} \left\lfloor \ell \right\rfloor \,~\text {if}~x > \ell \\ \left\lfloor \ell \right\rfloor +1~\text {otherwise.} \end{array}\right. } $$

Proof

From Lemma 1, we derive that

$$\begin{aligned}{}[-x, \ell -x]\cap \mathbb {Z}= {\left\{ \begin{array}{ll} \left\lfloor \ell \right\rfloor ~\text {if}\langle \!\langle {-x}\rangle \!\rangle +\langle {\ell -x}\rangle \ge 1 \\ \left\lfloor \ell \right\rfloor + 1~\text {otherwise.} \end{array}\right. } \end{aligned}$$

It can be seen that \(\langle \!\langle {-x}\rangle \!\rangle = x\) and

$$\begin{aligned} \langle {\ell -x}\rangle = {\left\{ \begin{array}{ll} \langle {\ell }\rangle {- x}~\text {if}~x \le \langle {\ell }\rangle ,\\ \langle {\ell }\rangle {- x} + 1~\text {otherwise.} \end{array}\right. } \end{aligned}$$

Then, the reader can check that \(\langle \!\langle {-x}\rangle \!\rangle +\langle {\ell -x}\rangle \ge 1\) iff \( \langle {\ell }\rangle < x\).    \(\square \)

3.2 Translation Along the Y Axis

The number of digitizations obtained by vertical translations of the graph \(\mathcal {C}(f)\) is bounded.

Proposition 3

Let \(f:D\rightarrow \mathbb {R}\). Then,

$$ {\text {card}}~{\left( \mathcal D^{\{0\}\times [0,1)}(f)\right) }\le {\text {card}}~{(\varGamma )}. $$

Proof

Let \(k\in \varGamma {\setminus }\{0\}\), \(0<y<1\) and \(\mathbf {u} = (0,y)\). Then

$$\mathbf {f}_u(k)=\left\lfloor f_u(k)\right\rfloor -\left\lfloor f_u(0)\right\rfloor =\left\lfloor f(k)-y\right\rfloor +1 ={\left\{ \begin{array}{ll} \left\lfloor f(k)\right\rfloor +1~\text {if}~0 < y\le \langle {f(k)}\rangle ,\\ \left\lfloor f(k)\right\rfloor ~\text {otherwise.} \end{array}\right. } $$

Thus, the set of the digitizations generated by the translations along the Y axis is \( \{\mathcal {D}ig_0(f_{(0,y)})\mid y\in \{\langle {f(k)}\rangle \}_{k\in \varGamma }\}\) and its cardinal is less than, or equal to, \({\text {card}}~{(\varGamma )}\).    \(\square \)

3.3 Translations Along the X Axis

Unlike vertical translations, horizontal translations may yield infinitely many digitizations when the function f is unbounded. Indeed, consider the inverse function \(\mathtt{inv}:[0,2]\rightarrow (0,+\infty )\) extended in zero by \(\mathtt{inv}(0)=0\). Then, its family of digitization sets is \(\mathcal D(\mathtt{inv})=(S_i)_{i\in \mathbb {N}}\) with

$$ S_0=\{O, Q, R\} \ ~\text {and, for any}~i>0,\ S_i=\{O, P_i\}$$

where O is the origin and Q, R, \(P_i\) are the points with coordinates (1, 1), (2, 0), \((1,-n)\).

If the function f is bounded, say \(f(D)\subseteq [m,M]\), then it is plain that \({\text {card}}~{\mathcal {D}^{[0,1)\times \{0\}}(f)}\le (M-m+1)^{{\text {card}}~{\varGamma {\setminus }\{0\}}}\). We obtain the bound with horizontal translations of functions like the following whose graph is depicted in Fig. 1:

$$\begin{aligned} g:[0,\ell ]&\rightarrow [0,M]\\ x&\mapsto 2M\,\left|\langle {M^{\left\lfloor x\right\rfloor }\, x }\rangle -\tfrac{1}{2}\right|. \end{aligned}$$
Fig. 1.
figure 1

Graph of the function g for \(M=3\)

An amazing consequence is that any set of points which is a function graph on a finite rectangular discrete grid is the digitization of the function g for some position of the grid. Thus, any ‘good’ geometric feature estimator should return the value for g.

In the previous example, the total variation of the function g is \((2M(M^\ell -1)/(M-1)\). It is about twice the cardinal of \(\mathcal {D}(g)\). The factor 2 vanishes if we replace the continuous function g by the non continuous function \(h:x\mapsto M\times \langle {M^{\left\lfloor x\right\rfloor }\, x }\rangle \). From the digitization point of view, the difference is that, with the function h, the digitizations are uniquely generated when the translation vector norm goes from 0 to 1 whereas they are produced twice with the function g. This leads us to study the links between the changes of digitizations during the translation process and the total variation of the function. Indeed, for a horizontal translation, the digitization changes depend on the function f variation. These changes are given in the sets \(E_{f,i,I}\). Let \(\mathcal U\) be the family of open sets for the usual topology of [0, 1). For any \(i\in \varGamma \) and any \(I\subseteq [0,1)\), we define the set \(E_{f,i,I}\subset \{i\}\times I\) by

$$\begin{aligned} E_{f,i, I} = \{(i,x) \mid \forall U\in \mathcal U, x\in U\implies \exists x'\in U,\, \left\lfloor f(i+x')\right\rfloor \ne \left\lfloor f(i+x)\right\rfloor \} \end{aligned}$$

and we set \(E_{f,I} = \sqcup _{i\in \varGamma }E_{f,i,I}\), \(E_{f} = E_{f,[0,1)}\).

Figure 2 illustrates this definition.

Fig. 2.
figure 2

The set \(E_{f}\) for the function \(f:x\mapsto \sqrt{2}\sin (\pi /4-2x)-1\), \(x\in [0,3.5]\). A pair (ix) is in \(E_f\) iff \((i+x,f(i+x))\) is the centre of a green circle. We get (in the lexicographical order): \(E_{f}=\{(0,0),(0,\tfrac{\pi }{8}),(0,\tfrac{\pi }{4}), (1,\tfrac{\pi }{2}-1),(1,\tfrac{5\pi }{8}-1),(2,\tfrac{3\pi }{4}-2),(3,\pi -3)\}\) (Color figure online).

As the set \(E_{f,I}\) indexes all the changes of digitization for the function f when the abscissa of the translation vector \(u=(x,0)\) lies in I, the number of distinct digitizations for f under horizontal translations is less than, or equal to, the cardinal of \({E_{f,I}}\) plus one:

$$\begin{aligned} {\text {card}}~{\mathcal {D}^I(f)}\le 1 + \sum _{i\in \varGamma } {\text {card}}~{E_{f,i,I}}. \end{aligned}$$
(2)

We are now able to link the changes of digitization with the total variation of the function. Firstly, we recall that for any real function \(f:D\rightarrow \mathbb {R}\), the total variation is defined as \(\sup _\sigma \sum _i \left|f(x_{i+1})-f(x_i)\right|\) where the supremum is over all the partitions \(\sigma =(x_i)\) of the interval D. Even if f is continuous, and though D is compact, the total variation may be infinite (consider for instance the continuous completion of the function \(x\sin (1/x)\)). Alike, we define for any real function \(f:D\rightarrow \mathbb {R}\) the number of monotonicity changes – which may also be infinite – as \(\sup _\sigma {\text {card}}\{i\mid (f(x_{i})-f(x_{i-1}))(f(x_{i+1})-f(x_{i}))<0\}\).

Lemma 2

Let \(f:D\rightarrow \mathbb {R}\), \(i\in \varGamma \) and I a subinterval of [0, 1). Then,

$$ {\text {card}}~{E_{f,i,I}} \le n + V$$

where n is the number of monotonicity changes in \(i+I\) and, V the total variation of f on \(i+I\).

Proof

If \(n=+\infty \), Lemma 2 is obvious. We now assume that n is finite. Let \(i\in \mathbb {N}\) and \(a_0< a_1< \cdots < a_{n+1}\) be a partition of the topological closure of the interval \(i+I\) such that f is monotonic on each subinterval \([a_i, a_{i+1}]\) and changes its monotonicity in each \(a_i\), \(1 \le i \le n\). Then, it is plain that the cardinal of \(E_{f,i,I}\) , that is the number of changes of \(\left\lfloor f(i+x)\right\rfloor \) when x lies in I, is equal to

$$ \sum _{i\in J} 1+\left\lfloor f(a_{i+1})\right\rfloor - \left\lceil f(a_{i})\right\rceil + \sum _{i\in K} 1+\left\lfloor f(a_{i})\right\rfloor - \left\lceil f(a_{i+1})\right\rceil $$

where \(J=\{i\in [\![0,n]\!]\mid f(a_i) \le f(a_{i+1})\}\) and \(K = [\![0,n ]\!]{\setminus } I\). Thus, \({\text {card}}(E_{f,i,I}) \le n+1 + \sum _i \left|f(a_{i+1}) - f(a_{i})\right|\). We conclude straightforwardly.    \(\square \)

Corollary 1

Let \(f:D\rightarrow \mathbb {R}\). Then,

$${\text {card}}~{\mathcal {D}^{[0,1)\times \{0\}}(f)} \le {\text {card}}~{E_{f}} \le 1 + n + V$$

where

  • n is the number of monotonicity changes of f and,

  • V the total variation of f.

In the particular case where the function is bijective and its codomain satisfies the same hypotheses as the domain – the codomain is a closed bounded interval whose width is at least 2, we can use the result of Proposition 3 by a symmetry argument. Then, we obtain \({\text {card}}~{\mathcal {D}^{[0,1)\times \{0\}}(f)} \le {\text {card}}~{f(D)\cap \mathbb {Z}}\) which is less than the total variation plus one. Thereby, if moreover the function is continuous (\(n=0\)), Proposition 3 and Corollary 1 give the same result (but in the corollary we have only an upper bound). For a non continuous bijective function, Proposition 3 shows that we could drop the parameter n in the above corollary. Actually, the parameter n is only needed to catch small changes around an horizontal grid line that generate changes of digitization that are not captured by the total variation. Nevertheless, there can be a huge difference between the complexity of the changes of digitization and the number of digitizations. Indeed, consider a function like \(x\,\sin (1/x)\). The translation of the function along the X axis yields infinitely many digitization changes but finitely many digitizations since almost all the oscillations around the X axis will produce only two digitizations. The following lemma and proposition is a first step to tackle this issue. The lemma is a specialization of Eq. (1) when there exists an interval \(I\subseteq [0,1)\) such that no set \(E_{f,i,I}\) but one contains a pair (ix) where \(x\in I\). Then, the set of digitizations produced by the translations whose vectors lie in \(I\times \{0\}\) can be computed on a restriction of the domain of f.

Lemma 3

Let \(f:D\rightarrow \mathbb {R}\). Let I be a subinterval of [0, 1) and \(i\in \varGamma \) such that

$$(j, x)\in E_{f}\implies x\notin I~\text {or}~j=i.$$

Then,

$$\forall J\subseteq [0,1),\ {\text {card}}~\mathcal {D}^{I\cup J}(f) \le {\text {card}}~{\mathcal {D}^I(f_{\mid D'})} + {\text {card}}~{\mathcal {D}^{J}(f)}$$

where \(D'\subseteq D\) is equal to \([i-1,i+1]\) or [0, 2] if \(i=0\) (remember that we assume that the width of D is at least 2).

Proof

From the hypotheses, the values of \(x\rightarrow \left\lfloor f(j+x)\right\rfloor \), \(j\ne i\), is constant on I. Then,

$$\begin{aligned} {\text {card}}~{\mathcal {D}^I(f)} = {\text {card}}~{\mathcal {D}^I(f_{\mid D'})}. \end{aligned}$$
(3)

From (1) we derive that

$$\begin{aligned} {\text {card}}(\mathcal {D}^{I\cup J}(f)) \le {\text {card}}~{\mathcal {D}^I(f_{\mid D'})} + {\text {card}}~{\mathcal {D}^{J}(f)}. \end{aligned}$$

   \(\square \)

Proposition 4

Let \(f:D\rightarrow \mathbb {R}\) be a function whose set of monotonicity change abscissas has exactly one limit point z. Then there exists an open interval I containing z such that the number of digitizations of f is upper bounded by

  • if there is no pair \((a,b)\in {E_f}\cup \{(0,0)\}\) such that \(a\ne \left\lfloor z\right\rfloor \) and \(b=\langle {z}\rangle \):

    $${\text {card}}~{\mathcal {D}^I(f_{\mid D_z}) }+ {\text {card}}~{\varGamma } + n + V + n' + V';$$
  • otherwise:

    $$\begin{aligned}{\text {card}}~{\mathcal {D}^{I\cap (0,z)}(f_{\mid D_z})} + {\text {card}}~{\mathcal {D}^{I\cap (z,1)}(f_{\mid D_z})} + 1 + {\text {card}}~{\varGamma } + n + V + n' + V' \end{aligned}$$

    where \(D_z=[\left\lfloor z\right\rfloor -1, \left\lfloor z\right\rfloor +1]\), or \(D_z=[0, 2]\) if \(z<1\), n and V, resp. \(n'\) and \(V'\), are the number of monotonicity changes and the total variation of \(f_{\mid [0,\inf I]}\), resp. \(f_{\mid [\sup I, \max D]}\).

By lack of place, we only give the sketch of the proof. The reader will find further, after the proof, an example of calculus of the bound given in Proposition 4.

Proof

Let \(x_0\in [0,1)\) and \(i_0 \in \varGamma \) such that \(i_0+x_0\) is a limit point of the monotonicity change set. We assume that the total variation of f on any subinterval of D that does not contain z is finite (otherwise, the result is obvious). From the hypothesis, it can be seen that, for any \(i\ne i_0\) (and, may be, \(i\ne i_0-1\)), the ‘event’ set \(E_{f,i,[0,1)}\) is finite. This enables us to define, in the general case, an interval I around \(x_0\) such that no event occurs, but on the grid line corresponding to \(i_0\), when the abscissa of the translation vector lies in I. Then, we can applied Lemmas 2 and 3 to conclude.    \(\square \)

Example 1

We consider the function f defined by \(f(x)= x \, \sin (13/x)\) when \(x\in (0,3]\) and \(f(0)=0\) (f has an unbounded total variation). The set S of monotonicity change abscissas has one limit point, \(z=0\), and there is no other point x such that \((\left\lfloor x\right\rfloor ,0)\in E_f\). Thus, we have to compute the first formula,

$${\text {card}}~{\mathcal {D}^I(f_{\mid D_z}) }+ {\text {card}}~{\varGamma } + n + V + n' + V'.$$

Here, we have \(D_z=[0,2]\) and \(I=(0,\beta )\) where \(\beta \) is the smallest real number in (0, 1] such that, for some integer \(i\in \{1,2\}\), the curve of the function \(\beta \mapsto f(i+\beta )\) passes through an horizontal grid line. We find \(\beta \approx 0.13\). Then, \({\text {card}}~{\mathcal {D}^I(f_{\mid D_z}) }\) is the number of distinct functions

$$\mathbf {f}_u:x\in ([0,2]-u)\cap \mathbb {N}\mapsto \left\lfloor f(x+u)\right\rfloor -\left\lfloor f(u)\right\rfloor $$

for \(u\in I\). Since, for any \(u\in I\), \(([0,2]-u)\cap \mathbb {N}= \{0,1\}\) and \(\mathbf {f}_u(0)=0\), we see that

$${\text {card}}~{\mathcal {D}^I(f_{\mid D_z}) } = {\text {card}}~{\{\mathbf {f}_u(1)\mid u\in I\}}.$$

From the curve of the function \(u\mapsto \mathbf {f}_u(1)\), we derive that \({\text {card}}~{\mathcal {D}^I(f_{\mid D_z}) } = 3.\)

As \(\min I = 0\), we have \(n=V=0\). We find on a plot of the derivative of f that \(n'=30\) and a numerical calculus gives \(V'\le 26\). Thus the number of digitizations of the curve \(y=f(x)\), \(x\in [0,3]\), is upper bounded by \(3+4+30+26=63\).

Proposition 4 allows us to count locally the number of digitizations around the limit point while counting the digitization changes on the left and right parts of the function. Further works will have to address the problem of functions with finitely, or infinitely, many limit points.

3.4 0n the Cardinal of the Set \(\mathcal {D}(f)\)

Proposition 5

Let \(f:D\rightarrow \mathbb {R}\). Let \(H={\text {card}}~{\mathcal {D}^{[0,1)\times \{0\}}(f)}\) and \(\gamma ={\text {card}}~{\varGamma }\). Then,

$$ {\text {card}}~{\mathcal {D}(f)}\le H\,2^\gamma . $$

Proof

Let \(u(x,y)\in [0,1)^2\). Let \(I_x=\varGamma _x{\setminus }\{0\}\) and \(v={\text {card}}~{I_x}\) (from Proposition 2, \(v\in \{\gamma -2, \gamma -1\}\)).

For any \(i\in I_x\), one has \(\mathbf {f}_{(x,0)}(i) = \left\lfloor f(x+i)\right\rfloor -\left\lfloor f(x)\right\rfloor \) and \(\mathbf {f}_{u}(i) = \left\lfloor f(x+i)-y\right\rfloor -\left\lfloor f(x)-y\right\rfloor \). Thus, setting \(a=\mathbf {f}_{(x,0)}(i)\), we have \(\mathbf {f}_{u}(i)\in \{a-1,a\}\) if \(\left\lfloor f(x)-y\right\rfloor =\left\lfloor f(x)\right\rfloor \) and \(\mathbf {f}_{u}(i)\in \{a,a+1\}\) when \(\left\lfloor f(x)-y\right\rfloor =\left\lfloor f(x)\right\rfloor -1\). The set \(\mathcal {D}ig_0(f_{u})\), which is in bijection with \(\prod _{i\in I_x} \{\mathbf {f}_{u}(i)\}\), is then obtained from \(\mathcal {D}ig_0(f_{(x,0)})\) by doing v “choices" in a pair than can be either \(\{-1,0\}\) or \(\{0,1\}\). Since, there are H distinct sets \(\mathcal {D}ig_0(f_{(x,0)})\) and \(v\le \gamma -1\), there are at most \(H\times 2\times 2^{\gamma -1}\), that is \(H\,2^\gamma \), distinct digitizations.    \(\square \)

Definition 1

(Dual by translation). The dual by translation of the function f is the label image \(\varDelta \) defined on the torus \(\mathbb {R}^2/\mathbb {Z}^2\) by

$$\forall [u] ,\quad \varDelta ([u])=\mathcal {D}ig_0(f_u).$$

where [u] denotes the class of \(u\in [0,1)^2\) in \(\mathbb {R}^2/\mathbb {Z}^2\).

Fig. 3.
figure 3

Examples of dual for the function \(f_1\) with \(r=5\) and \(r=50\). Each color stands for a digitization (Color figure online).

The boundaries of the dual are obtained by plotting the curve \(y=f(x) \) on the torus. Then, in order to get the labels, one just has to pick a point u in each region and to compute \(\mathcal {D}ig_0(f_u)\). Moreover, crossing in the positive direction of the y-axis the boundary \(y=f(x+i)\), \(i\in \varGamma {\setminus }\{0\}\) and \(x\in [0,1)\), amounts to decrease the \((i+1)\)-th value of the digitization and crossing the boundary \(y=f(x)\), \(x\in [0,1)\), amounts to increase all the values of the digitization but the first which has to stay equal to 0 according to our settings.

For geometric feature estimation, the torus is sampled so as to compute each digitization area and the corresponding estimation value.

An example of dual is shown in Fig. 3. This is the dual of the function \(f_1\) described in Sect. 4.

4 Experiment

Cardinal of the set of digitizations up to a translation. The digitization sets have been computed on the graph of the following functions

$$\begin{aligned} f_1:x\in [0,r]&\mapsto r\,\ln \big (1+\frac{x}{r}\big ),&f_3:{\left\{ \begin{array}{ll} x\in (0,3]\mapsto \sin \frac{13}{x} \\ 0\mapsto 0, \end{array}\right. } \\ f_2:x\in [0,\tfrac{11}{10}r]&\mapsto r\,\frac{1}{2}\bigg (\frac{x}{r}\bigg )^2,&f_4:x\in [0,\tfrac{11}{10}r]\mapsto \frac{r}{100}\,\left( \sin \frac{100x}{r}+50\frac{ x^2}{r^2}\right) \end{aligned}$$

with \(r=50\) (r stands for the resolution).

Their cardinal and the upper bound obtained in Proposition 5 are gathered in Table 1.

Table 1. Number of digitizations of the functions \(f_1,f_2,f_3,f_4\) under translation.

Application to length estimators. In order to evaluate the quality of an estimator, it is desirable to test it on digitization sets up to translations. The produced set of estimates can be used to precise the estimate variability. Figure 4 gives an example of a dual for the function \(f_4\) at the resolution \(r=50\). The second map gives the local estimate in function of the translation vector. Formally, we note l(f) the true length of the function f and

$$\mathcal E ^L(\mathbf {f})=\sum _{i\in \varGamma }\left( (\mathbf {f}(i+1)-\mathbf {f}(i))^2+1\right) ^\frac{1}{2}$$

a local estimate of the length, using the digital function \(\mathbf {f}\). Then the central map of Fig. 4 is the graph \(\{x,y,\mathcal E ^L({\mathbf {f}_3}_{(x,y)})-l(f_3)),(x,y)\in [0,1)^2\}\) of the error between the true length and the estimate. The right graphic is the distribution of the length estimate error. Its mean value is 0.02 which is equal to the digitization step \(\frac{1}{50}\). The spreading of the error distribution shows that the evaluation on a single digitization is not reliable for this estimator on this graph function.

Fig. 4.
figure 4

(left) dual of \(f_4\) for r=50 (on [0, 55]), (center) local estimation error applied to the dual, (right) distribution of the local estimation error (Color figure online).

5 Conclusion

This paper presents a first study on the set of digitizations generated by the action of the translation group over a given function graph. Bounds of the digitization set complexity are given for vertical and horizontal translations. A representation of the set of generated digitizations is defined as the dual under translation. Finally some illustrations are given and a glimpse on the potential use of this tool is presented on a local length estimator.

There are several perspectives to this work: First of all, the study of the plane curve case and the improvement of the digitization generation algorithm, then the study of its contribution in term of variability for the estimator evaluation and the extension to a multigrid study by adding dilation to the transformation group and the link to the notion of digitization scale.