Commit 1bffd2cd authored by Ahmed's avatar Ahmed

update ci & add build.sh

parent 2c1f743c
Pipeline #270799 failed with stage
in 34 seconds
# (c) https://github.com/MontiCore/monticore
stages:
- windows
- linux
masterJobWindows:
stage: windows
TestJobLinux:
stage: linux
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/applications/gans/mnist-infogan/gans_mxnet:latest
script:
- java -jar embedded-montiarc-math-generator-0.1.15-SNAPSHOT-jar-with-dependencies.jar -m src/main/emam -r ba.BallTracking -o target
only:
- master
tags:
- Windows10
BranchJobWindows:
stage: windows
script:
- java -jar embedded-montiarc-math-generator-0.1.15-SNAPSHOT-jar-with-dependencies.jar -m src/main/emam -r ba.BallTracking -o target
- chmod +x build.sh
- ./build.sh
except:
- master
tags:
- Windows10
changes:
- README.md
- .gitignore
\ No newline at end of file
File added
rm -rf target
java -jar embedded-montiarc-math-generator-0.1.16-SNAPSHOT-jar-with-dependencies.jar -m src/main/emam/ -r ba.ballTracking -o target -flag-generate-cmake
rm -rf build
mkdir build && cd build
echo "Building BallTracking.."
cmake ..
make
#include "ba_ballTracking.h"
#include "ConvHelper.h"
#include <opencv2/highgui/highgui.hpp>
#include <armadillo>
using namespace arma;
using std::string;
int main(int argc, const char** argv) {
string filename = "BallTrack.mp4";
cv::VideoCapture capture(filename);
cv::Mat frame;
if (!capture.isOpened()) {
throw "Error when trying to read BallTrack.mp4";
}
ba_ballTracking ballT_Object;
ballT_Object.init();
//GaussianBlur
ballT_Object.sizeXIn = 11;
ballT_Object.sizeYIn = 11;
ballT_Object.sigmaXIn = 0;
ballT_Object.sigmaYIn = 0;
//CvtColor
ballT_Object.colorConversionIn = 40;
//InRange
ballT_Object.lowerBoundaryIn = { 20, 100, 100 };
ballT_Object.upperBoundaryIn = { 30, 255, 255 };
//Erode
ballT_Object.erosion_elemIn = 0;
ballT_Object.iterationsIn1 = 2;
//Dilate
ballT_Object.dilation_elemIn = 0;
ballT_Object.iterationsIn2 = 2;
//FindContours
ballT_Object.modeIn = 0;
ballT_Object.methodIn = 2;
//rectangle
ballT_Object.colorIn = { 0,0,0 };
ballT_Object.thicknessIn = 4;
ballT_Object.lineTypeIn = 4;
//cv::namedWindow("w", 1);
for ( ; ; ) {
capture >> frame;
if (frame.empty())
break;
ballT_Object.imageIn = to_armaCube<unsigned char, 3>(frame);
ballT_Object.execute();
cv::Mat output_frame = to_cvmat<unsigned char>(ballT_Object.modImageOut);
cv::flip(output_frame, output_frame, 0);
//video.write(output_frame);
cv::imshow("w", output_frame);
cv::waitKey(1);
}
cv::waitKey(0);
}
\ No newline at end of file
......@@ -3,7 +3,7 @@ package ba;
component BallTracking{
port
in Q^{3,1280,720} imageIn,
in Q^{960,720,3} imageIn,
//GaussianBlur ports
in Z sizeXIn,
in Z sizeYIn,
......@@ -28,17 +28,17 @@ component BallTracking{
in Z thicknessIn,
in Z lineTypeIn,
// i want to input the image again
out Q^{3,1280,720} modImageOut;
out Q^{960,720,3} modImageOut;
instance CVGaussianBlur<1280,720> gaussBlur;
instance CVCvtColor<1280,720> cvtColor;
instance CVInRange<1280,720> inRange;
instance CVErode<1280,720> erode;
instance CVDilate<1280,720> dilate;
instance CVFindContours<1280,720> findContours;
instance CVGaussianBlur<960,720> gaussBlur;
instance CVCvtColor<960,720> cvtColor;
instance CVInRange<960,720> inRange;
instance CVErode<960,720> erode;
instance CVDilate<960,720> dilate;
instance CVFindContours<960,720> findContours;
instance CVLargestContour largestContour;
instance CVBoundingRect boundingRect;
instance CVRectangle<1280,720> rectAngle;
instance CVRectangle<960,720> rectAngle;
//GaussianBlur
connect imageIn -> gaussBlur.src;
......
package ba;
component CVCvtColor<N n,N m> {
component CVCvtColor<N n =960,N m=720> {
port
in Q^{3,n,m} src,
in Q^{n,m,3} src,
in Z colorConversion,
out Q^{3,n,m} dst;
out Q^{n,m,3} dst;
implementation Math{
dst = cvtColor(src, colorConversion);
......
package ba;
component CVDilate<N n,N m> {
component CVDilate<N n=960,N m=720> {
port
in Q^{n,m} src,
in Z dilation_elem,
......
package ba;
component CVErode<N n,N m> {
component CVErode<N n=960,N m=720> {
port
in Q^{n,m} src,
in Z erosion_elem,
......
package ba;
component CVFindContours<N n,N m> {
component CVFindContours<N n=960,N m=720> {
port
in Q^{n,m} image,
in Z mode,
......
package ba;
component CVGaussianBlur<N n,N m> {
component CVGaussianBlur<N n=960,N m=720> {
port
in Q^{3,n,m} src,
in Q^{n,m,3} src,
in Z sizeX,
in Z sizeY,
in Q sigmaX,
in Q sigmaY,
out Q^{3,n,m} dst;
out Q^{n,m,3} dst;
implementation Math {
dst = gaussianBlur(src, sizeX, sizeY, sigmaX, sigmaY);
......
package ba;
component CVInRange<N n,N m> {
component CVInRange<N n=960,N m=720> {
port
in Q^{3,n,m} src,
in Q^{n,m,3} src,
in Q^{3} lowerBoundary,
in Q^{3} upperBoundary,
out Q^{n,m} dst;
......
package ba;
component CVRectangle<N n,N m> {
component CVRectangle<N n=960,N m=720>{
port
in Q^{3,n,m} src,
in Q^{n,m,3} src,
in Q rect,
in Q^{3} color,
in Z thickness,
in Z lineType,
out Q^{3,n,m} outputImg;
out Q^{n,m,3} outputImg;
implementation Math {
outputImg = rectangle(src, rect, color, thickness, lineType);
......
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