struct StabilizationParams {
StabilizationParams(
bool isEnabled,
- int historyAmount,
+ size_t historyAmount,
double tolerantShift,
double tolerantShiftExtra,
double stabilizationSpeed,
bool mIsEnabled; /**< Flag that specifies whether to use the stabilization. */
- int mHistoryAmount; /**< Number of previous recognition results, which
+ size_t mHistoryAmount; /**< Number of previous recognition results, which
will influence the stabilization. */
double mTolerantShift; /**< Relative value of maximum shift per one frame,
StabilizationParams::StabilizationParams(
bool isEnabled,
- int historyAmount,
+ size_t historyAmount,
double tolerantShift,
double tolerantShiftExtra,
double stabilizationSpeed,
__tolerantShift = (float)params.mTolerantShift;
__tolerantShiftExtra = (float)params.mTolerantShiftExtra;
- if (__historyAmount != (size_t)params.mHistoryAmount) {
- __historyAmount = (size_t)params.mHistoryAmount;
+ if (__historyAmount != params.mHistoryAmount) {
+ __historyAmount = params.mHistoryAmount;
__priorities.resize(__historyAmount);
}
}
- while (__historyAmount > (size_t)params.mHistoryAmount) {
+ while (__historyAmount > params.mHistoryAmount) {
__movingHistory.pop_front();
--__historyAmount;
}
- if ((size_t)params.mHistoryAmount > __historyAmount) {
+ if (params.mHistoryAmount > __historyAmount) {
/* TODO: save current moving history */
__tempContourIndex = -1;
- __historyAmount = (size_t)params.mHistoryAmount;
+ __historyAmount = params.mHistoryAmount;
__movingHistory.clear();
}
MediaVision::Image::StabilizationParams& stabilizationParams)
{
mv_engine_config_h working_cfg = NULL;
+ int _history_amount = 0;
if (NULL == engine_cfg) {
mv_create_engine_config(&working_cfg);
mv_engine_config_get_int_attribute_c(
working_cfg,
MV_IMAGE_TRACKING_HISTORY_AMOUNT,
- &stabilizationParams.mHistoryAmount);
+ &_history_amount);
+ stabilizationParams.mHistoryAmount =
+ static_cast<size_t>(
+ static_cast<unsigned int>(_history_amount)
+ );
mv_engine_config_get_double_attribute_c(
working_cfg,
// Get label count after removing a given label from the label file.
_label_manager->RemoveLabel(label_name);
- int label_cnt = _label_manager->GetMaxLabel();
+ auto label_cnt = _label_manager->GetMaxLabel();
auto fvm = CreateFVM(_config.training_engine_backend_type, _config.feature_vector_file_path);
auto fvm_new = CreateFVM(_config.training_engine_backend_type, _config.feature_vector_file_path + ".new");
// Feature vector file header is written at the end of the data file
// So read feature vector header from the end of the file.
- openFile.seekg(static_cast<int>(sizeof(FeaVecHeader) * -1), ios::end);
+ openFile.seekg(static_cast<int>(sizeof(FeaVecHeader)) * -1, ios::end);
FeaVecHeader fvh;
unsigned int AddLabelToFile(std::string given_label);
int ImportLabel(void);
bool AddLabelToMap(const std::string given_label, const std::string image_file);
- int GetMaxLabel(const std::string label_file);
- int GetMaxLabel();
+ size_t GetMaxLabel(const std::string label_file);
+ size_t GetMaxLabel();
std::string GetLabelFromAnswer(const std::vector<float>& result);
};
return false;
}
-int LabelManager::GetMaxLabel(const string label_file)
+size_t LabelManager::GetMaxLabel(const string label_file)
{
// label count is 0 if lael file doesn't exist.
readFile.open(label_file.c_str());
- int label_cnt = 0;
+ size_t label_cnt = 0;
if (readFile.fail())
throw InvalidOperation("Fail to open " + label_file + " file.");
return label_cnt;
}
-int LabelManager::GetMaxLabel()
+size_t LabelManager::GetMaxLabel()
{
return GetMaxLabel(_label_file);
}
bool haveRes = false;
for (size_t apIdx = 0u; apIdx < hogRectsSize; ++apIdx) {
intersectionAreas[trIdx][apIdx] =
- (appearedPersons[apIdx] & trackRectIter->rect).area();
+ static_cast<size_t>(
+ static_cast<unsigned int>(
+ (appearedPersons[apIdx] & trackRectIter->rect).area()
+ )
+ );
if (intersectionAreas[trIdx][apIdx] > 0 &&
(intersectionAreas[trIdx][apIdx] >
Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
-Version: 0.19.2
+Version: 0.19.3
Release: 0
Group: Multimedia/Framework
License: Apache-2.0 and BSD-3-Clause