-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TargetFinder #396
TargetFinder #396
Conversation
probably a temporary folder added 10/4/2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great initial work, cheers especially on the detailed comments!
See my specific nits below, but a high level overview of the work needed:
Remember this program needs to robustly detect the large and small target in variant lighting conditions. We will be shooting a real projectile at the object identified by this program, is it robust enough to do this? Here are some ways to improve the consistency:
- Tests: We've recently labeled hundreds of images containing this target. You could write a test to compare your program to the human labels. I've written a library for easily iterating through the labeled images.
- Tracking: find the target in multiple frames. If it stays in roughly the same spot, increase your confidence that you have really found it. If it moves suddenly, throw out this outlier.
- ROS interface: the program needs to tell other programs what it saw, like by publishing the pixel coordinates of the Large and Small target to a ROS message
## The higher the value the closer the field of vision has to be to the target | ||
AREA_THRESHOLD = 5000 | ||
|
||
class image_converter: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the ImageSubscriber
found in mil_tools, which will handle the ros image -> opencv conversion for you.
|
||
test = cv2.resize(cv_image_original, (900, 600)) | ||
cv2.imshow("Image window", test) | ||
cv2.waitKey(50) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't use cv gui on NaviGator as it doesn't have a monitor. These lines will crash the program. Instead, publish the debugging image to ROS using mil_tools.Image_Publisher
import sys | ||
import rospy | ||
import cv2 | ||
import imutils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't installed on NaviGator (will crash program). Either remove the dependency or add it to the install script.
from __future__ import print_function | ||
|
||
import roslib | ||
roslib.load_manifest('beginner_tutorials') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is roslib used at all?
## If the value is set too high then the targets will not be detected | ||
## If the value is set too low then this could introduce potential noise in the final image | ||
## The higher the value the closer the field of vision has to be to the target | ||
AREA_THRESHOLD = 5000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Magic number" constants should be ros params so they can be easily changed at runtime
replaced by #418 |
closes #305
This is my first pull request so I'm not sure if I'm doing this right...
This should be the program that finds the square targets.
-Paul Chojecki