Skip to content
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

Closed
wants to merge 1 commit into from
Closed

TargetFinder #396

wants to merge 1 commit into from

Conversation

pchojecki
Copy link

@pchojecki pchojecki commented Oct 4, 2018

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

probably a temporary folder

added 10/4/2018
@ghost ghost assigned pchojecki Oct 4, 2018
@ghost ghost added the review label Oct 4, 2018
Copy link
Contributor

@kev-the-dev kev-the-dev left a 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:
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

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')
Copy link
Contributor

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
Copy link
Contributor

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

@kev-the-dev
Copy link
Contributor

replaced by #418

@ghost ghost removed the review label Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect Deliver Target Detector
2 participants