This repository was archived by the owner on Nov 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
integrated camera_factory in video_input #232
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
752233d
integrated camera_factory in video_input
Aleksa-M 38ba0d8
added missing parameters
Aleksa-M fd79964
removed cluster estimation test file
Aleksa-M e4afb45
accommodate video input for new camera factory and logger changes in …
maxlou05 4533f3a
refactor for moving camera config classes into each camera module
maxlou05 b6de157
add comments and change empty to string to a valid iamge prefix
maxlou05 8ddc188
Fix comments
maxlou05 e7f966c
refactor video_input save_prefix to image_name, for proper use with l…
maxlou05 a1d9238
bug fix for video_input integration tests
maxlou05 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
Submodule common
updated
18 files
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -12,7 +12,8 @@ | |
| def video_input_worker( | ||
| camera_name: "int | str", | ||
|
||
| period: float, | ||
| save_name: str, | ||
| width: int, | ||
| height: int, | ||
| output_queue: queue_proxy_wrapper.QueueProxyWrapper, | ||
| controller: worker_controller.WorkerController, | ||
| ) -> None: | ||
|
|
@@ -21,11 +22,12 @@ def video_input_worker( | |
|
|
||
| camera_name is initial setting. | ||
| period is minimum period between loops. | ||
| save_name is path for logging. | ||
| width is the width of the images the camera takes in pixels | ||
| height is the height of the images the camera takes in pixelss | ||
| output_queue is the data queue. | ||
| controller is how the main process communicates to this worker process. | ||
| """ | ||
| input_device = video_input.VideoInput(camera_name, save_name) | ||
| input_device = video_input.VideoInput(camera_name, width, height) | ||
|
|
||
| while not controller.is_exit_requested(): | ||
| controller.check_pause() | ||
|
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ | |
|
|
||
|
|
||
| CAMERA = 0 | ||
|
||
| WIDTH = 1920 | ||
| HEIGHT = 1080 | ||
|
|
||
|
|
||
| def main() -> int: | ||
|
|
@@ -14,9 +16,7 @@ def main() -> int: | |
| """ | ||
| # Setup | ||
| # TODO: Common change logging option | ||
| camera = video_input.VideoInput( | ||
| CAMERA, | ||
| ) | ||
| camera = video_input.VideoInput(CAMERA, WIDTH, HEIGHT) | ||
|
|
||
| # Run | ||
| result, image = camera.run() | ||
|
|
||
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.
Make camera_option the enum