## 1.

## Introduction

The grayscale frames interpolation problem is the process of creating intermediary grayscale frames between two given frames.^{1} The interpolated grayscale frame
$\left({X}_{i}\right)$
,
$0\u2a7di\u2a7dM$
,
$M\u2a7e2$
depends on the content of an input grayscale frame and an output grayscale frame. For
$i=0$
, the interpolated grayscale frame is equal to the input grayscale frame
${X}_{0}$
; for
$i=M$
, the interpolated grayscale frame is equal to the output grayscale frame
${X}_{M}$
.^{2}

The simplest method involves linear interpolation.^{3, 4} In Ref. 5, a dynamically elastic surface interpolation scheme was proposed. A hybrid approach that combined elastic interpolation, spline theory, and the surface consistency theorem was proposed to produce further improvement.^{6, 7} Grevera and Udupa^{8} and Herman ^{9} interpolated the distance and proposed shape-based methods by encoding the segmented image with distance codes. Guo developed a morphology-based interpolation method and successfully resolved the problems in objects with holes and large offsets.^{10} Lee proposed another morphology-based scheme that was simpler in computational complexity.^{11} Goshtasby selected feature points from successive frames to control the gray-level interpolation.^{12} In Ref. 13, feature points were used that were based on a fuzzy measure of the boundaries and medial axis transforms. In Ref. 14, a morphological skeleton interpolation was proposed in which interpolated sets were generated from a succession of skeletons derived from the matching of two neighboring set skeletons. Berier and Neely computed the interpolation with feature line-segment control.^{15} An example of object-based methods that used features is shape-based interpolation,^{16} which was extended by allowing registration between frames^{17} and using feature guidance.^{18} For grayscale images, mathematical morphology provides a well-founded theory.^{19}

The new interpolation grayscale frame method presented in this paper is based on the morphological $S$ transform (MST) and consists of partially changing, step by step using growing structuring elements (SEs) the morphological $S$ transforms of the foreground content of an input grayscale frame with the MSTs of the foreground content of an output grayscale frame. Better performance comes at the expense of not very great computational complexity.

This paper is organized as follows. Section 2 defines the grayscale MST. Section 3 presents the grayscale frames interpolation algorithm. Section 4 provides experimental results. The conclusions of this study are drawn in Sec. 5.

## 2.

## Morphological $S$ Transform (MST)

The MST of a grayscale image
$X$
can be calculated by means of morphological operations.^{19} For any SE
$B$
, we have

## Eq. 1

$$(n+1)B=nB\oplus B,\phantom{\rule{1em}{0ex}}n=0,1,2,\dots \phantom{\rule{0.3em}{0ex}}\text{and}\phantom{\rule{0.3em}{0ex}}0B=(0,0).$$The morphological $S(X,nB)$ transform of a grayscale image $X$ by SE $nB$ is given by

A grayscale image can be represented using the morphological formula

where $N$ is the maximum value defined by## 3.

## Interpolation Method

The new and improved grayscale frame interpolation method presented in this paper consists of partially changing, step by step using growing SEs $nB$ for $n=N,\dots ,1,0$ with $0B=(0,0)$ , the MST of the foreground content of a grayscale input frame with the MST of the foreground content of an output grayscale frame.

Based on the grayscale input frame ${X}_{0}$ and grayscale output frame ${X}_{M}$ , the foreground contents are defined as

## Eq. 5

$${X}_{0}^{f}={X}_{{0}^{.}}^{*}\mathrm{sign}\left(\mid {X}_{0}-{X}_{M}\mid \right)\phantom{\rule{0.3em}{0ex}}\text{and}\phantom{\rule{0.3em}{0ex}}{X}_{M}^{f}={X}_{{M}^{.}}^{*}\mathrm{sign}\left(\mid {X}_{0}-{X}_{M}\mid \right),$$## Eq. 6

