Available via license: CC BY 4.0
Content may be subject to copyright.
Citation: Jafari, F.; Nadeem, A.
Measuring Effectiveness of
Metamorphic Relations for Image
Processing Using Mutation Testing. J.
Imaging 2024,10, 87. https://
doi.org/10.3390/jimaging10040087
Academic Editor: Toon Goedemé
Received: 23 February 2024
Revised: 28 March 2024
Accepted: 29 March 2024
Published: 6 April 2024
Copyright: © 2024 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license (https://
creativecommons.org/licenses/by/
4.0/).
Journal of
Imaging
Article
Measuring Effectiveness of Metamorphic Relations for Image
Processing Using Mutation Testing
Fakeeha Jafari * and Aamer Nadeem
Department of Computer Science, Capital University of Science and Technology, Islamabad 44000, Pakistan;
anadeem@cust.edu.pk
*Correspondence: fakeehajafari@gmail.com or fakeeha.jafri@numl.edu.pk
Abstract: Testing an intricate plexus of advanced software system architecture is quite challenging
due to the absence of test oracle. Metamorphic testing is a popular technique to alleviate the test
oracle problem. The effectiveness of metamorphic testing is dependent on metamorphic relations
(MRs). MRs represent the essential properties of the system under test and are evaluated by their fault
detection rates. The existing techniques for the evaluation of MRs are not comprehensive, as very
few mutation operators are used to generate very few mutants. In this research, we have proposed
six new MRs for dilation and erosion operations. The fault detection rate of six newly proposed
MRs is determined using mutation testing. We have used eight applicable mutation operators and
determined their effectiveness. By using these applicable operators, we have ensured that all the
possible numbers of mutants are generated, which shows that all the faults in the system under test
are fully identified. Results of the evaluation of four MRs for edge detection show an improvement in
all the respective MRs, especially in MR
1
and MR
4
, with a fault detection rate of 76.54% and 69.13%,
respectively, which is 32% and 24% higher than the existing technique. The fault detection rate of
MR
2
and MR
3
is also improved by 1%. Similarly, results of dilation and erosion show that out of
8 MRs, the fault detection rates of four MRs are higher than the existing technique. In the proposed
technique, MR1is improved by 39%, MR4is improved by 0.5%, MR6is improved by 17%, and MR8
is improved by 29%. We have also compared the results of our proposed MRs with the existing MRs
of dilation and erosion operations. Results show that the proposed MRs complement the existing
MRs effectively as the new MRs can find those faults that are not identified by the existing MRs.
Keywords: image processing; metamorphic relations; metamorphic testing; mutation testing
1. Introduction
In the domain of computer graphics, the importance of Image Processing Applica-
tions (IPAs) is growing fast in our daily lives [
1
]. IPAs utilize algorithms to analyze the
characteristics of an image using various methods and techniques. Digital images can
be rotated, scaled, translated, and sheared by using geometric transformation. Also, in
binary and grayscale images, different morphological operations such as erosion, dilation,
skeletonization, and opening and closing operations are used for filtering, thinning, and
pruning of the images [2].
Nowadays, IPAs are widely used in safety and mission-critical systems such as medical
radiology, biometric systems, surveillance systems, etc. [
1
]. In medical radiology, machine
learning and deep learning approaches are frequently used for automated diagnostics for
patients using medical images such as MRI, CT Scan, ultrasound, etc. This diagnostic
process involves some pre-processing steps, such as edge detection, and post-processing
steps, such as dilation and erosion operations. Any defects in these operations will mate-
rially affect the diagnostics results. Testing of the software used in these critical systems
is vital to ascertain the credibility of the results produced by these systems. Software
testing is a common method to test and verify the quality of IPA software [
3
]. In software
J. Imaging 2024,10, 87. https://doi.org/10.3390/jimaging10040087 https://www.mdpi.com/journal/jimaging
J. Imaging 2024,10, 87 2 of 22
testing, an oracle is a mechanism that ascertains whether the software has been successfully
executed for a test case or not. The Software is run for a specific test case, and the result
(actual output) is compared with the anticipated result (expected output). If the output
differs from what was anticipated, the program is said to be faulty [
4
]. Testing of IPAs is
especially challenging due to the test oracle problem. For example, in image processing,
edge detection is an operation that is used to compute the edges of the image. If we want
to check whether the edges computed by the edge detection operator are correct or not,
then we do not have the reference image (expected output) for comparison. This is the
well-known oracle problem where the expected results are not obvious.
Among many solutions to test the oracle problem, metamorphic testing (MT) is the
most popular technique that tackles the oracle problem in software testing of IPAs [
5
].
MT was first proposed by Chen et al. in 1998 [
6
]. In MT, we need source test cases that
manifest the unexpected behavior in the system under test (SUT) [
7
]. The source test cases
are generated through traditional test case generation techniques such as random test case
generation, coverage criterion, etc. From these source test cases, a set of new test cases
known as follow-up test cases are constructed using metamorphic relations (MR) [
8
]. MT
defines some MRs, which consist of an input relation and an output relation. If the output
results of the source and follow-up test cases obtained from SUT satisfy the output relation,
then the program is highly reliable. Otherwise, the program will have logical errors [
9
].
The steps involved in MT are shown in Figure 1.
J. Imaging 2024, 10, x FOR PEER REVIEW 2 of 23
critical systems is vital to ascertain the credibility of the results produced by these sys-
tems. Software testing is a common method to test and verify the quality of IPA software
[3]. In software testing, an oracle is a mechanism that ascertains whether the software has
been successfully executed for a test case or not. The Software is run for a specific test
case, and the result (actual output) is compared with the anticipated result (expected
output). If the output differs from what was anticipated, the program is said to be faulty
[4]. Testing of IPAs is especially challenging due to the test oracle problem. For example,
in image processing, edge detection is an operation that is used to compute the edges of
the image. If we want to check whether the edges computed by the edge detection oper-
ator are correct or not, then we do not have the reference image (expected output) for
comparison. This is the well-known oracle problem where the expected results are not
obvious.
Among many solutions to test the oracle problem, metamorphic testing (MT) is the
most popular technique that tackles the oracle problem in software testing of IPAs [5].
MT was first proposed by Chen et al. in 1998 [6]. In MT, we need source test cases that
manifest the unexpected behavior in the system under test (SUT) [7]. The source test
cases are generated through traditional test case generation techniques such as random
test case generation, coverage criterion, etc. From these source test cases, a set of new test
cases known as follow-up test cases are constructed using metamorphic relations (MR)
[8]. MT defines some MRs, which consist of an input relation and an output relation. If
the output results of the source and follow-up test cases obtained from SUT satisfy the
output relation, then the program is highly reliable. Otherwise, the program will have
logical errors [9]. The steps involved in MT are shown in Figure 1.
Figure 1. Process of metamorphic testing.
The reliability of our test results is a function of the efficacy of MT, which is de-
pendent on the effectiveness of MRs. One of the important metrics used to evaluate MRs
is the fault detection rate of that particular MR. The fault detection rate shows that either
the selected test cases are able to detect faults or not (can we find violations of MRs for the
corresponding test cases?) [10]. The fault detection rate is measured as the number of
faults detected by the selected source test cases divided by the number of faults detected
by the total number of test cases [11].
In our proposed framework, we have studied the fault detection capabilities of MRs.
For the evaluation of MRs, we have initially selected four existing MRs of edge detection
operation proposed by Sim et al. [12]. We have proposed six MRs for dilation and erosion
operationsWe have also ascertained the fault detection capabilities of our proposed MRs
(four general and two specific) for dilation and erosion operations.
The existing literature shows that Mayer and Guderlei [13] first proposed four gen-
eral MRs for Euclidean distance transform. These four MRs (rotation at 90 degrees,
transposition, reflection at ordinate, and reflection at abscissa) are generally applicable to
all image processing operations. Furthermore, Jameel et al. [14] furthered the research by
using two of these four to ascertain the fault detection rate of dilation and erosion MRs. In
total, these authors have presented eight MRs (two general and six specific) for dilation
and erosion operation. Jameel et al. [14] used only two general MRs, i.e., reflection at or-
dinate and reflection at abscissa. However, the fault detection rate of the remaining two
MRs (rotation and transposition) is not determined. Therefore, we have proposed rota-
Figure 1. Process of metamorphic testing.
The reliability of our test results is a function of the efficacy of MT, which is dependent
on the effectiveness of MRs. One of the important metrics used to evaluate MRs is the
fault detection rate of that particular MR. The fault detection rate shows that either the
selected test cases are able to detect faults or not (can we find violations of MRs for the
corresponding test cases?) [
10
]. The fault detection rate is measured as the number of faults
detected by the selected source test cases divided by the number of faults detected by the
total number of test cases [11].
In our proposed framework, we have studied the fault detection capabilities of MRs.
For the evaluation of MRs, we have initially selected four existing MRs of edge detection
operation proposed by Sim et al. [12]. We have proposed six MRs for dilation and erosion
operationsWe have also ascertained the fault detection capabilities of our proposed MRs
(four general and two specific) for dilation and erosion operations.
The existing literature shows that Mayer and Guderlei [
13
] first proposed four general
MRs for Euclidean distance transform. These four MRs (rotation at 90 degrees, transposition,
reflection at ordinate, and reflection at abscissa) are generally applicable to all image
processing operations. Furthermore, Jameel et al. [
14
] furthered the research by using two
of these four to ascertain the fault detection rate of dilation and erosion MRs. In total,
these authors have presented eight MRs (two general and six specific) for dilation and
erosion operation. Jameel et al. [
14
] used only two general MRs, i.e., reflection at ordinate
and reflection at abscissa. However, the fault detection rate of the remaining two MRs
(rotation and transposition) is not determined. Therefore, we have proposed rotation and
transposition MRs for dilation and erosion operations to ascertain the fault detection rate
of these two MRs. The associative property is specific to the dilation operation. We have
J. Imaging 2024,10, 87 3 of 22
changed the order of associative property to check whether the new arrangement satisfies
the dilation operation or not. This result leads us to present a new MR for dilation operation.
Image translation is an operation of image processing. We have checked this operation on
both dilation and erosion and come to know that it only satisfies the erosion operation. In
this way, we have proposed a new MR for erosion operation.
After the selection and identification of MRs, we generated the source test cases
through a criterion proposed by Jafari et al. [
15
]. In the paper, we (the authors) have
discussed in detail how source test cases are generated using the black box testing technique
(equivalence class testing) and the white box testing technique (coverage criterion). We have
used 95 test cases of MRI brain images for our experiments taken from www.kaggle.com.
Later, follow-up test cases are generated using source test cases and MRs. Both the source
and follow-up test cases are given to the SUT. In this paper, we have the following three
SUTs, i.e., edge detection, dilation, and erosion. The relation between the outputs of both
the source and follow-up test cases is checked. If the MR holds between the outputs of two
test cases, then the SUT has no faults; otherwise, the SUT is faulty.
Afterward, mutation testing is performed to evaluate MRs. Mutation operators always
play an important role in generating the mutants. In existing literature [
12
,
14
,
16
,
17
], only
a few mutation operators are used that have generated a very small number of mutants.
The authors did not discuss the effectiveness of mutation operators or which operator
is effective enough to generate and kill a maximum number of mutants. We have used
nine mutation operators and evaluated which operator is most effective in generating and
killing a maximum number of mutants.
In the mutation process, we ran the original program on source test cases and then
ran the original program on the follow-up test cases. The outputs of both the test cases are
recorded for comparison. In the second phase of testing, we ran the same two test cases on
the mutated program. The outputs of these test cases are also recorded for comparison. If
outputs of both original and mutated test cases satisfy their related MR, then it shows that
the mutant is not killed; otherwise, the mutant is killed. Afterward, the mutation score is
calculated to check the fault detection rate of each MR. If the mutation score is near 1, then
it shows that the MR is strong, or else the MR is weak enough to find the violation.
This paper makes the following contributions:
•
We have proposed six new MRs for dilation and erosion operations and ascertain the
effectiveness of these MRs while also assessing improvements in them using mutation
testing.
•
We have compared our six proposed MRs with the eight existing MRs for dilation and
erosion operations.
•
In existing literature, only two mutation operators are used for the evaluation of
edge detection and morphological image operations. We have used nine mutation
operators to improve the effectiveness of edge detection and morphological image
operation (dilation and erosion) MRs. We have also compared the result of our
proposed framework with the existing techniques.
•
We have also checked the effectiveness of mutation operators to determine which
operator is more effective in generating and killing a maximum number of mutants.
This paper is organized as follows; Section 2discusses the related work. Section 3de-
scribes the existing and newly proposed MRs. Section 4discusses the proposed framework
for the evaluation of MRs. In Section 5experiment design is narrated. Section 6discusses
the results and discussion whereas Section 7describes the conclusion.
2. Related Work
In literature review, we have covered those papers where MRs are evaluated to
improve the effectiveness of MT. MT is a common technique to improve the test oracle
problem where it is hard to assess the output correctly when an arbitrary input has been
given to the SUT [18].
J. Imaging 2024,10, 87 4 of 22
Many researchers have used different image processing operators, such as edge detec-
tion, image region growth, dilation and erosion, and used their properties as metamorphic
relations. The effectiveness of these MRs is checked through mutation testing. Sim et al. [
12
]
proposed a framework to determine the effectiveness of MT. To conduct the experiments,
collections of images are needed for the generation of test inputs. Unlike model-generated
images, camera-captured images (real images) from published image libraries are selected
randomly. Mutation testing is used to evaluate the fault detection rate of MT. Single op-
erator faults and stride implementation faults are seeded into the Sobel edge detection
program. In single-operator faults, two types of operators are used: logical operator replace-
ment (LOR) and relational operator replacement (ROR). Results show that MT is capable
of detecting faulty edge detection programs up to 90%. Jameel et al. [
14
] discussed the
oracle problem in IPAs and showed how SUT properties could be used as MR. The authors
have studied some properties of morphological image operations. The effectiveness of
MRs can be analyzed through mutation testing. In order to conduct the experiments, input
images are selected randomly. Mutation testing is used to show the effectiveness of the
above-mentioned MRs. Therefore, errors are deliberately added to the Mex C code. The
mutation score tells the number of killed mutants. The mutant is said to be killed if an
MR is able to detect the bug. It is concluded that for bug identification, specific images are
needed instead of general input images such as Lena. Jiang et al. [
19
] applied MT to the
image region growth program. Mutation testing is used to find the effectiveness of MRs.
In this paper, MT is applied to test the aerospace image processing software. A segmental
symbolic evaluation method is used to generate the input data. The original program
implemented in C language is executed sequentially with three mutant programs. The
program is said to be faulty if an MR violation can be seen after the validation of output
relations.
Many researchers have been fascinated by the use of MT techniques in machine
learning algorithms as well. Jameel et al. [
20
] used support vector machine (SVM) to
automate the interpretation of the output results of test oracle requirements. These authors
have designed a comparative study to gauge the effectiveness of their proposed scheme
against the latest MT oracle technique and the traditional statistical oracle method. Thirty-
five distinctive errors are introduced to the original program written in C language to
create 35 unique resultant programs. For evaluation purposes, these authors have created
the output images from these 35 versions of the image dilation program for pass or fail
criteria. Half of the selected images are used to train SVM using various features (wavelet
features, binary features, hough features, statistical features) of dilated images to analyze
their effectiveness. The results confirmed that SVM was better in terms of the lowest
classification error than the other two techniques. Chan et al. [
21
] integrated the pattern
classification technique with MT. A trained classifier (C4.5) is employed for the test oracle
by labeling pass/fail. The passed test outputs may also show false positive/negative
failures, which are then processed for additional testing. This proposal has proven to be
efficient and effective.
MT techniques have also been used with structural testing. Ding et al. [
17
] used
a discrete dipole approximation program (ADDA) implemented in FORTRAN and C++
to check the effectiveness of MT. In this paper, statement coverage is used to check the
effectiveness of test cases, whereas mutation testing is used to check the effectiveness of
MT. Due to the unknown test output relations, the MRs of this program are considered
weak and inadequate. Ding and Hu [
16
] developed a method for the adequacy of MRs.
Coverage criterion, mutation analysis, and mutation tests for testing MRs are critical
factors in evaluating the adequacy of MRs. An image processing program that is used to
reconstruct a 3D biological cell is used to explain the author’s proposed theory. A case
study is performed using a complex Monte Carlo program to gauge the effectiveness of
this proposed framework. The results prove the utility of their proposed method for the
testing of other scientific software as well. Table 1shows the summary of related work.
J. Imaging 2024,10, 87 5 of 22
Table 1. Summary of related work.
Ref Papers SUT Image Generation
Method Testing Method Mutation Operators
Sim et al. [12]Sobel Edge Detection
Program
Randomly selected
from published image
libraries
Mutation Testing LOR, ROR
Jameel et al. [14]Dilation and Erosion
Programs Randomly Selected Mutation Testing ROR
Jiang et al. [19]Image Region Growth
program
Segmental symbolic
evaluation
method
Mutation Testing Milu operators
Jameel et al. [20] Dilation Program Ground truth images
are chosen randomly Mutation Testing ROR
Chan et al. [21]
Mesh Simplification
Program of Image
Rendering
Randomly Selected Mutation Testing MuJava operators
Ding et al. [17]
Discrete Dipole
Approximation
Program
Random Generation Structural Testing and
Mutation Testing ABS, ROR
Ding et al. [16]
Monte Carlo Program
and 3D Structure
Reconstruc-tion
Program
Random or Category
Based Selection
Structural Testing and
Mutation Testing
Modify coefficient,
add constant, AOR,
COR, CRP, SDL
After studying the literature, some of the research gaps are identified and are given below:
•In literature, test cases are selected and generated randomly. Random selection leads
to an unfair distribution of parametric values, which ultimately affects the testing
process.
•
In existing techniques, MR evaluation is conducted through mutation testing. This
evaluation is not comprehensive, as only a few mutation operators are used to check
the fault detection rate of MRs. The total number of mutants generated through these
mutation operators is quite low which makes the testing weak.
•
In existing literature, no work has been conducted to check the effectiveness of muta-
tion operators. It is not highlighted that which operator is more valuable to generate
and kill maximum number of mutants.
3. Metamorphic Relations
In MT, the central element is the set of MRs, which are the necessary properties of the
SUT or the algorithm [
22
]. MR plays a significant role in MT as it validates the relations
between the test outputs of a program having a test oracle problem. Generally, MR is the
property of a function (f) having inputs x
1
, x
2
, x
3
,
. . .
x
n
, where nis greater than 1. Their
corresponding outputs are f(x
1)
, f(x
2)
, f(x
3)
,
. . .
f(x
n
) [
23
]. The identification of MRs requires
expert knowledge in the field of Image Processing (IP) as well as guidance provided by the
experiences (Mayer et al. [13], Jameel et al. [14]).
In this paper, we have worked on the MRs of edge detection and two morphological
image operations, i.e., dilation and erosion.
3.1. MRs for Edge Detection
We have used the MRs of edge detection proposed by Sim et al. [
12
]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2shows the MRs for edge detection where E is the Sobel edge detection, and Im
is the input image.
J. Imaging 2024,10, 87 6 of 22
Table 2. MRs for edge detection.
MR Mathematical Property
MR1: Counter clock wise rotation at 90 degree C(E(Im)) = E(C(Im))
MR2: Transposition T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa My(E(Im)) = E(My(Im))
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation and
erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [
14
] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR Mathematical Property
R1: Reflection at the ordinate Reford(Output(I)) =Output(Reford(I))
R2: Reflection at abscissa Reford (Output(I)) =Output(Reford(I))
R3: Duality
δs(I)=
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(Ic)
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(I)=δs(Ic)
where c is the complement of an image I.
R4: Non-inverses δs(
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(I)) =I=
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(δs(I))
R5: Size of image object changes Sizeobj(δs(I)) ≥Sizeobj(I)and Pixlist I⊂Pixlistδs(I)
R6: No. of objects in image changes Numberobj(δs(I)) ≤Numberobj(I)
R7: Commutative δs(I)=I⊕S=S⊕I=δI(S)
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(I)=
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
I(S)
R8: Translation invariance δs+x(I)=δs(I)+x
Table 3shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specific MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these MRs
are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs Explanation
Counter clock wise rotation at 90 degree
MR1:C(δs(Im)) =δs(C(Im))
MR2:C(
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(Im)) =
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(C(Im))
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90 degree,
δs
is the dilation and
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s
is the erosion operation. The image output of counter-clock
wise rotation at 90 degree followed by morphological operations should be similar
to image output of morphological operations followed by counter-clock wise
rotation at 90 degree.
Transposition
MR3:T(δs(Im)) =δs(T(Im))
MR4:T(
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)
s sc)
where c is the complement of an image I.
R4: Non-inverses
ss ss
R5: Size of image object changes
s s
R6: No. of objects in image changes
s
R7: Commutative
s
s I
R8: Translation invariance
s+x s
Table 3 shows the MRs for dilation and erosion operations. The details of these MRs
are given in [14].
3.2.2. Proposed MRs for Dilation and Erosion
We have proposed six new MRs for dilation and erosion operations. Our proposal
consists of four general and two specic MRs of dilation and erosion. In Table 4, we have
discussed our proposed MRs with their mathematical properties. The details of these
MRs are given below:
Table 4. Proposed MRs for dilation and erosion.
Proposed MRs
Explanation
Counter clock wise rotation at 90 degree
MR1s s
MR2s s
Where, Im is the input Image, C(.) is the counter clockwise rotation at 90
degree, s is the dilation and s is the erosion operation. The image
output of counter-clock wise rotation at 90 degree followed by morpho-
logical operations should be similar to image output of morphological
operations followed by counter-clock wise rotation at 90 degree.
s(Im)) =
J. Imaging 2024, 10, x FOR PEER REVIEW 6 of 23
We have used the MRs of edge detection proposed by Sim et al. [12]. The complete
details of these MRs are given in [12,15]. The MRs are shown in Table 2.
Table 2. MRs for edge detection.
MR
Mathematical Property
MR1: Counter clock wise rotation at 90 degree
C(E(Im)) = E(C(Im))
MR2: Transposition
T(E(Im)) = E(T(Im))
MR3: Reflection at the ordinate
Mx(E(Im)) = E(Mx(Im))
MR4: Reflection at abscissa
My(E(Im)) = E(My(Im))
Table 2 shows the MRs for edge detection where E is the Sobel edge detection, and
Im is the input image.
3.2. MRs for Dilation and Erosion
In this section, we have described the existing and proposed MRs for the dilation
and erosion operations.
3.2.1. Existing MRs for Dilation and Erosion
The existing MRs proposed by Jameel et al. [14] for dilation and erosion operations
are given in Table 3.
Table 3. Existing MRs for dilation and erosion.
MR
Mathematical Property
R1: Reflection at the ordinate
R2: Reflection at abscissa
R3: Duality
s sc)