Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.
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
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class TrackerKCFImpl
cv::Mat hann;
// 10 dimensional hann-window filter for CN features
cv::Mat hann_cn;

// training response and its FFT
cv::Mat y, yf;
// observation and its FFT
Expand Down
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/control/control.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__CONTROL__CONTROL_HPP_
#define VISUALIZER__CONTROL__CONTROL_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -66,3 +67,4 @@ class Control
View::Ptr DataView_ = nullptr;
stream_device::Ptr StreamDev_ = nullptr;
};
#endif // VISUALIZER__CONTROL__CONTROL_HPP_
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/control/control_ds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__CONTROL__CONTROL_DS_HPP_
#define VISUALIZER__CONTROL__CONTROL_DS_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -71,3 +72,4 @@ class ControlDS : public Control
bool PauseMode_ = true;
bool InitialScreen_ = true;
};
#endif // VISUALIZER__CONTROL__CONTROL_DS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef OBJECT_ANALYTICS_NODE__DATASET__TRACK_DATASET_HPP_
#define OBJECT_ANALYTICS_NODE__DATASET__TRACK_DATASET_HPP_
#ifndef VISUALIZER__DATA__DATASET__TRACK_DATASET_HPP_
#define VISUALIZER__DATA__DATASET__TRACK_DATASET_HPP_

#include <omp.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -205,5 +205,4 @@ class imgMTDataset : public trDataset
};

} // namespace datasets

#endif // OBJECT_ANALYTICS_NODE__DATASET__TRACK_DATASET_HPP_ _
#endif // VISUALIZER__DATA__DATASET__TRACK_DATASET_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "track_dataset.hpp"

#include <omp.h>
#include <opencv2/highgui.hpp>

#include <string>
#include <vector>
#include <fstream>

#include "track_dataset.hpp"

namespace datasets
{
void imgDataset::load(const std::string & rootPath)
Expand Down
10 changes: 6 additions & 4 deletions object_analytics_node/src/visualizer/data/frame.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DATA__FRAME_HPP_
#define VISUALIZER__DATA__FRAME_HPP_

#include <opencv2/opencv.hpp>

#include <atomic>
#include <chrono>
Expand All @@ -28,16 +31,14 @@
#include <thread>
#include <vector>

#include <opencv2/opencv.hpp>

#include "utility.hpp"
#include "object.hpp"

class sFrame
{
public:
sFrame() {}
sFrame(cv::Mat & cv_frame);
explicit sFrame(cv::Mat & cv_frame);
sFrame(cv::Mat & cv_frame, struct timespec st);

virtual ~sFrame() = default;
Expand Down Expand Up @@ -66,3 +67,4 @@ class sFrame
cv::Mat frame;
struct timespec stamp;
};
#endif // VISUALIZER__DATA__FRAME_HPP_
8 changes: 5 additions & 3 deletions object_analytics_node/src/visualizer/data/frame_obj.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DATA__FRAME_OBJ_HPP_
#define VISUALIZER__DATA__FRAME_OBJ_HPP_

#include <opencv2/opencv.hpp>

#include <atomic>
#include <chrono>
Expand All @@ -28,8 +31,6 @@
#include <thread>
#include <vector>

#include <opencv2/opencv.hpp>

#include "utility.hpp"
#include "frame.hpp"

Expand Down Expand Up @@ -61,3 +62,4 @@ class FrameObjs : public sFrame
std::vector<Object> dets;
std::vector<Object> tracks;
};
#endif // VISUALIZER__DATA__FRAME_OBJ_HPP_
8 changes: 5 additions & 3 deletions object_analytics_node/src/visualizer/data/object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DATA__OBJECT_HPP_
#define VISUALIZER__DATA__OBJECT_HPP_

#include <opencv2/opencv.hpp>

#include <atomic>
#include <chrono>
Expand All @@ -28,8 +31,6 @@
#include <thread>
#include <vector>

#include <opencv2/opencv.hpp>

class Object
{
public:
Expand All @@ -44,3 +45,4 @@ class Object
cv::Mat Mean_;
cv::Mat Covariance_;
};
#endif // VISUALIZER__DATA__OBJECT_HPP_
4 changes: 2 additions & 2 deletions object_analytics_node/src/visualizer/device/stream_cap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool stream_cap::init_stream(int stream_name)
{
TRACE_INFO();

// stream_name_ = stream_name;
// stream_name_ = stream_name;
cap_ = std::make_shared<cv::VideoCapture>(stream_name);

if (cap_->isOpened()) {return true;}
Expand All @@ -37,7 +37,7 @@ bool stream_cap::init_stream(std::string & stream_name)
{
TRACE_INFO();

// stream_name_ = stream_name;
// stream_name_ = stream_name;
cap_ = std::make_shared<cv::VideoCapture>(stream_name, cv::CAP_FFMPEG);

if (cap_->isOpened()) {return true;}
Expand Down
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/device/stream_cap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DEVICE__STREAM_CAP_HPP_
#define VISUALIZER__DEVICE__STREAM_CAP_HPP_

#include <opencv2/opencv.hpp>

Expand Down Expand Up @@ -55,3 +56,4 @@ class stream_cap : public stream_device
protected:
private:
};
#endif // VISUALIZER__DEVICE__STREAM_CAP_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DEVICE__STREAM_DEVICE_HPP_
#define VISUALIZER__DEVICE__STREAM_DEVICE_HPP_

#include <opencv2/opencv.hpp>

Expand Down Expand Up @@ -125,3 +126,4 @@ class stream_device
private:
bool initialized_ = false;
};
#endif // VISUALIZER__DEVICE__STREAM_DEVICE_HPP_
2 changes: 1 addition & 1 deletion object_analytics_node/src/visualizer/device/stream_ds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "stream_ds.hpp"

