Add Throttle Value

This commit is contained in:
Grant Terris
2019-10-19 16:58:24 -07:00
parent 3fdd065fc2
commit 36ef0dc541
2 changed files with 16 additions and 0 deletions

View File

@@ -25,6 +25,16 @@ bool ImageAnalyzer::ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPo
static int temp_threshold = BITS14;
static int fault_area = ZERO;
if (throttle_count == THROTTLE_AMOUNT)
{
throttle_count = 1;
}
else
{
throttle_count++;
return true;
}
// Read in frame
if (!test)
frame = Mat(height, width, CV_16UC1, imgPointer, Mat::AUTO_STEP);

View File

@@ -4,6 +4,8 @@
#include <opencv2/core.hpp>
#include "FaultManager.hpp"
#define THROTTLE_AMOUNT 1
class ImageAnalyzer
{
@@ -11,6 +13,10 @@ public:
bool ProcessImage(uint32_t width, uint32_t height, uint8_t *imgPointer, FaultManager fault_mgr, bool test);
private:
int throttle_count = 1;
};
#endif