Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

reformat partial coding style #108

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion object_analytics_node/src/util/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace diag
{
/*static members*/
std::unordered_map<std::string, std::shared_ptr<loggerBase>>
loggerFarm::loggerBaseList_{{"",nullptr}};
loggerFarm::loggerBaseList_{{"", nullptr}};

REGISTER_LOGGER(consoleLogger);

Expand Down
6 changes: 3 additions & 3 deletions object_analytics_node/src/visualizer/control/control.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

#include <stdio.h>
#include <unistd.h>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>

#include <cstring>
#include <memory>
#include <string>

#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>

#include "math_sample.hpp"
#include "view.hpp"
#include "stream_device.hpp"
Expand Down
3 changes: 3 additions & 0 deletions object_analytics_node/src/visualizer/control/control_ds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <string>
#include <memory>

#include "control_ds.hpp"
#include "render_ellipse.hpp"
#include "render_image.hpp"
Expand Down
7 changes: 3 additions & 4 deletions object_analytics_node/src/visualizer/control/control_ds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

#include <stdio.h>
#include <unistd.h>
#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>

#include <cstring>
#include <memory>
#include <string>

#include <opencv2/core/core.hpp>
#include <opencv2/opencv.hpp>

#include "math_sample.hpp"

#include "utility.hpp"
Expand Down Expand Up @@ -70,5 +70,4 @@ class ControlDS : public Control
bool StepMode_ = false;
bool PauseMode_ = true;
bool InitialScreen_ = true;

};
12 changes: 5 additions & 7 deletions object_analytics_node/src/visualizer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <stdio.h>
#include <unistd.h>

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
Expand All @@ -28,15 +31,10 @@
#include <string>
#include <memory>

#include <stdio.h>
#include <unistd.h>

#include "control_ds.hpp"
#include "stream_device.hpp"
#include "view.hpp"

using namespace std;

static const char * keys = {
"{@device_type | | camera or image files}"
"{@device_path | | camera index or image path}"};
Expand All @@ -55,8 +53,8 @@ int main(int argc, char ** argv)
*/

cv::CommandLineParser parser(argc, argv, keys);
string SrcType = parser.get<string>(0);
string FilePath = parser.get<string>(1);
std::string SrcType = parser.get<std::string>(0);
std::string FilePath = parser.get<std::string>(1);

/*Just hack for convinience*/
std::string ds_file =
Expand Down
5 changes: 3 additions & 2 deletions object_analytics_node/tests/unittest_tracking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <gtest/gtest.h>
#include <cassert>
#include <string>
#include <memory>
#include "tracker/tracking.hpp"

TEST(UnitTestTracking, TrackingNomal) {
Expand All @@ -25,7 +26,7 @@ TEST(UnitTestTracking, TrackingNomal) {
stamp.tv_nsec = 1;
std::shared_ptr<sFrame> frame = std::make_shared<sFrame>(image, stamp);
tracker::Tracking t(2, "cat");
t.rectifyTracker(frame, cv::Rect2d(100,100,200,300));
t.rectifyTracker(frame, cv::Rect2d(100, 100, 200, 300));

EXPECT_EQ(t.getObjName(), std::string("cat"));
EXPECT_EQ(t.getTrackingId(), int32_t(2));
Expand All @@ -41,7 +42,7 @@ TEST(UnitTestTracking, TrackingNullName) {
stamp.tv_nsec = 1;
std::shared_ptr<sFrame> frame = std::make_shared<sFrame>(image, stamp);
tracker::Tracking t(2, "");
t.rectifyTracker(frame, cv::Rect2d(100,100,200,300));
t.rectifyTracker(frame, cv::Rect2d(100, 100, 200, 300));

EXPECT_EQ(t.getObjName(), std::string(""));
EXPECT_EQ(t.getTrackingId(), int32_t(2));
Expand Down