Next Article in Journal
On Unit J-Shaped Distributions: Properties and Estimation with Applications
Previous Article in Journal
Looking into the i of the Storm: An Overview of Mid-1880s Contingency Table Indices for Studying Tornado Data
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Implementation of Dynamical Visual Cryptography Scheme for Imaging-Based Testing of Human Visual System

by
Loreta Saunoriene
1,
Paulius Palevicius
1,
Arvydas Gelzinis
2 and
Minvydas Ragulskis
1,*
1
Department of Mathematical Modelling, Kaunas University of Technology, Studentu St. 50, 51368 Kaunas, Lithuania
2
Department of Ophthalmology, Medical Academy, Lithuanian University of Health Sciences, Eivenių St. 2, 50161 Kaunas, Lithuania
*
Author to whom correspondence should be addressed.
Mathematics 2026, 14(6), 1020; https://doi.org/10.3390/math14061020
Submission received: 23 February 2026 / Revised: 9 March 2026 / Accepted: 14 March 2026 / Published: 17 March 2026

Abstract

Dynamic visual cryptography (DVC) can be formulated as a discrete-time reconstruction problem for time-averaged moiré fringes generated by oscillatory transformations of periodic gratings. When implemented on digital display hardware, the continuous oscillatory motion must be realized through discrete frames, which may prevent correct reconstruction of higher-order time-averaged fringes due to refresh-rate limitations. In this work, mathematical criteria are derived to ensure the reliable reconstruction of higher-order time-averaged moiré fringes under finite refresh rate constraints. Harmonic, stochastic, and rectangular temporal waveforms are examined within a unified framework based on the number of frames per oscillation period and the discrete structure of the resulting time-averaged intensity distribution. Stochastic waveforms are shown to not guaranty reproducible fringe formation. For harmonic modulation with a 240 Hz display refresh rate and a 50 Hz oscillation frequency, only four full frames per period are obtained, which is insufficient to reconstruct the third time-averaged moiré fringe requiring at least sixteen frames per period. Rectangular waveforms satisfy the derived reconstruction conditions when the pitch of the grating, the oscillation amplitude, and the resolution of the rendered grating meet explicit constraints. These results establish quantitative parameter bounds for a mathematically consistent software-based DVC implementation on digital displays.

1. Introduction

Geometric moiré is a visual phenomenon in which an interference pattern is created by the overlay or superposition of multiple regular grids [1]. A double-exposure image results from the interaction of those two geometric grids, creating a new pattern that is not present in the original moiré gratings. This phenomenon is considered a visual artifact that can occur in varied situations such as printing, textiles, and computer graphics as well as other fields. Techniques such as anti-aliasing and careful consideration of pattern frequencies are used to minimize or eliminate geometric moiré in digital graphics [2]. Image demoiréing methods based on digital image processing and filtering for the elimination of visible moiré patterns are used when anti-aliasing techniques fail [3]. Recent advances in image demoiréing predominantly employ neural networks. Multi-scale architectures are used to capture moiré patterns across different spatial resolutions [4], while wavelet-based multi-branch networks separately remove low- and high-frequency moiré components and preserve fine details [5]. Hybrid networks combining convolutional and transformer modules have also been proposed to detect and identify demoiréed images while extracting both local and global features [6].
However, moiré effects play a pivotal role in many important engineering applications. One of such applications is geometric moiré, which is commonly used in experimental mechanics for the experimental analysis of the fields of strain and deformation [1]. Beyond image restoration and experimental analysis, moiré patterns have also been exploited for secure information hiding. Optical and digital moiré patterns can serve as carriers for secret messages, enabling visual cryptography and steganography schemes in which information is encoded into grating structures or synthesized moiré patterns [7,8,9]. Recent selective encryption techniques have leveraged deep learning to identify regions of interest and apply efficient encryption only to sensitive areas, often using parallel computing to improve performance [10]. These studies highlight the versatility of combining visual patterns and computational methods to achieve robust and secure image-based information hiding.
Understanding and testing the human visual system is essential for both scientific research and practical applications, including display design, vision diagnostics, and perceptual security. Recent studies have investigated the limits of human spatial resolution, revealing that the eye can resolve up to 94 pixels per degree for achromatic patterns and slightly lower for chromatic stimuli, providing quantitative benchmarks for high-resolution displays [11]. The spatiotemporal sensitivity of the human visual system has been explored using polarized and flickering stimuli. This allows for precise mapping of contrast, frequency, and polarization perception, which is valuable for detecting visual impairments and optimizing visual content [12,13]. Furthermore, temporal integration of sensory signals in the brain, modulated by individual alpha frequency, influences perceptual sensitivity and the binding of multisensory information, highlighting the role of neural dynamics in human perception [14]. These studies demonstrate that systematic testing of the human visual system is crucial for understanding perceptual limits, designing effective visual displays, and developing human-centered imaging and information technologies.
The idea of DVC was first presented in [15]. The DVC scheme uses a single cover image encoded into a moiré grating. The secret image is leaked in the form of time-averaged moiré fringes when the cover image oscillates with a predefined amplitude of harmonic oscillations. Phase-matching and initial phase-scrambling algorithms are used to encrypt the secret image into the cover image. Various improvements and enhancements of the DVC scheme are reported in [16].
Secret images leaked by DVC schemes can be registered by optical instruments or observed with the naked eye. Although mathematical relationships governing the formation of time-averaged images do not depend on the frequency of oscillations, this frequency is of primary importance in practical DVC applications. For example, a proper exposure time must be used for optical cameras. The human visual system is not able to interpret secret images if the frequency of oscillations of the cover image is low, because the eyes follow the slowly oscillating cover image [17]. The human visual system can interpret the secret image only when a critical frequency of oscillations is exceeded. The human visual system then comprehends the secret visual information in the form of time-averaged moiré fringes [17]. The identification of this critical frequency and possible applications are discussed in [17].
This paper provides mathematical formulations and time-averaged optical relations governing the fundamentals of DVC. The main objective of this paper is to determine optimal optimal waveforms and optimal gratings while keeping hardware limitations in mind. The results of this study will enable the optimal implementation of DVC schemes using standard computer hardware.

