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

low resolution config changes. #697

Merged
merged 4 commits into from
Jul 19, 2024
Merged

low resolution config changes. #697

merged 4 commits into from
Jul 19, 2024

Conversation

naushir
Copy link
Collaborator

@naushir naushir commented Jul 18, 2024

No description provided.

Allow the low resolution stream width, height and pixel fromat to be
set through the JSON postprocessing file. The parameters are stored in
the "rpicam-apps" key. Currently only "RGB", "BGR" and "YUV420" formats
are supported.

Configuration in the JSON file will override any user supplied values
through the command line.

Signed-off-by: Naushir Patuck <[email protected]>
If the ISP is configured for RGB output, bypass the YUV -> RGB software
conversion in the Hailo postprocessing stages. Note that we still need
to make a copy of the low res image buffer to pass into the Hailo HW,
otherwise we get some intermittent low memory mapping error from the
Hailo device driver. This needs further investigation.

Signed-off-by: Naushir Patuck <[email protected]>
This avoids the need to add these parameters to the command line.

Signed-off-by: Naushir Patuck <[email protected]>
Remove all hard-coded tensor size consts from the Hailo postprocessing
stages. Add a HailoPostProcessingStage::InputTensorSize() helper to
fetch the input tensor size supplied in the JSON file instead.

Signed-off-by: Naushir Patuck <[email protected]>
@naushir
Copy link
Collaborator Author

naushir commented Jul 18, 2024

@davidplowman can you cast your eyes on these changes please?

@naushir
Copy link
Collaborator Author

naushir commented Jul 19, 2024

@davidplowman sadly the plan to use AdjustConfig is not without problems. AdjustConfig expects a use case string, rather than a stream identifier string, but I can possibly have a special "lores" use case maybe?

@naushir
Copy link
Collaborator Author

naushir commented Jul 19, 2024

Actually, using AdjustConfig is even more complicated than I expected. Logically, we should only call AdjustConfig("lores") if a low res stream is enabled... but the mechanism to enable the low res stream comes through the call to AdjustConfig("lores"). So that means that the user will still have to write --lores-width xx --lores-height xx on the command line to get this working.

I think we might be better of leaving AdjustConfig as is, and using the mechanism in this PR to drive the lo res config.

@naushir naushir merged commit 18fc2d1 into main Jul 19, 2024
9 of 10 checks passed
@naushir naushir deleted the lores branch July 19, 2024 10:43
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.

1 participant