Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ped-dyn-emp/petrack
1 result
Show changes
Commits on Source (2)
Showing
with 210 additions and 84 deletions
......@@ -6,7 +6,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y software-properties-common wget
# Install the needed tools
RUN echo "deb [trusted=yes] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-13 main" | tee /etc/apt/sources.list.d/clang.list
RUN echo "deb [trusted=yes] http://apt.llvm.org/jammy/ llvm-toolchain-jammy-14 main" | tee /etc/apt/sources.list.d/clang.list
RUN apt-get update && \
apt-get install -y \
......@@ -18,12 +18,12 @@ RUN apt-get update && \
parallel \
mesa-common-dev \
libglu1-mesa-dev \
clang-13 \
clang-format-13
clang-14 \
clang-format-14
# Set clang-13 as default compiler
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-13 100 &&\
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-13 100
# Set clang-14 as default compiler
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-14 100 &&\
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 100
# Install python
RUN apt-get update && apt-get install -y \
......
......@@ -43,9 +43,9 @@ public:
const QString &compileDate,
const std::vector<std::string> &authors);
AboutDialog(const AboutDialog &) = delete;
AboutDialog &operator=(AboutDialog) = delete;
AboutDialog(const AboutDialog &&) = delete;
AboutDialog(const AboutDialog &) = delete;
AboutDialog &operator=(AboutDialog) = delete;
AboutDialog(const AboutDialog &&) = delete;
AboutDialog &operator=(AboutDialog &&) = delete;
~AboutDialog() override;
......
......@@ -40,12 +40,12 @@ class Autosave : public QObject
Q_OBJECT
public:
explicit Autosave(Petrack &petrack);
Autosave() = delete;
Autosave(const Autosave &other) = delete;
Autosave(const Autosave &&other) = delete;
Autosave() = delete;
Autosave(const Autosave &other) = delete;
Autosave(const Autosave &&other) = delete;
Autosave &operator=(const Autosave &other) = delete;
Autosave &operator=(Autosave &&other) = delete;
~Autosave() override = default;
Autosave &operator=(Autosave &&other) = delete;
~Autosave() override = default;
void trackPersonModified();
void resetTrackPersonCounter();
......
......@@ -236,10 +236,16 @@ public:
inline ColorPlot *getColorPlot() const { return colorPlot; }
#ifdef QWT
inline AnalysePlot *getAnalysePlot() const { return analysePlot; }
inline AnalysePlot *getAnalysePlot() const
{
return analysePlot;
}
#endif
inline Petrack *getMainWindow() const { return mMainWindow; }
inline Petrack *getMainWindow() const
{
return mMainWindow;
}
private:
reco::RecognitionMethod getRecoMethod() const;
......@@ -419,7 +425,10 @@ private slots:
mScene->update();
}
}
void on_trackColorMarkerSize_valueChanged(int /*i*/) { mScene->update(); }
void on_trackColorMarkerSize_valueChanged(int /*i*/)
{
mScene->update();
}
void on_trackNumberSize_valueChanged(int /*i*/)
{
if(!isLoading())
......
......@@ -42,11 +42,11 @@ public:
MyEllipse();
MyEllipse(double x, double y, double r1, double r2, double angle);
MyEllipse(QPointF center, QSizeF size, double angle);
MyEllipse(const MyEllipse &c) = default;
MyEllipse(MyEllipse &&c) = default;
MyEllipse(const MyEllipse &c) = default;
MyEllipse(MyEllipse &&c) = default;
MyEllipse &operator=(const MyEllipse &c) = default;
MyEllipse &operator=(MyEllipse &&c) = default;
~MyEllipse() = default;
MyEllipse &operator=(MyEllipse &&c) = default;
~MyEllipse() = default;
Vec2F center() const;
QSizeF size() const;
......
......@@ -43,12 +43,12 @@ const std::map<MoCapSystem, std::string> moCapFileExtensions = {{MoCapSystem::XS
class MoCapPersonMetadata
{
public:
MoCapPersonMetadata() = default;
MoCapPersonMetadata(const MoCapPersonMetadata &) = default;
MoCapPersonMetadata(MoCapPersonMetadata &&) = default;
MoCapPersonMetadata() = default;
MoCapPersonMetadata(const MoCapPersonMetadata &) = default;
MoCapPersonMetadata(MoCapPersonMetadata &&) = default;
MoCapPersonMetadata &operator=(const MoCapPersonMetadata &) = default;
MoCapPersonMetadata &operator=(MoCapPersonMetadata &&) = default;
~MoCapPersonMetadata() = default;
MoCapPersonMetadata &operator=(MoCapPersonMetadata &&) = default;
~MoCapPersonMetadata() = default;
MoCapPersonMetadata(
std::string filepath,
MoCapSystem system,
......
......@@ -42,10 +42,10 @@ public:
QWidget *parent,
const QMap<QString, MoCapSystem> &moCapSystems,
const MoCapPersonMetadata &metadata);
MoCapSelectionWidget(const MoCapSelectionWidget &) = delete;
MoCapSelectionWidget(MoCapSelectionWidget &&) = delete;
MoCapSelectionWidget(const MoCapSelectionWidget &) = delete;
MoCapSelectionWidget(MoCapSelectionWidget &&) = delete;
MoCapSelectionWidget &operator=(const MoCapSelectionWidget &) = delete;
MoCapSelectionWidget &operator=(MoCapSelectionWidget &&) = delete;
MoCapSelectionWidget &operator=(MoCapSelectionWidget &&) = delete;
~MoCapSelectionWidget() override;
void setFileName();
......
......@@ -46,11 +46,11 @@ class OpenMoCapDialog : public QDialog
public:
explicit OpenMoCapDialog(QWidget *parent, MoCapController &controller);
OpenMoCapDialog() = delete;
OpenMoCapDialog(const OpenMoCapDialog &) = delete;
OpenMoCapDialog(OpenMoCapDialog &&) = delete;
OpenMoCapDialog() = delete;
OpenMoCapDialog(const OpenMoCapDialog &) = delete;
OpenMoCapDialog(OpenMoCapDialog &&) = delete;
OpenMoCapDialog &operator=(const OpenMoCapDialog &) = delete;
OpenMoCapDialog &operator=(OpenMoCapDialog &&) = delete;
OpenMoCapDialog &operator=(OpenMoCapDialog &&) = delete;
~OpenMoCapDialog() override;
void clickedOk();
......
......@@ -263,12 +263,27 @@ public:
inline CalibFilter *getCalibFilter() { return (CalibFilter *) mCalibFilter; }
#ifdef STEREO
// Attention: not type save, be care that animation is stereo
inline CalibStereoFilter *getCalibStereoFilter() { return (CalibStereoFilter *) mCalibFilter; }
inline CalibStereoFilter *getCalibStereoFilter()
{
return (CalibStereoFilter *) mCalibFilter;
}
#endif
inline BrightContrastFilter *getBrightContrastFilter() { return &mBrightContrastFilter; }
inline BorderFilter *getBorderFilter() { return &mBorderFilter; }
inline SwapFilter *getSwapFilter() { return &mSwapFilter; }
inline BackgroundFilter *getBackgroundFilter() { return &mBackgroundFilter; }
inline BrightContrastFilter *getBrightContrastFilter()
{
return &mBrightContrastFilter;
}
inline BorderFilter *getBorderFilter()
{
return &mBorderFilter;
}
inline SwapFilter *getSwapFilter()
{
return &mSwapFilter;
}
inline BackgroundFilter *getBackgroundFilter()
{
return &mBackgroundFilter;
}
inline int getImageBorderSize()
{
......@@ -281,12 +296,27 @@ public:
return 0;
}
}
inline void setImageBorderSize(int sz) { getBorderFilter()->getBorderSize()->setValue(sz); }
inline void setImageBorderSize(int sz)
{
getBorderFilter()->getBorderSize()->setValue(sz);
}
inline AutoCalib *getAutoCalib() { return &mAutoCalib; }
inline ExtrCalibration *getExtrCalibration() { return &mExtrCalibration; }
inline double getStatusFPS() const { return mShowFPS; }
inline MoCapController &getMoCapController() { return mMoCapController; }
inline AutoCalib *getAutoCalib()
{
return &mAutoCalib;
}
inline ExtrCalibration *getExtrCalibration()
{
return &mExtrCalibration;
}
inline double getStatusFPS() const
{
return mShowFPS;
}
inline MoCapController &getMoCapController()
{
return mMoCapController;
}
void updateWindowTitle();
......
......@@ -51,7 +51,7 @@ public:
~SkeletonNode() = default;
SkeletonNode &operator=(const SkeletonNode &rhs) = default;
SkeletonNode &operator=(SkeletonNode &&rhs) = default;
SkeletonNode &operator=(SkeletonNode &&rhs) = default;
/**
* @brief Gets the children as a vector.
......
......@@ -73,7 +73,10 @@ public:
#endif
// von person.cpp benoetigt, um frame nummer zu erhalten
inline Animation *getAnimation() { return mAnimation; }
inline Animation *getAnimation()
{
return mAnimation;
}
// ---------------------------------------------------
......@@ -94,20 +97,41 @@ public:
// ---------------------------------------------------
#ifdef STEREO
inline TriclopsContext getContext() { return mTriclopsContext; }
inline TriclopsContext getContext()
{
return mTriclopsContext;
}
#endif
inline unsigned char getSurfaceValue() const { return mSurfaceValue; }
inline unsigned char getBackForthValue() const { return mBackForthValue; }
inline unsigned char getSurfaceValue() const
{
return mSurfaceValue;
}
inline unsigned char getBackForthValue() const
{
return mBackForthValue;
}
inline unsigned short int getMin() const { return mMin; }
inline unsigned short int getMax() const { return mMax; }
inline unsigned short int getMin() const
{
return mMin;
}
inline unsigned short int getMax() const
{
return mMax;
}
inline void addStatus(enum stereoStatus s) { mStatus |= s; }
inline void addStatus(enum stereoStatus s)
{
mStatus |= s;
}
inline void setStatus(enum stereoStatus s) // set status up to this level
{
mStatus = s * 2 - 1;
}
inline void resetStatus() { mStatus = clean; }
inline void resetStatus()
{
mStatus = clean;
}
CvMat *getPointCloud();
......
......@@ -93,7 +93,10 @@ private slots:
mMainWindow->getScene()->update();
}
}
void on_opacity_valueChanged(int i) { mMainWindow->getScene()->update(); }
void on_opacity_valueChanged(int i)
{
mMainWindow->getScene()->update();
}
void on_edgeMaskSize_valueChanged(int i)
{
if(i % 2 == 0)
......@@ -136,7 +139,10 @@ private slots:
}
}
void on_stereoExport_clicked() { mMainWindow->getStereoContext()->exportPointCloud(); }
void on_stereoExport_clicked()
{
mMainWindow->getStereoContext()->exportPointCloud();
}
#endif
private:
......
......@@ -73,7 +73,7 @@ public:
void set(double x, double y, double z);
Vec3F &operator=(const Vec3F &v) = default;
Vec3F &operator=(Vec3F &&v) = default;
Vec3F &operator=(Vec3F &&v) = default;
Vec3F &operator=(const cv::Point3f &v);
......@@ -126,11 +126,11 @@ public:
Vec2F(const cv::Point2f &p);
Vec2F(const CvPoint *v);
Vec2F(const CvPoint2D32f *v);
Vec2F(const Vec2F &c) = default;
Vec2F(Vec2F &&c) = default;
Vec2F(const Vec2F &c) = default;
Vec2F(Vec2F &&c) = default;
Vec2F &operator=(const Vec2F &c) = default;
Vec2F &operator=(Vec2F &&c) = default;
~Vec2F() = default;
Vec2F &operator=(Vec2F &&c) = default;
~Vec2F() = default;
cv::Point toCvPoint() const;
CvPoint2D32f toCvPoint2D32f() const;
......
......@@ -7,4 +7,4 @@ files=$(find "$(readlink -f "${origin}"/../src)" -type f -regex "^.*\.\(hpp\|cpp
files+=$'\n'$(find "$(readlink -f "${origin}"/../include)" -type f -regex "^.*\.\(hpp\|cpp\|h\|c\)$")
files+=$'\n'$(find "$(readlink -f "${origin}"/../tests)" -type f -regex "^.*\.\(hpp\|cpp\|h\|c\)$")
echo "${files}" | parallel clang-format-13 --dry-run -Werror
echo "${files}" | parallel clang-format-14 --dry-run -Werror
......@@ -7,4 +7,4 @@ files=$(find "$(readlink -f ${origin}/../src)" -type f -regex "^.*\.\(hpp\|cpp\|
files+=$'\n'$(find "$(readlink -f ${origin}/../include)" -type f -regex "^.*\.\(hpp\|cpp\|h\|c\)$")
files+=$'\n'$(find "$(readlink -f ${origin}/../tests)" -type f -regex "^.*\.\(hpp\|cpp\|h\|c\)$")
echo "${files}" | parallel clang-format-13 -i
echo "${files}" | parallel clang-format-14 -i
......@@ -103,11 +103,11 @@ struct DoubleColor
DoubleColor() : r(0.0), g(0.0), b(0.0) {}
DoubleColor(double red, double green, double blue) : r(red), g(green), b(blue) {}
DoubleColor(const DoubleColor &c) = default;
DoubleColor(DoubleColor &&c) = default;
DoubleColor(const DoubleColor &c) = default;
DoubleColor(DoubleColor &&c) = default;
DoubleColor &operator=(const DoubleColor &c) = default;
DoubleColor &operator=(DoubleColor &&c) = default;
~DoubleColor() = default;
DoubleColor &operator=(DoubleColor &&c) = default;
~DoubleColor() = default;
};
/*
......
......@@ -25,5 +25,8 @@
SCENARIO("Application Tests", "[app]")
{
GIVEN("Hello World") { REQUIRE(true); }
GIVEN("Hello World")
{
REQUIRE(true);
}
}
......@@ -101,55 +101,82 @@ SCENARIO("The user opens the CodeMarkerWidget", "[ui]")
GIVEN("A cornerRefinementWinSize less than 1")
{
view->cornerRefinementWinSize->setValue(-2);
THEN("The value gets set to 1") { REQUIRE(view->cornerRefinementWinSize->value() == 1); }
THEN("The value gets set to 1")
{
REQUIRE(view->cornerRefinementWinSize->value() == 1);
}
}
GIVEN("A cornerRefinementMaxIterations less than 1")
{
view->cornerRefinementMaxIterations->setValue(0);
THEN("The value gets set to 1") { REQUIRE(view->cornerRefinementMaxIterations->value() == 1); }
THEN("The value gets set to 1")
{
REQUIRE(view->cornerRefinementMaxIterations->value() == 1);
}
}
GIVEN("A cornerRefinementMinAccuracy less than or equal to 0")
{
view->cornerRefinementMinAccuracy->setValue(-3);
THEN("It is set to 0.01") { REQUIRE(view->cornerRefinementMinAccuracy->value() == Approx(0.01)); }
THEN("It is set to 0.01")
{
REQUIRE(view->cornerRefinementMinAccuracy->value() == Approx(0.01));
}
}
GIVEN("markerBorderBits less than 1")
{
view->markerBorderBits->setValue(0);
THEN("The value is set to 1") { REQUIRE(view->markerBorderBits->value() == 1); }
THEN("The value is set to 1")
{
REQUIRE(view->markerBorderBits->value() == 1);
}
}
GIVEN("minStdDevOtsu less than or equal to 0")
{
view->minOtsuStdDev->setValue(-2);
THEN("The value is set to 0.01") { REQUIRE(view->minOtsuStdDev->value() == Approx(0.01)); }
THEN("The value is set to 0.01")
{
REQUIRE(view->minOtsuStdDev->value() == Approx(0.01));
}
}
GIVEN("adaptiveThreshSizeMin less than 3")
{
view->adaptiveThreshWinSizeMin->setValue(1);
THEN("The value is set to 3") { REQUIRE(view->adaptiveThreshWinSizeMin->value() == 3); }
THEN("The value is set to 3")
{
REQUIRE(view->adaptiveThreshWinSizeMin->value() == 3);
}
}
GIVEN("adaptiveThreshSizeMax less than 3")
{
view->adaptiveThreshWinSizeMax->setValue(1);
THEN("The value is set to 3") { REQUIRE(view->adaptiveThreshWinSizeMax->value() == 3); }
THEN("The value is set to 3")
{
REQUIRE(view->adaptiveThreshWinSizeMax->value() == 3);
}
}
GIVEN("adaptiveThreshWinSizeStep less than or equal to 0")
{
view->adaptiveThreshWinSizeStep->setValue(0);
THEN("The value is set to 1") { REQUIRE(view->adaptiveThreshWinSizeStep->value() == 1); }
THEN("The value is set to 1")
{
REQUIRE(view->adaptiveThreshWinSizeStep->value() == 1);
}
}
GIVEN("minMarkerPerimeter less than or equal to 0")
{
view->minMarkerPerimeter->setValue(0);
THEN("The value is set to 0.1") { REQUIRE(view->minMarkerPerimeter->value() == Approx(0.1)); }
THEN("The value is set to 0.1")
{
REQUIRE(view->minMarkerPerimeter->value() == Approx(0.1));
}
}
GIVEN("maxMarkerPerimeter less than or equal to 0")
......@@ -157,24 +184,36 @@ SCENARIO("The user opens the CodeMarkerWidget", "[ui]")
auto oldVal = view->maxMarkerPerimeter->value();
view->minMarkerPerimeter->setValue(0); // since max cannot be lower than min
view->maxMarkerPerimeter->setValue(0);
THEN("The value is not changed") { REQUIRE(view->maxMarkerPerimeter->value() == Approx(oldVal)); }
THEN("The value is not changed")
{
REQUIRE(view->maxMarkerPerimeter->value() == Approx(oldVal));
}
}
GIVEN("cornerRefinementMinAccuracy less than or equal to 0")
{
view->cornerRefinementMinAccuracy->setValue(0);
THEN("The value is set to 0.01") { REQUIRE(view->cornerRefinementMinAccuracy->value() == Approx(0.01)); }
THEN("The value is set to 0.01")
{
REQUIRE(view->cornerRefinementMinAccuracy->value() == Approx(0.01));
}
}
GIVEN("minCornerDistance less than 0")
{
view->minCornerDistance->setValue(-1);
THEN("The value is set to 1") { REQUIRE(view->minCornerDistance->value() == Approx(0)); }
THEN("The value is set to 1")
{
REQUIRE(view->minCornerDistance->value() == Approx(0));
}
}
GIVEN("minDistanceToBorder less than 0")
{
view->minDistanceToBorder->setValue(-2);
THEN("The value is set to 0") { REQUIRE(view->minDistanceToBorder->value() == 0); }
THEN("The value is set to 0")
{
REQUIRE(view->minDistanceToBorder->value() == 0);
}
}
}
......@@ -90,7 +90,10 @@ SCENARIO("I open PeTrack with a red image", "[ui][config]")
eventList.addMouseClick(Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier);
eventList.simulate(colorPickerButton);
THEN("The Button is checked") { REQUIRE(colorPickerButton->isChecked()); }
THEN("The Button is checked")
{
REQUIRE(colorPickerButton->isChecked());
}
AND_GIVEN("I shift+click on one point of the (red) image")
{
......
......@@ -135,28 +135,40 @@ SCENARIO("Getting the IDs of the pedestrian from user input", "[petrack][util]")
QString input("-1");
auto receivedIDs = util::splitStringToInt(input);
THEN("std::nullopt should be returned") { REQUIRE_FALSE(receivedIDs.has_value()); }
THEN("std::nullopt should be returned")
{
REQUIRE_FALSE(receivedIDs.has_value());
}
}
AND_WHEN("invalid range")
{
QString input("1-");
auto receivedIDs = util::splitStringToInt(input);
THEN("std::nullopt should be returned") { REQUIRE_FALSE(receivedIDs.has_value()); }
THEN("std::nullopt should be returned")
{
REQUIRE_FALSE(receivedIDs.has_value());
}
}
AND_WHEN("too many -'s")
{
QString input("1-2-");
auto receivedIDs = util::splitStringToInt(input);
THEN("std::nullopt should be returned") { REQUIRE_FALSE(receivedIDs.has_value()); }
THEN("std::nullopt should be returned")
{
REQUIRE_FALSE(receivedIDs.has_value());
}
}
AND_WHEN("not int values (single values)")
{
QString input("1, 5, a, b, 6");
auto receivedIDs = util::splitStringToInt(input);
THEN("std::nullopt should be returned") { REQUIRE_FALSE(receivedIDs.has_value()); }
THEN("std::nullopt should be returned")
{
REQUIRE_FALSE(receivedIDs.has_value());
}
}
}
}
\ No newline at end of file