Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMAM2Cpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMAM2Cpp
Commits
6a065901
Commit
6a065901
authored
Apr 07, 2020
by
Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some fixes
parent
8f53e604
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
16 deletions
+18
-16
src/main/java/de/monticore/lang/monticar/generator/MathCommand.java
...ava/de/monticore/lang/monticar/generator/MathCommand.java
+1
-1
src/main/java/de/monticore/lang/monticar/generator/cpp/commands/RectangleCommand.java
...ang/monticar/generator/cpp/commands/RectangleCommand.java
+1
-1
src/test/resources/results/armadillo/testMath/l0/test_math_erodeAndGaussianBlurCommandTest.h
...o/testMath/l0/test_math_erodeAndGaussianBlurCommandTest.h
+2
-3
src/test/resources/results/armadillo/testMath/l0/test_math_gaussianBlurCommandTest.h
...armadillo/testMath/l0/test_math_gaussianBlurCommandTest.h
+3
-3
src/test/resources/results/armadillo/testMath/l0/test_math_rectangleCommandTest.h
...ts/armadillo/testMath/l0/test_math_rectangleCommandTest.h
+3
-3
src/test/resources/test/math/ErodeAndGaussianBlurCommandTest.emam
.../resources/test/math/ErodeAndGaussianBlurCommandTest.emam
+8
-5
No files found.
src/main/java/de/monticore/lang/monticar/generator/MathCommand.java
View file @
6a065901
...
...
@@ -106,7 +106,7 @@ public abstract class MathCommand {
if
(
code
.
contains
(
"mat("
)){
code
=
code
.
replace
(
"mat("
,
"Mat<unsigned char>("
);
}
else
if
(
code
.
contains
(
"cube("
)){
code
=
code
.
replace
(
"
mat
("
,
"Cube<unsigned char>("
);
code
=
code
.
replace
(
"
cube
("
,
"Cube<unsigned char>("
);
}
((
TargetCodeInstruction
)
instruct
).
setInstruction
(
code
);
}
...
...
src/main/java/de/monticore/lang/monticar/generator/cpp/commands/RectangleCommand.java
View file @
6a065901
...
...
@@ -55,7 +55,7 @@ public class RectangleCommand extends MathCommand{
MathFunctionFixer
.
fixMathFunctions
(
accessSymbol
,
bluePrintCPP
);
String
nameOfSecondParameter
=
mathMatrixNameExpressionSymbol
.
getMathMatrixAccessOperatorSymbol
().
getMathMatrixAccessSymbols
().
get
(
1
).
getTextualRepresentation
();
ComponentConverter
.
fixVariableType
(
nameOfSecondParameter
,
bluePrintCPP
,
"Q"
,
"Rect"
,
""
);
ComponentConverter
.
fixVariableType
(
nameOfSecondParameter
,
bluePrintCPP
,
"Q"
,
"
cv::
Rect"
,
""
);
Method
rectangleHelperMethod
=
getRectangleHelperMethod
(
mathMatrixNameExpressionSymbol
,
bluePrintCPP
,
properties
);
valueListString
+=
ExecuteMethodGenerator
.
generateExecuteCode
(
mathExpressionSymbol
,
new
ArrayList
<
String
>());
...
...
src/test/resources/results/armadillo/testMath/l0/test_math_erodeAndGaussianBlurCommandTest.h
View file @
6a065901
...
...
@@ -21,10 +21,10 @@ Cube<unsigned char> outMatrix;
arma
::
Mat
<
unsigned
char
>
out2Matrix
;
void
init
()
{
src
=
cube
(
n
,
m
,
3
);
src
=
Cube
<
unsigned
char
>
(
n
,
m
,
3
);
sizeY
=
colvec
(
3
);
two
=
colvec
(
2
);
outMatrix
=
cube
(
3
,
n
,
m
);
outMatrix
=
Cube
<
unsigned
char
>
(
3
,
n
,
m
);
out2Matrix
=
Mat
<
unsigned
char
>
(
2
,
m
);
}
void
erodeHelper
(
const
Cube
<
unsigned
char
>&
src
,
cv
::
Mat
&
dst
,
int
erosion_elem
,
int
iterations
)
...
...
@@ -66,4 +66,3 @@ findContoursHelper(dst3, contours);
};
#endif
src/test/resources/results/armadillo/testMath/l0/test_math_gaussianBlurCommandTest.h
View file @
6a065901
...
...
@@ -18,8 +18,8 @@ double sigmaY;
Cube
<
unsigned
char
>
dst
;
void
init
()
{
src
=
cube
(
n
,
m
,
3
);
dst
=
cube
(
n
,
m
,
3
);
src
=
Cube
<
unsigned
char
>
(
n
,
m
,
3
);
dst
=
Cube
<
unsigned
char
>
(
n
,
m
,
3
);
}
void
gaussianBlurHelper
(
const
Cube
<
unsigned
char
>&
src
,
Cube
<
unsigned
char
>&
dst
,
int
sizeX
,
int
sizeY
,
double
sigmaX
,
double
sigmaY
)
{
...
...
@@ -36,4 +36,4 @@ gaussianBlurHelper(src, dst, sizeX, sizeY, sigmaX, sigmaY);
}
};
#endif
#endif
\ No newline at end of file
src/test/resources/results/armadillo/testMath/l0/test_math_rectangleCommandTest.h
View file @
6a065901
...
...
@@ -11,16 +11,16 @@ using namespace std;
class
test_math_rectangleCommandTest
{
public:
Cube
<
unsigned
char
>
src
;
Rect
rect
;
cv
::
Rect
rect
;
colvec
color
;
int
thickness
;
int
lineType
;
Cube
<
unsigned
char
>
outputImg
;
void
init
()
{
src
=
cube
(
3
,
n
,
m
);
src
=
Cube
<
unsigned
char
>
(
3
,
n
,
m
);
color
=
colvec
(
3
);
outputImg
=
cube
(
3
,
n
,
m
);
outputImg
=
Cube
<
unsigned
char
>
(
3
,
n
,
m
);
}
Cube
<
unsigned
char
>
rectangleHelper
(
const
Cube
<
unsigned
char
>&
src
,
cv
::
Rect
&
rect
,
colvec
color
,
int
thickness
,
int
lineType
)
{
...
...
src/test/resources/test/math/ErodeAndGaussianBlurCommandTest.emam
View file @
6a065901
...
...
@@ -12,11 +12,14 @@ component ErodeAndGaussianBlurCommandTest{
out
Q
^{
3
,
n
,
m
}
outMatrix
,
out
Q
^{
2
,
m
}
out2Matrix
;
implementation
Math
{
instance
GaussianBlurCommandTest
gaussBlur
;
instance
CvtColorCommandTest
cvtColor
;
dst
=
erode
(
src
,
erosion_elem
,
iterations
);
dst3
=
dilate
(
dst
,
dilation_elem
,
iterations
);
contours
=
findContours
(
dst3
);
//
implementation
Math
{
}
//
dst
=
erode
(
src
,
erosion_elem
,
iterations
);
//
dst3
=
dilate
(
dst
,
dilation_elem
,
iterations
);
//
contours
=
findContours
(
dst3
);
//}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment