-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlc_scrambled_camera_detector.h
47 lines (35 loc) · 1.28 KB
/
lc_scrambled_camera_detector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <base_detector.h>
#include <htwk_vision_config.h>
#include <image_preprocessor.h>
#include <tfliteexecuter.h>
#include <field_color_detector.h>
#include <memory>
#include <vector>
namespace htwk {
class LowerCameraScrambledCameraDetector : BaseDetector {
public:
const int imageWidth;
const int imageHeight;
LowerCameraScrambledCameraDetector(int8_t* lutCb, int8_t* lutCr, HtwkVisionConfig& config);
LowerCameraScrambledCameraDetector(const LowerCameraScrambledCameraDetector&) = delete;
LowerCameraScrambledCameraDetector(const LowerCameraScrambledCameraDetector&&) = delete;
LowerCameraScrambledCameraDetector& operator=(const LowerCameraScrambledCameraDetector&) = delete;
LowerCameraScrambledCameraDetector& operator=(LowerCameraScrambledCameraDetector&&) = delete;
~LowerCameraScrambledCameraDetector();
void proceed(std::shared_ptr<ImagePreprocessor> imagePreprocessor);
bool isCameraScrambled() {
return isCameraScrambledFlag;
}
bool wasExecuted() {
return wasExecutedFlag;
}
void shouldRun(bool state);
private:
static constexpr int channels = 3;
bool isCameraScrambledFlag = false;
bool wasExecutedFlag;
float* input;
TFLiteExecuter modelExecutor;
};
} // namespace htwk