-
Notifications
You must be signed in to change notification settings - Fork 29
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
Vision stack implementation #1185
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
4e78055
Removed IndyAV file
DaniParr 76ccba9
Merge branch 'master' of github.com:uf-mil/mil
DaniParr 960663b
Merge branch 'master' of github.com:uf-mil/mil
DaniParr 460bff2
Merge branch 'master' of github.com:uf-mil/mil
DaniParr 3d47ef1
Merge branch 'master' of github.com:uf-mil/mil
DaniParr 94f80bc
Merge branch 'master' of github.com:uf-mil/mil
DaniParr 3bcadfb
Added vision_stack package
DaniParr 855ee76
added submodule
andrew-aj deead05
Merge branch 'master' into vision_stack_implementation
andrew-aj 195f4f5
updated vision_stack package and node that demonstrates image enhance…
DaniParr 7fc117f
Merge branch 'vision_stack_implementation' of github.com:uf-mil/mil i…
DaniParr 49176a7
Merge branch 'master' into vision_stack_implementation
DaniParr 1d09e70
update requirements.txt
cbrxyz ec2653b
Fix PYTHONPAHT
cbrxyz e42f176
Add gitignore, remove tracking of __pycache__
cbrxyz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
SubjuGator/perception/subjugator_perception/nodes/vision_stack_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env python3 | ||
import rospy | ||
from image_geometry import PinholeCameraModel | ||
from mil_ros_tools import ( | ||
Image_Subscriber, | ||
) | ||
from vision_stack import ResizeLayer, UnderWaterImageEnhancementLayer, VisionStack | ||
|
||
__author__ = "Daniel Parra" | ||
|
||
|
||
class ObjectDetectionTest: | ||
def __init__(self): | ||
camera = rospy.get_param("~image_topic", "/camera/front/right/image_rect_color") | ||
SIZE = (960, 608) | ||
self.vs = VisionStack( | ||
layers=[ | ||
ResizeLayer((0, 0), 960, 608), | ||
UnderWaterImageEnhancementLayer(SIZE), | ||
], | ||
input_size=SIZE, | ||
) | ||
|
||
self.image_sub = Image_Subscriber(camera, self.detection_callback) | ||
self.camera_info = self.image_sub.wait_for_camera_info() | ||
assert self.camera_info is not None | ||
self.cam = PinholeCameraModel() | ||
self.cam.fromCameraInfo(self.camera_info) | ||
|
||
def detection_callback(self, msg): | ||
# Create Image from array | ||
self.vs.run(msg, True) | ||
|
||
|
||
if __name__ == "__main__": | ||
rospy.init_node("vision_pipeline_test") | ||
ObjectDetectionTest() | ||
rospy.spin() |
Submodule vision_stack
added at
b021d1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should be
right?
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.
The first argument is the initial size, and the next parameters are the new width and new heights. However, the initial size of the image is not being used in any of the layers...
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.
Ill change that rn