Passed video file as argument

This commit is contained in:
yikestone 2019-06-15 22:40:42 +05:30
parent 3c3afcf592
commit 9e57a18bd6

View File

@ -11,7 +11,7 @@ int main(int argc, char **argv) {
// Handle creation
ros::NodeHandle n;
Mat frame;
VideoCapture cap("/home/yikes/vid/2.avi");
VideoCapture cap(argv[1]);
ros::ServiceClient client =
n.serviceClient<openvino_object_detection::Objects>("/tiny_yolov3");
openvino_object_detection::Objects t;
@ -21,7 +21,7 @@ int main(int argc, char **argv) {
while (1) {
cap >> frame;
t.request.t = 0.5;
t.request.iou_t = 0.4;
t.request.iou_t = 0.8;
t.request.img =
*cv_bridge::CvImage(std_msgs::Header(), "bgr8", frame).toImageMsg();
if (client.call(t)) {