mirror of
https://gitlab.com/yikestone/ros_openvino_tiny-yolov3.git
synced 2025-08-03 13:44:11 +05:30
Added object id
This commit is contained in:
parent
9e57a18bd6
commit
c9e3219384
@ -1,4 +1,5 @@
|
|||||||
string label
|
string label
|
||||||
|
int32 id
|
||||||
|
|
||||||
#confidence of result
|
#confidence of result
|
||||||
float32 confidence
|
float32 confidence
|
||||||
|
@ -71,6 +71,7 @@ bool getObjects(openvino_object_detection::Objects::Request &req,
|
|||||||
openvino_object_detection::Object tmp;
|
openvino_object_detection::Object tmp;
|
||||||
tmp.confidence = object.confidence;
|
tmp.confidence = object.confidence;
|
||||||
tmp.label = labels[object.class_id];
|
tmp.label = labels[object.class_id];
|
||||||
|
tmp.id = object.class_id;
|
||||||
tmp.x = (object.xmin + object.xmax) / 2.0;
|
tmp.x = (object.xmin + object.xmax) / 2.0;
|
||||||
tmp.y = (object.ymin + object.ymax) / 2.0;
|
tmp.y = (object.ymin + object.ymax) / 2.0;
|
||||||
tmp.w = object.xmax - object.xmin;
|
tmp.w = object.xmax - object.xmin;
|
||||||
|
@ -40,7 +40,8 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cv::imshow("view", frame);
|
cv::imshow("view", frame);
|
||||||
cv::waitKey(300);
|
|
||||||
|
cv::waitKey(1);
|
||||||
}
|
}
|
||||||
ros::spinOnce();
|
ros::spinOnce();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user