2. Time-Averaging of the Harmonic and Ronchi Gratings

DVC is conceptually related to classical visual cryptography, where sophisticated encoding algorithms are used to transform a secret image into visually meaningless patterns and where decoding can be performed directly by the human visual system without computational processing. In traditional visual cryptography this is typically achieved by splitting the image into several shares, and the secret becomes visible when the shares are physically overlaid. In contrast, DVC does not use share splitting; instead, a single phase-scrambled cover image is generated that appears completely random in the stationary state and does not reveal the encoded information to the human eye. The secret image emerges only through the formation of time-averaged moiré fringes when the cover image undergoes controlled oscillatory motion with a predefined amplitude. Therefore, time-averaging is the key mechanism that reveals the hidden image. This principle is also closely related to the temporal response of the human visual system: at low oscillation frequencies the eye can follow the motion and the hidden image remains invisible, while at sufficiently high frequencies the visual system effectively performs temporal averaging and the secret image becomes perceptible. The critical oscillation frequency at which this transition occurs provides a useful parameter for characterizing specific features of the human visual system, and is useful for diagnostic properties as well [17].
The experimental verification of the DVC scheme is straightforward. The encoded image can be printed and attached to the vibrating head of a precision vibration shaker (vibration generation equipment) as described in [17]. Under appropriate oscillatory conditions, the hidden image becomes visible through the formation of time-averaged moiré fringes perceived by the observer. However, reproducing this effect on a computer display is significantly more challenging due to the limited refresh rate of typical screens, which restricts the ability to accurately simulate the required continuous oscillatory motion. Consequently, practical implementation of the DVC scheme in a digital environment requires substantial mathematical and algorithmic development, which constitutes one of the main objectives of the present paper.

2.1. Time-Averaged Geometric Moiré

Time-averaged geometric moiré is an optical experimental technique in which a moiré grating is formed on the surface of an oscillating structure, with time-averaging methods employed to record the resulting fringe pattern [15].
Consider a one-dimensional periodic grayscale moiré image formed on the surface of a non-deformable body. The Fourier series expansion of such a grating reads [18]:
M x = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ ,
where x is the longitudinal coordinate, M x is the intensity of the grayscale color at point x, a n and b n are the coefficients of the Fourier series, and λ is a period of the moiré grating; M x ranges from 0 (black) to 1 (white), with intermediate values representing different grayscale levels.
Suppose that the grating M ( x ) oscillates along the x-axis according to a predefined law of motion u = u ( t ) . The instantaneous intensity at position x and time t can be evaluated as M ( x u ( t ) ) . If the oscillating grating is captured over a sufficiently long exposure time T, then the recorded time-averaged image M ¯ ( x ) represents the superposition of all instantaneous grating positions during the observation time:
M ¯ ( x ) = lim T 1 T 0 T M ( x u ( t ) ) d t .
Let p ( x ) denote the displacement density, which describes the statistical distribution of the deflections from the state of equilibrium. Motion-induced blur in a time-averaged image can then be expressed as the convolution of the stationary image M ( x ) with the displacement density p ( x ) , which acts as the point spread function (PSF) [18]:
M ¯ ( x ) = M ( x u ) p ( u ) d u = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ P n π L ,
where P is the Fourier transform Φ of the density function p ( x ) , also known as the optical transfer function (OTF):
P ( ω ) = Φ p ( x ) = + exp ( i x ω ) p ( x ) d x ,
in which ω is the coordinate in the frequency space.
Different laws of motion produce different PSFs and corresponding frequency responses.

2.2. Harmonic Waveform Oscillations

The harmonic deflection from the state of equilibrium reads:
u t = a sin t ω t + φ ,
where ω is the cyclic frequency, φ is the phase, a is the amplitude of harmonic oscillations, and t is time.

2.2.1. Harmonic Moiré Grating

A moiré grating on the surface of a one-dimensional structure in the state of equilibrium can be interpreted as a periodic variation of black and white colors (Table 1). Let us suppose that a harmonic grating
M ( x ) = 1 2 + 1 2 cos 2 π λ x
oscillates according to a harmonic waveform. Here, M x denotes the grayscale level of the surface at the point x and λ is the pitch of the grating. Numerical values 0 and 1 of the function M x correspond to black and white colors respectively, and all intermediate values to grayscale levels. Then, the time-averaged grayscale level can be expressed as [19]:
M ¯ ( x , a ) = 1 2 + 1 2 cos 2 π λ x J 0 2 π λ a ,
where J 0 is the zero-order Bessel function of the first kind [20]. The envelope function of the resulting time-averaged image reads (Figure 1A):
E ( a ) = 1 2 ± 1 2 J 0 2 π λ a .
Time-averaged fringes are formed at such amplitudes a where J 0 2 π λ a = 0 :
2 π λ a = r i , i = 1 , 2 , 3 , ,
where r i is the i-th root of the zero-order Bessel function of the first kind. The centers of the time-averaged fringes are indicated by the vertical dashed lines in Figure 1A. The standard deviation of the brightness of pixels in the time-averaged image generated by the harmonic grating and harmonic oscillations reads as follows:
S a = 1 8 J 0 2 π λ a .
The standard deviation becomes equal to zero at amplitudes such that the time-averaged fringes are fully developed (depicted by vertical dashed lines in Figure 1A).

2.2.2. Ronchi Grating

