-
Notifications
You must be signed in to change notification settings - Fork 39
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
integrated camera_factory in video_input #232
Changes from 3 commits
752233d
38ba0d8
fd79964
e4afb45
4533f3a
b6de157
8ddc188
e7f966c
a1d9238
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ | |
def video_input_worker( | ||
camera_name: "int | str", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be the CameraOption enum class. Then, you will need to change the config.yaml to include this option. You will also need to change the config loading portion of the code (similar to DETECT_TARGET_OPTION_INT). |
||
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() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
|
||
|
||
CAMERA = 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you rename this to camera option? Also, isn't there an enum for what each number means? Please use the enum |
||
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() | ||
|
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