mirror of
https://gitlab.com/yikestone/ros_openvino_tiny-yolov3.git
synced 2025-08-05 14:44:10 +05:30
Passed video file as argument
This commit is contained in:
parent
3c3afcf592
commit
9e57a18bd6
@ -11,7 +11,7 @@ int main(int argc, char **argv) {
|
|||||||
// Handle creation
|
// Handle creation
|
||||||
ros::NodeHandle n;
|
ros::NodeHandle n;
|
||||||
Mat frame;
|
Mat frame;
|
||||||
VideoCapture cap("/home/yikes/vid/2.avi");
|
VideoCapture cap(argv[1]);
|
||||||
ros::ServiceClient client =
|
ros::ServiceClient client =
|
||||||
n.serviceClient<openvino_object_detection::Objects>("/tiny_yolov3");
|
n.serviceClient<openvino_object_detection::Objects>("/tiny_yolov3");
|
||||||
openvino_object_detection::Objects t;
|
openvino_object_detection::Objects t;
|
||||||
@ -21,7 +21,7 @@ int main(int argc, char **argv) {
|
|||||||
while (1) {
|
while (1) {
|
||||||
cap >> frame;
|
cap >> frame;
|
||||||
t.request.t = 0.5;
|
t.request.t = 0.5;
|
||||||
t.request.iou_t = 0.4;
|
t.request.iou_t = 0.8;
|
||||||
t.request.img =
|
t.request.img =
|
||||||
*cv_bridge::CvImage(std_msgs::Header(), "bgr8", frame).toImageMsg();
|
*cv_bridge::CvImage(std_msgs::Header(), "bgr8", frame).toImageMsg();
|
||||||
if (client.call(t)) {
|
if (client.call(t)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user