#include <string>
#include <momery>
#include <memory>

#include "frame_obj.hpp"
#include "object.hpp"
Expand Down
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/device/stream_ds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DEVICE__STREAM_DS_HPP_
#define VISUALIZER__DEVICE__STREAM_DS_HPP_

#include <opencv2/opencv.hpp>

Expand Down Expand Up @@ -64,3 +65,4 @@ class stream_ds : public stream_device

private:
};
#endif // VISUALIZER__DEVICE__STREAM_DS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DEVICE__STREAM_RENDER_HPP_
#define VISUALIZER__DEVICE__STREAM_RENDER_HPP_

#include <opencv2/opencv.hpp>

Expand Down Expand Up @@ -53,3 +54,4 @@ class stream_render

private:
};
#endif // VISUALIZER__DEVICE__STREAM_RENDER_HPP_
2 changes: 1 addition & 1 deletion object_analytics_node/src/visualizer/device/stream_vid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "stream_vid.hpp"

#include <string>
#include <momery>
#include <memory>

stream_vid::stream_vid() {TRACE_INFO();}

Expand Down
5 changes: 4 additions & 1 deletion object_analytics_node/src/visualizer/device/stream_vid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__DEVICE__STREAM_VID_HPP_
#define VISUALIZER__DEVICE__STREAM_VID_HPP_

#include <opencv2/opencv.hpp>

Expand All @@ -23,6 +24,7 @@
#include <random>
#include <string>
#include <vector>
#include <memory>

#include "stream_device.hpp"

Expand Down Expand Up @@ -60,3 +62,4 @@ class stream_vid : public stream_device
protected:
private:
};
#endif // VISUALIZER__DEVICE__STREAM_VID_HPP_
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/model/math_model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__MATH_MODEL_HPP_
#define VISUALIZER__MODEL__MATH_MODEL_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -45,3 +46,4 @@ class MathModel
public:
std::string InstName_ = "";
};
#endif // VISUALIZER__MODEL__MATH_MODEL_HPP_
4 changes: 3 additions & 1 deletion object_analytics_node/src/visualizer/model/math_sample.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__MATH_SAMPLE_HPP_
#define VISUALIZER__MODEL__MATH_SAMPLE_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -85,3 +86,4 @@ class MathSample

uint32_t Counts_ = 0;
};
#endif // VISUALIZER__MODEL__MATH_SAMPLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ bool RWSample::GenSamples()
res_dec = Evaluator_Proc_(seed_dec);
}

double uni_rand = rng.uniform((double)0, res_inc + res_dec);
double uni_rand = rng.uniform(0.0f, res_inc + res_dec);
if (uni_rand <= (res_inc)) {
seed = seed_inc.clone();
res = res_inc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__SAMPLE__RW_SAMPLE_HPP_
#define VISUALIZER__MODEL__SAMPLE__RW_SAMPLE_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -56,3 +57,4 @@ class RWSample : public SampleModel
*/
virtual bool FetchSamples(cv::Mat & samples);
};
#endif // VISUALIZER__MODEL__SAMPLE__RW_SAMPLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__SAMPLE__SAMPLE_MODEL_HPP_
#define VISUALIZER__MODEL__SAMPLE__SAMPLE_MODEL_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -100,3 +101,4 @@ class SampleModel
*/
CBPtr Evaluator_Proc_ = nullptr;
};
#endif // VISUALIZER__MODEL__SAMPLE__SAMPLE_MODEL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__SAMPLE__UNIFORM_SAMPLE_HPP_
#define VISUALIZER__MODEL__SAMPLE__UNIFORM_SAMPLE_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -60,5 +61,5 @@ class UniformSample : public SampleModel
* @brief Fetch samples
*/
virtual bool FetchSamples(cv::Mat & samples);

};
#endif // VISUALIZER__MODEL__SAMPLE__UNIFORM_SAMPLE_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__STAT__GAUSSIAN_MODEL_HPP_
#define VISUALIZER__MODEL__STAT__GAUSSIAN_MODEL_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -52,3 +53,4 @@ class GaussianModel : public StatModel

public:
};
#endif // VISUALIZER__MODEL__STAT__GAUSSIAN_MODEL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#pragma once
#ifndef VISUALIZER__MODEL__STAT__STAT_MODEL_HPP_
#define VISUALIZER__MODEL__STAT__STAT_MODEL_HPP_

#include <stdio.h>
#include <unistd.h>
Expand Down Expand Up @@ -70,5 +71,5 @@ class StatModel : public MathModel
cv::Mat Covariance_;
cv::Mat InvCovariance_;
int Dimension_ = 2;

};
#endif // VISUALIZER__MODEL__STAT__STAT_MODEL_HPP_
Loading