const std::vector<std::string> get_channels_name() const {
std::vector<std::string> channel_names;
- for (int i = 0; i < channels_order_.size(); i++)
- channel_names.push_back(channel_name_str[static_cast<int>(
- channels_order_[i])]);
+ for (const auto &channel : channels_order_)
+ channel_names.push_back(channel_name_str[static_cast<int>(channel)]);
return channel_names;
}
std::vector<std::vector<float>> data = start_joint->channel_data();
- for (int i = 0; i < num_frames_; i++) {
+ for (unsigned i = 0; i < num_frames_; i++) {
cv::Mat offmat = offmat_backup; // offset matrix
cv::Mat rmat = cv::Mat::eye(4,4,CV_32F); // identity matrix set on rotation matrix
cv::Mat tmat = cv::Mat::eye(4,4,CV_32F); // identity matrix set on translation matrix
- for (int j = 0; j < start_joint->channels_order().size(); j++) {
+ for (size_t j = 0; j < start_joint->channels_order().size(); j++) {
if (start_joint->channels_order()[j] == Joint::Channel::XPOSITION)
tmat.at<float>(0,3) = data[i][j];
else if (start_joint->channels_order()[j] == Joint::Channel::YPOSITION)
for (int i = 0; i < frames_num; i++) {
for (auto joint : bvh_->joints()) {
std::vector <float> data;
- for (int j = 0; j < joint->num_channels(); j++) {
+ for (unsigned j = 0; j < joint->num_channels(); j++) {
file >> number;
data.push_back(number);
}
auto *ori_buf = static_cast<unsigned char *>(
tensorBuffers->buffer);
- for (int j = 0; j < tensor_info.size; j++) {
+ for (size_t j = 0; j < tensor_info.size; j++) {
new_buf[j] = static_cast<float>(ori_buf[j]) / 255.0f;
}
auto *ori_buf =
static_cast<short *>(tensorBuffers->buffer);
- for (int j = 0; j < tensor_info.size; j++) {
+ for (size_t j = 0; j < tensor_info.size; j++) {
new_buf[j] = static_cast<float>(ori_buf[j]);
}
} else {
cvRoi.x = roi->point.x;
cvRoi.y = roi->point.y;
- cvRoi.width = (roi->point.x + roi->width) >= width ?
+ cvRoi.width = unsigned(roi->point.x + roi->width) >= width ?
width - roi->point.x :
roi->width;
- cvRoi.height = (roi->point.y + roi->height) >= height ?
+ cvRoi.height = unsigned(roi->point.y + roi->height) >= height ?
height - roi->point.y :
roi->height;
cvSource = cv::Mat(cv::Size(width, height), CV_MAKETYPE(CV_8U, 3),
top_result_pq.push(std::pair<float, int>(value, i));
// If at capacity, kick the smallest value out.
- if (top_result_pq.size() > mOutputNumbers) {
+ if (top_result_pq.size() > (size_t)mOutputNumbers) {
top_result_pq.pop();
}
}
int classIdx = -1;
ImageClassificationResults results;
results.number_of_classes = 0;
- for (int idx = 0; idx < top_results.size(); ++idx) {
+ for (size_t idx = 0; idx < top_results.size(); ++idx) {
if (top_results[idx].first < mThreshold)
continue;
- LOGI("idx:%d", idx);
+ LOGI("idx:%lu", idx);
LOGI("classIdx: %d", top_results[idx].second);
LOGI("classProb: %f", top_results[idx].first);
LOGI("ENTER");
mScore.push(std::pair<float, int>(value, index));
- if (mScore.size() > mMaxScoreSize) {
+ if (mScore.size() > (size_t)mMaxScoreSize) {
mScore.pop();
}
* limitations under the License.
*/
-#include "mv_absdiff.h"
+#include <stdlib.h>
+#include "mv_absdiff.h"
#include "mv_common.h"
#include "mv_private.h"
}
#else
for (column = 0; column < width; ++column) {
- uint8_t gray1 = *src1;
- uint8_t gray2 = *src2;
-
(*dst) = abs((*src1) - (*src2));
++src1;
for (; i < NUMBER_OF_TYPES; ++i)
printf("#%d. %s\n", i, EVENT_TYPES_NAMES[i]);
- unsigned int event_id = 0u;
+ size_t event_id = 0ul;
while (input_size("Input event type (unsigned integer value):",
NUMBER_OF_TYPES - 1, &event_id) == -1) {
PRINT_R("Incorrect input! Try again.\n List of supported events is:");