$$\mathrm{sign}\left(\mid x\mid \right)=\{\begin{array}{ll}1,& \mathit{\text{if}}\phantom{\rule{0.3em}{0ex}}\mid x\mid \ne 0\\ 0,& \mathit{\text{if}}\phantom{\rule{0.3em}{0ex}}x=0\end{array}\phantom{\}}.$$The interpolated foreground content ${X}_{i}^{f}$ of grayscale interpolated frame ${X}_{i}$ , for $1\u2a7di\u2a7dN$ and $N\u2a7e2$ for $N=\mathrm{max}({N}_{0},{N}_{M})$ , obtained by using the morphological formula

## Eq. 7

$${X}_{i}^{f}({X}_{0}^{f},{X}_{M}^{f},B)=\dots (S[{X}_{0}^{f},(N-i)B]+\dots +\{S[{X}_{M}^{f},(N-1)B]+S({X}_{M}^{f},NB)\oplus B\}\oplus B)\oplus B\dots \oplus B\dots $$## Eq. 8

$${X}_{i}({X}_{0},{X}_{M},B)=[{X}_{0}-{X}_{{0}^{.}}^{*}\mathrm{sign}\left(\mid {X}_{0}-{X}_{M}\mid \right)]+{X}_{i}^{f}$$Using morphological formula 7, we can build a large number, $\mathrm{min}({N}_{0},{N}_{M})$ , of not necessarily different interpolated grayscale frames.

## 4.

## Experimental Results

We used the proposed algorithm for grayscale frame interpolation by constructing a frame using growing SEs and different $i$ values. We performed the experiments using grayscale images.

An example is presented in Fig. 1 . Test input and output grayscale frames are presented in Figs. 1 and 1, and the “missing” frame ${X}_{\mathrm{ref}}$ is in Fig. 1. This frame will be used as reference to compare our results. Our frames have dimensions [256, 256].

Using formula 5, we obtained the foreground contents for input and output frame ${X}_{0}^{f}$ and ${X}_{M}^{f}$ for input and output frame ${X}_{0}$ and ${X}_{M}$ [Figs. 2 and 2 ]. The background content for both the input and output frames (content the frames have in common), ${X}^{b}$ [Fig. 2], is given by

Using the morphological $S$ transform and crosses or squares as SE $B$ , we obtained ${N}_{0}^{c}=38$ , ${N}_{M}^{c}=38$ , and ${N}^{c}=38$ for the crosses and ${N}_{0}^{s}=30$ , ${N}_{M}^{s}=30$ , and ${N}^{s}=30$ for the squares. Interpolated foreground content ${X}_{i}^{f}$ , with $1\u2a7di\u2a7d38$ (for the crosses) and $1\u2a7di\u2a7d30$ (for the squares), was obtained using morphological formula 7. Finally, grayscale interpolated frame ${X}_{i}$ was given by formula 8. For the crosses, we built 34 interpolated grayscale frames, but only 21 were different. For the squares, we built 30 interpolated grayscale frames, but only 17 were different. Using a standard computer and an optimized C routine implementation, we obtained a grayscale interpolated frame at $40\phantom{\rule{0.3em}{0ex}}\mathrm{ms}$ . For $\text{size}\left({X}_{\mathrm{ref}}\right)=\left[AB\right]$ , we can define error function ${r}_{i}$ by

## Eq. 10

$${r}_{i}=\text{sum}\left(\text{sum}\left\{\mathrm{sign}\left[\mathrm{abs}({X}_{\mathrm{ref}}-{X}_{i})\right]\right\}\right)\u2215\left({A}^{*}B\right).$$Some error function results for the crosses $\left({r}_{i}^{c}\right)$ and squares $\left({r}_{i}^{s}\right)$ SEs are presented in Tables 1, 2 .

## Table 1

Error function ric .

i | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
---|---|---|---|---|---|---|---|---|---|

${r}_{i}^{c}$ (%) | 17.67 | 19.89 | 23.11 | 18.45 | 16.07 | 17.34 | 22.15 | 21.83 | 16.95 |

## Table 2

Error function ris .

i | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 |
---|---|---|---|---|---|---|---|---|---|

${r}_{i}^{s}$ (%) | 19.23 | 21.28 | 17.25 | 15.87 | 18.48 | 19.62 | 25.23 | 22.37 | 23.74 |

