Skip to content

Commit

Permalink
Minor changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbjelonic committed Apr 28, 2017
1 parent 1680f46 commit 53088bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions darknet_ros/launch/darknet_ros.launch
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<arg name="camera_action_name" default="/darknet/check_for_objects"/>

<!-- Threshold of object detection -->
<arg name="yolo_object_threshold" default="0.4"/>
<arg name="yolo_object_threshold" default="0.3"/>

<!-- Enable image view in opencv -->
<arg name="view_image_in_opencv" default="true"/>
Expand All @@ -23,7 +23,7 @@
<arg name="use_darknet_image_viewer" default="false"/>

<!-- Delay for cv::waitkey(delay) in millisecons -->
<arg name="wait_key_delay_in_opencv" default="3"/>
<arg name="wait_key_delay_in_opencv" default="2"/>

<!-- Start darknet and ros wrapper -->
<node pkg="darknet_ros" type="darknet_ros" name="darknet_ros" output="screen">
Expand Down
4 changes: 3 additions & 1 deletion darknet_ros/src/object_detector_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ extern "C" void load_network_demo(char *cfgfile, char *weightfile, char *datafil
extern "C" darknet_ros::RosBox_ *demo_yolo()
{
if (count == 0) {
++count;
fetch_in_thread(0);
det = in;
det_s = in_s;
Expand Down Expand Up @@ -262,7 +263,7 @@ extern "C" darknet_ros::RosBox_ *demo_yolo()
det_s = in_s;

if(pthread_create(&fetch_thread, 0, fetch_in_thread, 0)) error("Thread creation failed");
if(pthread_create(&detect_thread, 0, detect_in_thread, 0)) error("Thread creation failed");
if(pthread_create(&detect_thread, 0, detect_in_thread, 0)) error("Thread creation failed");\
if(view_image)
{
show_image(disp, "YOLO_V2");
Expand All @@ -271,6 +272,7 @@ extern "C" darknet_ros::RosBox_ *demo_yolo()
pthread_join(fetch_thread, 0);
pthread_join(detect_thread, 0);

free_image(disp);
disp = det;
det = in;
det_s = in_s;
Expand Down

0 comments on commit 53088bc

Please sign in to comment.