The Ronchi grating is a dichotomous (black and white) grating [1] (Table 2), in other words, the pixels in the stationary image are only black and white. This is the main difference between the Ronchi grating and the harmonic moiré grating. Suppose that a periodic one-dimensional grayscale function M x can be expanded into a Fourier series:
M ( x ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ ,
where a 0 , a n , and b n are Fourier expansion coefficients. The expansion of the stepped grayscale function in a Fourier series yields the following expressions of the coefficients [18]:
a 0 = 2 ( 1 a ) , a n = sin ( n π ( 1 a ) ) sin ( n π ( 1 + a ) ) n π , b n = cos ( n π ( 1 + a ) ) cos ( n π ( 1 a ) ) n π , n = 1 , 2 , .
Then, time-averaged grayscale image of the harmonic oscillations of the Ronchi grating (when the exposure time tends to infinity) can be expressed in the following form [18]:
M ¯ ( x , a ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ J 0 2 π n λ a .
Computational experiments with the Ronchi grating are shown in Figure 1B. Time-averaged fringes can be observed in the time-averaged image; however, the standard deviation of the brightness levels in the time-averaged Ronchi image is not equal to zero even at the centers of the fully developed time-averaged fringes (denoted by vertical dashed lines in Figure 1B). The envelope function and the standard deviation of the time-averaged image are plotted accordingly by the black solid lines in Figure 1B (the envelope function and the standard deviation for the harmonic moiré grating are plotted in gray for clarity of comparison).

2.3. Stochastic Oscillations

Let us consider the deflections in time to be defined by the function u t . If u t is a Gaussian-normal ergodic process, then it can be approximated by a discrete scalar series of normally distributed numbers with zero mean and σ 2 variance [18]:
u ( t ) N 0 , σ 2 .

2.3.1. Harmonic Moiré Grating

The time-averaged image generated by the stochastic oscillation u ( t ) of a one-dimensional harmonic moiré grating is described by [18]:
M ¯ ( x , σ ) = 1 2 + 1 2 cos 2 π λ x exp 1 2 2 π λ σ 2 .
The envelope function of the contrast modulated carrier fringes reads as follows (Figure 2A) [18]:
E ( σ ) = 1 2 ± 1 2 exp 1 2 2 π λ σ 2 .
The standard deviation of the brightness of pixels in the time-averaged image in the case of stochastic oscillations reads (Figure 2A) [18]:
S σ = 1 8 exp 1 2 2 π λ σ 2 .
Note that time-averaged fringes do not form in the case of stochastic oscillations (Figure 2A) [18]. Higher variance of the stochastic oscillations results in large blur in the time-averaged image (Figure 2A).

2.3.2. Ronchi Grating

The time-averaged image generated by the stochastic oscillation of the Ronchi grating is expressed in the following form [18]:
M ¯ ( x , a ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ exp 1 2 2 π n λ σ 2 .
The computational reconstruction of the envelope function E ( σ ) and the standard deviation S ( σ ) of the time-averaged Ronchi grating generated by stochastic oscillations are depicted in Figure 2B. The envelope function E ( σ ) and standard deviation S ( σ ) are still monotonous functions (plotted in black solid lines in (Figure 2B)); however, the effects of optical blur are less expressed compared to the harmonic moiré grating (Figure 2B).

2.4. Rectangular Waveform Oscillations

Oscillations according to a rectangular waveform can be considered as a particular digital implementation of harmonic oscillations in which the number of frames used to reconstruct one period of oscillation is set to two. Naturally, two extreme deflections of the original moiré grating can be considered for the generation of time-averaged images:
u ( t ) = a at t π 2 ω ; 0 , a at t 0 ; π 2 ω .

2.4.1. Harmonic Moiré Grating

Suppose that a harmonic moiré grating oscillates according to a rectangular waveform (Figure 3A). The time-averaged image is now constructed as the additive superposition of two copies of the original image deflected by the amplitude a up and down in the direction perpendicular to the constitutive lines of the grating (Figure 3). Thus, the time-averaged image generated by the harmonic moiré grating oscillated according to a rectangular waveform reads as follows [17]:
M ¯ ( x , a ) = 1 2 + 1 2 cos 2 π λ x cos 2 π λ a .
The envelope function of the resulting time-averaged image reads as follows:
E ( a ) = 1 2 ± 1 2 cos 2 π λ a .
Time-averaged fringes are formed at such amplitudes a where cos 2 π λ a = 0 (Figure 3A):
2 π λ a = π 2 + π ( n 1 ) , n = 1 , 2 , 3 .
It is interesting to note that the distribution of time-averaged fringes is now periodic (due to the properties of the cosine function). However, the distribution of time-averaged fringes in Figure 1 is not strictly periodic due to the properties of the zero-order Bessel function of the first kind [20].
The standard deviation of the brightness levels of pixels in the time-averaged harmonic grating in the case of rectangular waveform oscillations reads (Figure 3A):
S a = 1 8 cos 2 π λ a .
The centers of the time-averaged fringes are visualized by vertical dashed lines in Figure 3A.

2.4.2. Ronchi Grating

Let us consider a Ronchi grating oscillating according to a rectangular waveform. Now, the time-averaged image reads as follows:
M ¯ ( x , a ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ cos 2 π n λ a .
Computational experiments with the Ronchi grating and rectangular waveform oscillations are illustrated in Figure 3B. Optical time-averaged fringes can be observed in the time-averaged image. Time-averaged fringes develop at such amplitudes a where
n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ cos 2 π n λ a = 0 .
It turns out that the locations of the centers of time-averaged fringes induced by rectangular waveform oscillations coincide for both the harmonic and Ronchi gratings (Equation (22)).
However, the envelope function now becomes almost distorted to a box-shaped plot (Figure 3B). This is because the time-averaged image is now constructed from only two frames of the static grating at the locations of maximal deflections. Similarly, the centers of the time-averaged fringes are depicted by vertical dashed lines in Figure 3B.

3. Dynamic Visual Cryptography

It is well known that the objectives of geometric moiré (and time-averaged geometric moiré) are twofold. First, optical moiré techniques are used for the identification of mechanical displacements (dynamic displacements) in the observation window covered by the constitutive moiré grating [1,21]. Another completely different objective is based on manipulation of the moiré gratings such that the resulting pattern of moiré fringes yields an interpretable target image [15,16].
As mentioned in the Introduction section, the main goal of this paper is to optimize the mathematical foundation for generating target patterns of time-averaged moiré fringes. The basic strategy for generation of secret images in the form of time-averaged moiré fringes was introduced almost fifteen years ago [15]. Later, such optical techniques were coined as dynamic visual cryptography (DVC) [15,16,18]. Therefore, a short description of the basic concepts of DVC algorithms will help to interpret the theoretical relationships that govern the optimal reconstruction of the target optical images.

3.1. The Basic Concept of DVC

Visual cryptography (VC) is a cryptographic technique that allows for encryption of different kinds of visual information in such a way that the decryption is fully visual [22]. In VC, the secret image is split into two or more shares in such a way that each share looks completely random and no secret information can be retrieved from each single share alone. Note that while complex computations are required for encoding (the generation of shares), a computer is not required for the decoding of secret information. The secret can be completely visually decoded by observing overlapping shares with the naked eye.
Dynamic visual cryptography (DVC) [15] is also an optical technique for hiding secret visual information. Similar to VC, DVC requires complex computations during the encoding process, but decoding is a visual operation. The main difference between DVC and VC schemes is that DVC uses only a single share (the cover image) to store the secret. One of the main objectives of a DVC scheme is that the secret information should not be interpretable to a naked eye from the static cover image. The secret is leaked when the cover image is oscillated according to a predefined law of motion, and time-averaging techniques are used to interpret the secret in the form of a pattern of time-averaged moiré fringes.
Special algorithms are developed for the computational implementation of real-time oscillations of the cover image on a digital computer screen. The preliminary investigations proposed in [17] show that the human visual system is capable of performing optical averaging in time. In [17], the authors reported that the secret can be decoded only if the frequency of oscillations is not less than 25 Hz. Otherwise, if the oscillation frequency is lower, the human eye follows the oscillating image and is not capable of performing optical integration of the oscillating image in time. However, this frequency threshold is individual not only to each participant but also to their level of emotional and physical fatigue [17].
The ability of the human visual system to integrate oscillating moiré gratings in time is a basis for future applications of DVC schemes in investigations of the human visual system. However, the implementation of a particular DVC scheme depends on the experimental setup. The cover image can be printed on a sheet of paper and fixed to the vibrating head of a mechanical shaker [15]. Clearly, such fully experimental schemes are expensive and non-transportable, since they require specialized shaker systems along with their control infrastructure.
The alternative approach is to use a digital computer to simulate an oscillating cover image on the computer screen. The apparent simplicity of this approach is misguiding due to the serious embedded limitations of computer hardware. As noted previously, the main aim of this paper is to determine optimal parameters for the implementation of optical DVC algorithms using standard computational hardware.

3.2. Why Harmonic Oscillations Do Not Work for the DVC Scheme on Computer Screens

The experimental implementation of a DVC scheme using a shaker system is naturally based on harmonic oscillations (it would be very difficult to generate mechanical oscillations according to the rectangular waveform).
However, it is easy to implement oscillations according to a rectangular waveform on a digital computer screen. Such oscillations yield two copies of the same cover image (one shifted up and another shifted down by the same number of pixels) visualized in an alternating sequence in time.
Let us consider the peculiarities of the reconstructions of harmonic oscillations on a digital computer screen before dropping this approach from the list of feasible alternatives. The apparent simplicity of reconstructing harmonic oscillations on a digital computer screen is misleading. The limited refresh rate of the computer screen makes it impossible to reconstruct a very large number of frames of the oscillating image per period of oscillations. In fact, such a limitation is of crucial importance when mimicking harmonic waveform oscillations on a computer screen. Thus, we need to ascertain what happens if the harmonic waveform oscillation is reconstructed using a limited number of frames of the oscillating image per period.
The first question to answer is what number of frames per one period of oscillations is sufficient to reconstruct the predefined number of time-averaged fringes with a preset accuracy ε .
Consider a harmonic grating with pitch λ 1 , representing the background, and a harmonic grating with pitch λ 2 , representing the secret information. Let the standard deviations of the computationally reconstructed time-averaged gratings be denoted by S 1 ( a ) (representing the standard deviation of the background) and S 2 ( a ) (representing the standard deviation of the secret area).
If both gratings oscillate harmonically with a predefined amplitude a, then the time-averaged fringes at the background form when the amplitude of the harmonic oscillations a and the pitch of the grating λ satisfy the relationship a = λ 1 2 π r i , i = 1 , 2 , (Equation (9)). Hypothetically, the standard deviation of the brightness of pixels in the time-averaged image should be equal to zero if the time-averaged fringe is fully developed (Figure 4A). At the same time, the standard deviation of the brightness of pixels in the time-averaged secret area S 2 ( a ) should be as high as possible.
Note that the computationally reconstructed standard deviations S 1 ( a ) and S 2 ( a ) almost coincide with the theoretical standard deviations if 32 frames per period of harmonic oscillations are used to reconstruct the time-averaged image (Figure 4A). Sixteen frames per period produce only three first time-averaged fringes developed according to accuracy ε = 0.01 · λ 1 (Figure 4B). Eight frames per period yield only the first time-averaged fringe with the same precision (Figure 4C). Note that two frames per period of oscillations coincide with rectangular waveform oscillations (Figure 4D).
The relationship between the minimum number of frames m (used to reconstruct a period of harmonic oscillations) and the number of properly reconstructed time-averaged fringes (with precision ε = 0.01 · λ 1 ) is depicted in Figure 5. Figure 5B confirms that we need at least m = 17 frames for the reconstruction of the fourth time-averaged fringe, m = 13 for the reconstruction of the third time-averaged fringe, m = 9 for the second fringe, and m = 5 for the first fringe (all with accuracy ε = 0.01 · λ 1 ). Unfortunately, the difference between the standard deviations S 1 ( a ) and S 2 ( a ) at the center of the first time-averaged fringe is not sufficient for the implementation of the DVC scheme (the contrast between the time-averaged secret and the background is insufficient). The highest contrast (difference between the standard deviations S 1 ( a ) and S 2 ( a ) ) is reached at the centers of the second, third, and fourth fringes (Figure 4B). In summary, sixteen frames per period enables the reconstruction of only three time-averaged moiré fringes with predefined precision.
As already demonstrated in previous sections, stochastic oscillations cannot be employed in the DVC scheme simply because these oscillations do not yield time-averaged fringes. Thus, a choice must be made between the harmonic and rectangular waveforms only.
However, as of 2026 most consumer-based computer monitors only support refresh rates between 60 and 240 Hz. It has also been shown in [17] that the average minimal frequency of oscillations required to recognize the secret image by the naked eye is equal to 27 Hz, and the minimum frequency of oscillations for individuals to perceive secret images ranges from 16 Hz to 44 Hz. As these experiments were conducted on a limited set of individuals, it would be logical to consider even higher frequencies up to 50 Hz. In general, if the monitor refresh rate is ν Hz (frames per second) and the required frequency of simulated oscillations on the computer screen is ω Hz (the required frequency of oscillations of the moiré grating on the computer screen), then the number of frames available for the reconstruction of a single period of oscillation reads as follows:
m = ν ω .
For example, if a monitor refresh rate of ν = 240 Hz is considered and the moiré grating oscillation frequency is ω = 50 Hz, then only m = 240 / 50 = 4.8 frames are available per single oscillation period. If a monitor with a refresh rate of ν = 120 Hz is used and higher oscillation frequencies are considered, e.g., ω = 60 / 70 / 80 / 90 / 100 Hz, then the number of frames per oscillation period decreases to m = 2 / 1.7 / 1.5 / 1.3 / 1.2 , respectively. In such cases, even rectangular waveforms could only be implemented when m = 2 .
Considering the typical refresh rates of common monitors ν = 60 / 75 / 120 / 144 / 240 Hz and an oscillation frequency of ω = 50 Hz, the number of frames per oscillation period becomes m = 1.2 / 1.5 / 2.4 / 2.9 / 4.8 . As shown above, harmonic oscillations are feasible only when m 5 (Figure 5). Since monitors with refresh rates higher than 240 Hz are still uncommon, practical computational implementation of the DVC scheme is limited to rectangular waveforms. Therefore, the monitor refresh rate and the oscillation frequency must both be carefully selected in order to ensure a sufficient number of frames per oscillation period guaranteeing reliable reconstruction of the secret image.

3.3. Optimal Moiré Grating in the Case of a Rectangular Waveform

Let us suppose that the harmonic grating is oscillated according to a rectangular waveform. Then, time-averaged fringes form when (Equation (22)):
a = λ 4 ( 2 n 1 ) , n = 1 , 2 , 3 , .
The computational experiments in Figure 3 prove that the same relationship between the amplitude of the oscillations a and the pitch of the grating λ also holds for the Ronchi grating and the rectangular waveform oscillations.
When rectangular waveform oscillations are reconstructed on the digital computer screen, the cover image is deflected in the vertical direction (up and down) by the amplitude a. The cover image can be shifted only by an integer number of pixels on the computer screen. Thus, time-averaged fringes on the computer screen become fully developed if only the amplitude of oscillations (Equation (27)) is an integer number (equal to an integer number of pixels).
Let us suppose that s pixels are used to visualize one pitch of the harmonic (or Ronchi) grating on a computer screen. If the number of pixels s used to represent one pitch of the harmonic moiré grating is quite small, then the brightness level of the i-th ( i = 1 , 2 , , s ) pixel (in each pitch of the grating) should be evaluated as an integer value of the function M ( x ) (Equation (6)) on the interval x λ s ( i 1 ) , λ s i , i = 1 , 2 , , s :
M i = λ s ( i 1 ) λ s i M ( x ) d x .
In the case of rectangular waveform oscillations, the amplitude a (yielding a fully developed time-averaged fringe) is an integer number only if the number of pixels s is a multiple of 4 (Equation (27)). Otherwise, if s is not a multiple of 4, the amplitude of oscillations is not an integer number and has to be rounded up to the nearest integer, resulting in additional noise in the time-averaged image.
Thus, a single pitch of the moiré grating (harmonic or Ronchi) should be constructed of s = 4 k , k = 1 , 2 , pixels. Rounding errors naturally arise when a continuous fringe pattern is discretized. However, if the Ronchi grating is oscillated according the rectangular waveform, these errors vanish if the oscillation amplitude is a multiple of the pixel size.

3.4. Computational Validation of the Optimal DVC Scheme

Consider the basic shape of a star encoded in the moiré grating (Figure 6). Two different moiré gratings are used for this purpose: the harmonic moiré grating (Figure 6A) and the Ronchi grating (Figure 6B). Two different pitches are used to represent the background and the secret: λ 1 = 0.5 is used in the background, and λ 2 = 0.57 in the area occupied by the star image. The secret star image is embedded into the cover image by means of the initial phase-scrambling and phase-regularization algorithms [15]. Phase scrambling is implemented by applying random phase variations to adjacent columns of pixels to hide the embedded secret information within the background moiré grating [15]. Randomization of the initial phases prevents direct visual recognition of encoded information while maintaining continuity of the grating by phase-matching at the boundaries of the encoded region [15]. Clearly, the naked eye cannot interpret the star image in the static cover images (Figure 6).
The secret star image is leaked when the cover image oscillates according to the rectangular waveform (in the vertical direction). A fully-developed time-averaged moiré fringe is formed in the area occupied by the background (for both the harmonic and Ronchi gratings) when the amplitude of the rectangular waveform oscillations is a = 3 λ 1 4 = 0.375 (according to Equation (22)). Analogously, a fully developed time-averaged moiré fringe is formed in the area occupied by the star symbol when a = 3 λ 2 4 = 0.4275 (Figure 6).

4. Discussion and Concluding Remarks

The basic properties of DVC schemes have been exploited in different engineering applications, including visual monitoring and testing of vibrating systems as well as hiding different images with specific security requirements. It appears that the oscillation of the cover image required to decode the secret can also be used for assessment of the human visual system. This assessment is based on a counterintuitive phenomenon governing the processes of optical averaging in time. The frequency of oscillation does not play any role in the formation of the time-averaged moiré fringes (Equation (7)); however, the ability to unleash time-averaging effects by human visual systems does depend on the frequency of oscillation.
The apparent simplicity of computational implementation of DVC schemes on a computer screen is misleading. It appears that many different hardware limitations (such as the refresh rate of the digital display) prevent efficient reconstruction of the oscillating moiré grating on a computer screen. The correct representation of each pixel is important in such computational representations of the DVC scheme; note that the cover image is constructed using sophisticated pixel scrambling algorithms.
The major contribution of this paper is to clearly identify the optimal parameters of a DVC scheme which could be implemented using a standard personal computer. The presented results enable simple and efficient application of the DVC scheme for optical testing of the ability of the human visual system to track rapidly oscillating images. The ability to detect threshold oscillation frequencies when the person is able to see and interpret the secret image might also provide novel tools for evaluating some aspects of human visual processing and its disorders as well as visual attention and fatigue.
All of these aspects, including determining the threshold and possible influence of shape on image recognition, remain the definite objective of future investigations or even clinical trials. Although some preliminary investigations have been used to prove the applicability of the DVC scheme to testing the human visual system [17], a further and wider investigation would require scrupulous tuning of the parameters of the whole experimental setup. The results of this paper are crucial to designing a reliable and efficient implementation of the DVC scheme for human visual system research purposes.

Author Contributions

Conceptualization, L.S., A.G., and M.R.; methodology, P.P. and A.G.; software, L.S.; validation, A.G., L.S., and M.R.; formal analysis, M.R.; investigation, L.S.; writing—original draft preparation, L.S.; writing—review and editing, P.P. and M.R.; visualization, L.S. and P.P.; supervision, M.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Kobayashi, A.; Society for Experimental Mechanics (U.S.). Handbook on Experimental Mechanics; VCH: New York, NY, USA, 1993. [Google Scholar]
  2. Greivenkamp, J.E. Color dependent optical prefilter for the suppression of aliasing artifacts. Appl. Opt. 1990, 29, 676–684. [Google Scholar] [CrossRef] [PubMed]
  3. Yue, H.; Cheng, Y.; Mao, Y.; Cao, C.; Yang, J. Recaptured Screen Image Demoiréing in Raw Domain. IEEE Trans. Multimed. 2023, 25, 5589–5600. [Google Scholar] [CrossRef]
  4. Cheng, X.; Fu, Z.; Yang, J. Improved multi-scale dynamic feature encoding network for image demoiréing. Pattern Recognit. 2021, 116, 107970. [Google Scholar] [CrossRef]
  5. Yeh, C.H.; Lo, C.; He, C.H. Multibranch Wavelet-Based Network for Image Demoiréing. Sensors 2024, 24, 2762. [Google Scholar] [CrossRef] [PubMed]
  6. Yao, H.; Liu, T.; Li, G.; Qin, C. Screen-shot and Demoiréd image identification based on DenseNet and DeepViT. Expert Syst. Appl. 2024, 240, 122580. [Google Scholar] [CrossRef]
  7. Munoz-Rodríguez, J.; Rodríguez-Vera, R. Image encryption based on moiré pattern performed by computational algorithms. Opt. Commun. 2004, 236, 295–301. [Google Scholar] [CrossRef]
  8. Zhou, Y.; Li, K.; Liang, H.; Zhou, J.; Wang, J.; He, H. Information hiding scheme based on optical moiré-pixel matrix. Opt. Commun. 2019, 437, 403–407. [Google Scholar] [CrossRef]
  9. Qin, T.; Feng, B.; Chen, B.; Peng, Z.; Xia, Z.; Lu, W. Moiré pattern generation-based image steganography. J. Inf. Secur. Appl. 2024, 82, 103753. [Google Scholar] [CrossRef]
  10. Liu, B.; Song, W.; Zheng, M.; Fu, C.; Chen, J.; Wang, X. Semantically enhanced selective image encryption scheme with parallel computing. Expert Syst. Appl. 2025, 279, 127404. [Google Scholar] [CrossRef]
  11. Ashraf, M.; Chapiro, A.; Mantiuk, R.K. Resolution limit of the eye—How many pixels can we see? Nat. Commun. 2025, 16, 9086. [Google Scholar] [CrossRef] [PubMed]
  12. Wang, Q.; Bryanston-Cross, P.J.; Li, Y.; Liu, Z. Mathematical and experimental description of spatiotemporal frequency sensitivity for human polarization perception. Optik 2022, 251, 168376. [Google Scholar] [CrossRef]
  13. Dorr, M.; Elze, T.; Wang, H.; Lu, Z.L.; Bex, P.J.; Lesmes, L.A. New Precision Metrics for Contrast Sensitivity Testing. IEEE J. Biomed. Health Inf. 2017, 22, 919–925. [Google Scholar] [CrossRef] [PubMed]
  14. D’Angelo, M.; Lanfranco, R.C.; Chancel, M.; Ehrsson, H.H. Parietal alpha frequency shapes own-body perception by modulating the temporal integration of bodily signals. Nat. Commun. 2026, 17, 53. [Google Scholar] [CrossRef] [PubMed]
  15. Ragulskis, M.; Aleksa, A. Image hiding based on time-averaging moiré. Opt. Commun. 2009, 282, 2752–2759. [Google Scholar] [CrossRef]
  16. Saunoriene, L.; Saunoris, M.; Ragulskis, M. Image Hiding in Stochastic Geometric Moiré Gratings. Mathematics 2023, 11, 1763. [Google Scholar] [CrossRef]
  17. Lu, G.; Saunoriene, L.; Gelžinis, A.; Petrauskiene, V.; Ragulskis, M. Visual integration of vibrating images in time. Opt. Eng. 2018, 57, 093107. [Google Scholar] [CrossRef]
  18. Petrauskiene, V.; Palivonaite, R.; Aleksa, A.; Ragulskis, M. Dynamic visual cryptography based on chaotic oscillations. Commun. Nonlinear Sci. Numer. Simul. 2014, 19, 112–120. [Google Scholar] [CrossRef]
  19. Liang, C.; Hung, Y.; Durelli, A.; Hovanesian, J. Time-averaged moire method for in-plane vibrational analysis. J. Sound Vib. 1979, 62, 267–275. [Google Scholar] [CrossRef]
  20. Watson, G.N. A Treatise on the Theory of Bessel Functions, 2nd ed.; Cambridge University Press: Cambridge, UK, 1995. [Google Scholar]
  21. Patorski, K. Handbook of the Moiré Fringe Technique; Elsevier: Amsterdam, The Netherlands, 1993. [Google Scholar]
  22. Ibrahim, D.; Teh, J.; Abdullah, R. An overview of visual cryptography techniques. Multim. Tools Appl. 2021, 80, 31927–31952. [Google Scholar] [CrossRef]
Figure 1. Optical blur effects induced by harmonic oscillations result in time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and the Ronchi grating (panel (B)). The horizontal axis stands for the amplitude a of harmonic oscillations. Vertical dashed lines denote the centers of the time-averaged fringes. The envelope function E ( a ) and standard deviation S ( a ) of pixels in the time-averaged images describe the optical blur effects induced by harmonic oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and the standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Figure 1. Optical blur effects induced by harmonic oscillations result in time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and the Ronchi grating (panel (B)). The horizontal axis stands for the amplitude a of harmonic oscillations. Vertical dashed lines denote the centers of the time-averaged fringes. The envelope function E ( a ) and standard deviation S ( a ) of pixels in the time-averaged images describe the optical blur effects induced by harmonic oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and the standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Mathematics 14 01020 g001
Figure 2. Optical blur effects induced by stochastic oscillations do not result into time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and Ronchi grating (panel (B)). The horizontal axis stands for the variance σ 2 of stochastic oscillations. The envelope function E ( σ ) and standard deviation S ( σ ) of pixels in the time-averaged images describe the optical blur effects induced by stochastic oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and the standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Figure 2. Optical blur effects induced by stochastic oscillations do not result into time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and Ronchi grating (panel (B)). The horizontal axis stands for the variance σ 2 of stochastic oscillations. The envelope function E ( σ ) and standard deviation S ( σ ) of pixels in the time-averaged images describe the optical blur effects induced by stochastic oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and the standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Mathematics 14 01020 g002
Figure 3. Optical blur effects induced by rectangular waveform oscillations result in time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and Ronchi grating (panel (B)). The horizontal axis stands for the amplitude a of rectangular waveform oscillations. Vertical dashed lines denote the centers of the time-averaged fringes. The envelope function E ( a ) and the standard deviation S ( a ) of pixels in the time-averaged images describe the optical blur effects induced by rectangular waveform oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Figure 3. Optical blur effects induced by rectangular waveform oscillations result in time-averaged fringes in time-averaged images of the one-dimensional harmonic moiré grating (panel (A)) and Ronchi grating (panel (B)). The horizontal axis stands for the amplitude a of rectangular waveform oscillations. Vertical dashed lines denote the centers of the time-averaged fringes. The envelope function E ( a ) and the standard deviation S ( a ) of pixels in the time-averaged images describe the optical blur effects induced by rectangular waveform oscillations. The pitch of the grating (both harmonic and Ronchi) is set to λ = 0.5 . The gray dotted lines in panel (B) correspond to the envelope function and standard deviation of the time-averaged harmonic moiré grating as shown in panel (A).
Mathematics 14 01020 g003
Figure 4. Computational reconstruction of the standard deviation S 1 ( a ) (black solid line) and S 2 ( a ) (blue dotted line). The first seven time-averaged fringes are developed according to the predefined accuracy ε = 0.01 · λ 1 with m = 32 frames per period (panel (A)). Only three first time-averaged fringes are correctly reconstructed at m = 16 (panel (B)). Only the first time-averaged fringe is correctly reconstructed at m = 8 (panel (C)). m = 2 results in the rectangular waveform oscillations (panel (D)). The pitches of the harmonic gratings are set to λ 1 = 0.5 and λ 2 = 0.57 in all panels. Vertical dashed black and blue lines show theoretical centers of fringes for λ 1 and λ 2 respectively.
Figure 4. Computational reconstruction of the standard deviation S 1 ( a ) (black solid line) and S 2 ( a ) (blue dotted line). The first seven time-averaged fringes are developed according to the predefined accuracy ε = 0.01 · λ 1 with m = 32 frames per period (panel (A)). Only three first time-averaged fringes are correctly reconstructed at m = 16 (panel (B)). Only the first time-averaged fringe is correctly reconstructed at m = 8 (panel (C)). m = 2 results in the rectangular waveform oscillations (panel (D)). The pitches of the harmonic gratings are set to λ 1 = 0.5 and λ 2 = 0.57 in all panels. Vertical dashed black and blue lines show theoretical centers of fringes for λ 1 and λ 2 respectively.
Mathematics 14 01020 g004
Figure 5. Relationship between the minimum number of frames m used to reconstruct one period of harmonic oscillations and the number of the properly reconstructed fringes at λ = 0.5 . Envelope functions of the time-averaged images reconstructed at m = 32 , m = 16 , and m = 8 frames per period are depicted in panel (A). Panel (B) demonstrates the relationship between the number of frames per period of harmonic oscillations and the number of time-averaged fringes reconstructed with the predefined accuracy ε = 0.01 · λ .
Figure 5. Relationship between the minimum number of frames m used to reconstruct one period of harmonic oscillations and the number of the properly reconstructed fringes at λ = 0.5 . Envelope functions of the time-averaged images reconstructed at m = 32 , m = 16 , and m = 8 frames per period are depicted in panel (A). Panel (B) demonstrates the relationship between the number of frames per period of harmonic oscillations and the number of time-averaged fringes reconstructed with the predefined accuracy ε = 0.01 · λ .
Mathematics 14 01020 g005
Figure 6. The secret image is encoded into the harmonic grating (the left column in panel (A)) and Ronchi grating (the left column in panel (B)). Harmonic and Ronchi moiré gratings with pitches λ 1 = 0.5 and λ 2 = 0.57 are used to encode the background and the secret image, respectively. Rectangular waveform oscillations are used to decode the secret; the background is blurred when the amplitude of oscillations is equal to a = 0.3750 (the middle column in panels (A,B)), while the secret is blurred when a = 0.4275 (the right column in panels (A,B)).
Figure 6. The secret image is encoded into the harmonic grating (the left column in panel (A)) and Ronchi grating (the left column in panel (B)). Harmonic and Ronchi moiré gratings with pitches λ 1 = 0.5 and λ 2 = 0.57 are used to encode the background and the secret image, respectively. Rectangular waveform oscillations are used to decode the secret; the background is blurred when the amplitude of oscillations is equal to a = 0.3750 (the middle column in panels (A,B)), while the secret is blurred when a = 0.4275 (the right column in panels (A,B)).
Mathematics 14 01020 g006
Table 1. Analytical representations of the time-averaged harmonic grating in case of harmonic, stochastic, and rectangular waveforms. Moiré gratings in the state of equilibrium are denoted by M ( x ) and the time-averaged gratings by M ¯ ( x ) ; the function u ( t ) defines the deflections from the state of equilibrium, while P ( ω ) is a Fourier transform of the density functions of the oscillations.
Table 1. Analytical representations of the time-averaged harmonic grating in case of harmonic, stochastic, and rectangular waveforms. Moiré gratings in the state of equilibrium are denoted by M ( x ) and the time-averaged gratings by M ¯ ( x ) ; the function u ( t ) defines the deflections from the state of equilibrium, while P ( ω ) is a Fourier transform of the density functions of the oscillations.
GrantingHarmonic
Mathematics 14 01020 i001
M ( x ) = 1 2 + 1 2 cos 2 π λ x
Oscillations
Harmonic
u ( t ) = a sin t ω t + φ
P ( ω ) = J 0 ω a
M ¯ ( x , a ) = 1 2 + 1 2 cos 2 π λ x J 0 2 π λ a
Stochastic
u ( t ) N 0 , σ 2
P ( ω ) = exp 1 2 ( ω σ ) 2
M ¯ ( x , σ ) = 1 2 + 1 2 cos 2 π λ x exp 1 2 2 π λ σ 2
Rectangular
u ( t ) = a at t π 2 ω ; 0 a at t 0 ; π 2 ω
P ( ω ) = cos ω a
M ¯ ( x , a ) = 1 2 + 1 2 cos 2 π λ x cos 2 π λ a
Table 2. Analytical representations of the time-averaged Ronchi grating in the cases of harmonic, stochastic, and rectangular waveforms. Moiré gratings in the state of equilibrium are denoted by M ( x ) and the time-averaged gratings by M ¯ ( x ) ; the function u ( t ) defines the deflections from the state of equilibrium, while P ( ω ) is a Fourier transform of the density functions of the oscillations.
Table 2. Analytical representations of the time-averaged Ronchi grating in the cases of harmonic, stochastic, and rectangular waveforms. Moiré gratings in the state of equilibrium are denoted by M ( x ) and the time-averaged gratings by M ¯ ( x ) ; the function u ( t ) defines the deflections from the state of equilibrium, while P ( ω ) is a Fourier transform of the density functions of the oscillations.
GrantingRonchi
OscillationsMathematics 14 01020 i002
M ( x ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ
a 0 = 2 ( 1 a ) , a n = sin ( n π ( 1 a ) ) sin ( n π ( 1 + a ) ) n π
b n = cos ( n π ( 1 + a ) ) cos ( n π ( 1 a ) ) n π , n = 1 , 2 ,
Harmonic
u ( t ) = a sin t ω t + φ
P ( ω ) = J 0 ω a

M ¯ ( x , a ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ J 0 2 π n λ a
Stochastic
u ( t ) N 0 , σ 2
P ( ω ) = exp 1 2 ( ω σ ) 2
M ¯ ( x , σ ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ exp 1 2 2 π n λ σ 2
Rectangular
u ( t ) = a at t π 2 ω ; 0 a at t 0 ; π 2 ω
P ( ω ) = cos ω a
M ¯ ( x , a ) = a 0 2 + n = 1 + a n cos 2 n π x λ + b n sin 2 n π x λ cos 2 π n λ a
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Saunoriene, L.; Palevicius, P.; Gelzinis, A.; Ragulskis, M. Optimal Implementation of Dynamical Visual Cryptography Scheme for Imaging-Based Testing of Human Visual System. Mathematics 2026, 14, 1020. https://doi.org/10.3390/math14061020

AMA Style

Saunoriene L, Palevicius P, Gelzinis A, Ragulskis M. Optimal Implementation of Dynamical Visual Cryptography Scheme for Imaging-Based Testing of Human Visual System. Mathematics. 2026; 14(6):1020. https://doi.org/10.3390/math14061020

Chicago/Turabian Style

Saunoriene, Loreta, Paulius Palevicius, Arvydas Gelzinis, and Minvydas Ragulskis. 2026. "Optimal Implementation of Dynamical Visual Cryptography Scheme for Imaging-Based Testing of Human Visual System" Mathematics 14, no. 6: 1020. https://doi.org/10.3390/math14061020

APA Style

Saunoriene, L., Palevicius, P., Gelzinis, A., & Ragulskis, M. (2026). Optimal Implementation of Dynamical Visual Cryptography Scheme for Imaging-Based Testing of Human Visual System. Mathematics, 14(6), 1020. https://doi.org/10.3390/math14061020

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop