Aufgrund einer Wartung wird GitLab am 17.08. zwischen 8:30 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 17.08. between 8:30 and 9:00 am.

Commit 69591ad6 authored by Ahmed's avatar Ahmed

fix some bugs

parent c9ac468d
...@@ -131,7 +131,7 @@ public class RectangleCommand extends MathCommand{ ...@@ -131,7 +131,7 @@ public class RectangleCommand extends MathCommand{
} else if(properties.isPreCV()){ } else if(properties.isPreCV()){
finalInstruction = " cv::rectangle(src, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType);\n"; finalInstruction = " cv::rectangle(src, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType);\n";
if(typeNameOut == "Cube<unsigned char>"){ if(typeNameOut == "Cube<unsigned char>"){
finalInstruction += " arma::cube srcCube;\n" + finalInstruction += " arma::Cube<unsigned char> srcCube;\n" +
" srcCube = to_armaCube<unsigned char, 3>(src);\n" + " srcCube = to_armaCube<unsigned char, 3>(src);\n" +
" return srcCube;\n"; " return srcCube;\n";
} else { } else {
...@@ -149,7 +149,7 @@ public class RectangleCommand extends MathCommand{ ...@@ -149,7 +149,7 @@ public class RectangleCommand extends MathCommand{
" srcCV = to_cvmat<unsigned char>(src);\n" + " srcCV = to_cvmat<unsigned char>(src);\n" +
" cv::rectangle(srcCV, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType);\n"; " cv::rectangle(srcCV, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType);\n";
if(typeNameOut == "Cube<unsigned char>"){ if(typeNameOut == "Cube<unsigned char>"){
finalInstruction += " arma::cube srcCube;\n" + finalInstruction += " arma::Cube<unsigned char> srcCube;\n" +
" srcCube = to_armaCube<unsigned char, 3>(srcCV);\n" + " srcCube = to_armaCube<unsigned char, 3>(srcCV);\n" +
" return srcCube;\n"; " return srcCube;\n";
} else { } else {
......
...@@ -27,7 +27,7 @@ Cube<unsigned char> rectangleHelper(const Cube<unsigned char>& src, cv::Rect& re ...@@ -27,7 +27,7 @@ Cube<unsigned char> rectangleHelper(const Cube<unsigned char>& src, cv::Rect& re
cv::Mat srcCV; cv::Mat srcCV;
srcCV = to_cvmat<unsigned char>(src); srcCV = to_cvmat<unsigned char>(src);
cv::rectangle(srcCV, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType); cv::rectangle(srcCV, rect.tl(), rect.br(), cv::Scalar(color(0), color(1), color(2)), thickness, lineType);
arma::cube srcCube; arma::Cube<unsigned char> srcCube;
srcCube = to_armaCube<unsigned char, 3>(srcCV); srcCube = to_armaCube<unsigned char, 3>(srcCV);
return srcCube; return srcCube;
} }
......
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