Interpolated frames using different SEs are presented in Figs. 3 and 4 .

After simulations using different SEs and different $i$ values, we observed that one of the interpolated frames offered by our method was similar to the original reference frame.

## 5.

## Conclusions

This paper has addressed the grayscale frames generalized interpolation by means of mathematical morphology.

After describing the algorithm, we provided experimental results that were very encouraging. We applied the proposed scheme to real-world data. For many situations, the proposed scheme was experimentally shown to successfully resolve complex interpolation problems. Some preprocessing could improve the results. The algorithm is fully morphological and can be applied quickly. This entire process is efficient without significant computational complexity. However, it is difficult to state rigorously that our method produces theoretically correct interpolated results for any frames.

## Acknowledgments

This research was founded by UEFISCSU, contract PII, IDEI, no. 100/2007, D.N. VIZIREANU.

## references

**,” (1999). Google Scholar**

*Morphological interpolation and color images***,” IEEE Trans. Image Process., 17 (5), 694 –708 (2008). https://doi.org/10.1109/TIP.2008.919360 Google Scholar**

*A multistage motion vector processing method for motion-compensated frame interpolation***,” CH25661389 –81390 (1988). Google Scholar**

*Intensity interpolation for reconstructing 3-D images from serial cross-sections***,” Proc. SPIE, 1445 456 –467 (1991). https://doi.org/10.1117/12.45242 Google Scholar**

*Intensity interpolation for branching in reconstructing three-dimensional objects from serial cross-sections***,” IEEE Trans. Med. Imaging, 7 (9), 225 –232 (1988). https://doi.org/10.1109/42.7786 Google Scholar**

*Dynamic elastic interpolation for 3-D image reconstruction from cross sections***,” Comput. Med. Imaging Graph., 15 (4), 265 –276 (1991). https://doi.org/10.1016/0895-6111(91)90085-A Google Scholar**

*Automated surface interpolation technique for 3-D object reconstruction from serial cross sections***,” Comput. Vis. Graph. Image Process., 21 (2), 91 –101 (1997). Google Scholar**

*Edge-shrinking interpolation for images***,” IEEE Trans. Med. Imaging, 15 (12), 881 –892 (1996). https://doi.org/10.1109/42.544506 Google Scholar**

*Shape-based interpolation of multi-dimensional grey-level images***,” IEEE Comput. Graphics Appl., 12 69 –79 (1992). https://doi.org/10.1109/38.135915 Google Scholar**

*Shape-based interpolation***,” Comput. Med. Imaging Graph., 19 (3), 267 –279 (1995). https://doi.org/10.1016/0895-6111(95)00007-D Google Scholar**

*Morphology-based interpolation for 3D image reconstruction***,” IEEE Trans. Med. Imaging, 19 (7), 711 –721 (2000). https://doi.org/10.1109/42.875193 Google Scholar**

*Morphology-based three-dimensional interpolation***,” IEEE Trans. Med. Imaging, 11 (4), 507 –516 (1992). https://doi.org/10.1109/42.192686 Google Scholar**

*Matching tomographic slices for interpolation***,” Proc. SPIE, 2167 143 –150 (1994). https://doi.org/10.1117/12.175049 Google Scholar**

*Object-based interpolation via cores***,” IEEE Trans. Med. Imaging, 19 (7), 699 –710 (2000). https://doi.org/10.1109/42.875192 Google Scholar**

*Interpolation of 3-D binary images based on morphological skeletonization***,” IEEE Trans. Med. Imaging, 9 (3), 32 –42 (1990). https://doi.org/10.1109/42.52980 Google Scholar**

*Shape-based interpolation of multidimensional objects***,” IEEE Trans. Med. Imaging, 12 (9), 439 –450 (1993). https://doi.org/10.1109/42.241871 Google Scholar**

*Shape-based interpolation of tree-like structures in three-dimensional images***,” IEEE Trans. Med. Imaging, 21 (12), 1479 –1489 (2002). https://doi.org/10.1109/TMI.2002.806574 Google Scholar**

*Feature-guided shape-based image interpolation*