Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from medhat-omr/fix_detector_bgr
Browse files Browse the repository at this point in the history
Fix detector bgr to rgb colors channel order
  • Loading branch information
Medhat Omr authored Jan 1, 2018
2 parents ede7b33 + de8ba07 commit e535584
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Udacity CarND System Integration Project
**Team Members:**
- Medhat Omr (Team Leader)
- Ibrahim Almohandes
- Dmitry Gavrilenko
- Brian Meier
- Medhat Omr (Team Leader) ([email protected])
- Ibrahim Almohandes ([email protected])
- Dmitry Gavrilenko ([email protected])
- Brian Meier ([email protected])

### Submission checklist and requirements

Expand Down
5 changes: 3 additions & 2 deletions ros/src/tl_detector/light_classification/tl_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ def get_classification(self, image):
print "Classification time", (time1 - time0) * 1000.0, "ms"
print "score, result", max_total_score, max_result
print
#draw_bboxes(image, boxes, classes, scores,)
#cv2.imshow("camera", image)
#image_bgr = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
#draw_bboxes(image_bgr, boxes, classes, scores,)
#cv2.imshow("camera", image_bgr)
#cv2.waitKey(1)

return max_result
4 changes: 2 additions & 2 deletions ros/src/tl_detector/tl_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import tf
import yaml

RED_COUNT_THRESHOLD = 1
RED_COUNT_THRESHOLD = 3
YEL_COUNT_THRESHOLD = 3
GRN_COUNT_THRESHOLD = 3
UNK_COUNT_THRESHOLD = 50
Expand Down Expand Up @@ -230,7 +230,7 @@ def get_light_state(self, light):
if self.camera_image is None:
return TrafficLight.UNKNOWN

cv_image = self.bridge.imgmsg_to_cv2(self.camera_image, "bgr8")
cv_image = self.bridge.imgmsg_to_cv2(self.camera_image, "rgb8")

#Get classification
result = self.light_classifier.get_classification(cv_image)
Expand Down

0 comments on commit e535584

Please sign in to comment.