Commit 90aece38 authored by Ahmed's avatar Ahmed
Browse files

Auto stash before rebase of "adi-dev"

parent b30c09e9
......@@ -281,7 +281,12 @@ public class ArmadilloFunctionTest extends AbstractSymtabTest {
public void testRectangleCommand() throws IOException{
public void testRectangleCommand() throws IOException {
public void testErodeAndGaussianBlur() throws IOException{
#ifndef M_PI
#define M_PI 3.14159265358979323846
#include "armadillo"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc.hpp"
using namespace arma;
using namespace cv;
class test_math_erodeAndGaussianBlurCommandTest{
mat src;
int erosion_elem;
int iterations;
int sizeX;
int sizeY;
double sigmaX;
double sigmaY;
mat dstB;
void init()
void erodeHelper(mat src, mat dst, int erosion_elem, int iterations)
int erosion_type = 0;
if( erosion_elem == 0 ){ erosion_type = MORPH_RECT; }
else if( erosion_elem == 1 ){ erosion_type = MORPH_CROSS; }
else if( erosion_elem == 2) { erosion_type = MORPH_ELLIPSE; }
erosion_size = erosion_elem;
mat element = getStructuringElement( erosion_type,
Size( 2*erosion_size + 1, 2*erosion_size+1 ),
Point( -1, -1 ) );
erode( src, dst, element, Point(-1,-1), iterations );
void gaussianBlurHelper(mat src, mat dst, int sizeX, int sizeY, double sigmaX, double sigmaY)
gaussianBlur(src, dst, Size(sizeX, sizeY), sigmaX, sigmaY);
void execute()
mat dst=mat(n,m);
erodeHelper(src, dst, erosion_elem, iterations);
mat deterMat = (det(dst));
mat dstB;
gaussianBlurHelper(dst, dstB, sizeX, sizeY, sigmaX, sigmaY);
/* (c) */
package test.math;
component ErodeAndGaussianBlurCommandTest{
in Q^{n,m} src,
in Z erosion_elemIn,
in Z iterationsIn1,
in Z sizeX,
in Z sizeY,
in Q sigmaX,
in Q sigmaY,
out Q^{n,m} dstB;
instance ErodeCommandTest erode;
connect erosion_elemIn -> erode.erosion_elem;
connect iterationsIn1 -> erode.iterations;
//connect erode.dst -> dilate.dst;
//implementation Math{
//Q^{n,m} dst;
//dst = erode(src, erosion_elem, iterations);
//Q^{2,3} deterMat = det(dst);
//Q^{n,m} dstB = gaussianBlur(dst, sizeX, sizeY, sigmaX, sigmaY);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment