@@ -159,35 +159,29 @@ cv::Mat renderDetectionData(const DetectionResult& result) {
159
159
}
160
160
161
161
// Visualizing result data over source image
162
-
163
- if (FLAGS_r)
164
- {
162
+ if (FLAGS_r) {
165
163
slog::info << " Class ID | Confidence | XMIN | YMIN | XMAX | YMAX " << slog::endl;
166
164
}
167
165
168
166
for (auto obj : result.objects ) {
169
- if (obj.confidence > static_cast <float >(FLAGS_t)) {
170
-
171
- if (FLAGS_r)
172
- {
173
- slog::info << " "
174
- << std::left << std::setw (9 ) << obj.label << " | "
175
- << std::setw (10 ) << obj.confidence << " | "
176
- << std::setw (4 ) << std::max (int (obj.x ), 0 ) << " | "
177
- << std::setw (4 ) << std::max (int (obj.y ), 0 ) << " | "
178
- << std::setw (4 ) << std::min (int (obj.width ), outputImg.cols ) << " | "
179
- << std::setw (4 ) << std::min (int (obj.height ), outputImg.rows )
180
- << slog::endl;
181
- }
167
+ if (FLAGS_r) {
168
+ slog::info << " "
169
+ << std::left << std::setw (9 ) << obj.label << " | "
170
+ << std::setw (10 ) << obj.confidence << " | "
171
+ << std::setw (4 ) << std::max (int (obj.x ), 0 ) << " | "
172
+ << std::setw (4 ) << std::max (int (obj.y ), 0 ) << " | "
173
+ << std::setw (4 ) << std::min (int (obj.width ), outputImg.cols ) << " | "
174
+ << std::setw (4 ) << std::min (int (obj.height ), outputImg.rows )
175
+ << slog::endl;
176
+ }
182
177
183
- std::ostringstream conf;
184
- conf << " :" << std::fixed << std::setprecision (3 ) << obj.confidence ;
178
+ std::ostringstream conf;
179
+ conf << " :" << std::fixed << std::setprecision (3 ) << obj.confidence ;
185
180
186
- cv::putText (outputImg, obj.label + conf.str (),
187
- cv::Point2f (obj.x , obj.y - 5 ), cv::FONT_HERSHEY_COMPLEX_SMALL, 1 ,
188
- cv::Scalar (0 , 0 , 255 ));
189
- cv::rectangle (outputImg, obj, cv::Scalar (0 , 0 , 255 ));
190
- }
181
+ cv::putText (outputImg, obj.label + conf.str (),
182
+ cv::Point2f (obj.x , obj.y - 5 ), cv::FONT_HERSHEY_COMPLEX_SMALL, 1 ,
183
+ cv::Scalar (0 , 0 , 255 ));
184
+ cv::rectangle (outputImg, obj, cv::Scalar (0 , 0 , 255 ));
191
185
}
192
186
193
187
return outputImg;
0 commit comments