-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Add support for cropping pictures in proxy camera #18431
Merged
Merged
Conversation
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
ghost
added
the
in progress
label
Nov 13, 2018
houndci-bot
reviewed
Nov 13, 2018
glpatcern
added a commit
to glpatcern/home-assistant.github.io
that referenced
this pull request
Nov 13, 2018
This includes extending the configuration to introduce a mode (either 'resize', default, or 'crop') and further coordinates for the crop operation.
glpatcern
force-pushed
the
proxycamera-pr
branch
from
November 13, 2018 14:29
b455e5f
to
697aed5
Compare
Merged
2 tasks
glpatcern
changed the title
WIP: Added support for cropping pictures in proxy camera
Add support for cropping pictures in proxy camera
Nov 13, 2018
pvizeli
requested changes
Nov 19, 2018
pvizeli
approved these changes
Nov 22, 2018
ghost
removed
the
in progress
label
Nov 22, 2018
frenck
pushed a commit
to home-assistant/home-assistant.io
that referenced
this pull request
Dec 5, 2018
* Extended documentation for proxy camera to include PR 18431 home-assistant/core#18431 * Further refinements * ✏️ Tweak
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR is motivated by having some public panoramic webcams in my HA setup: those cameras have a large width/height ratio and their preview in HA is far from optimal. A cropped version of the image gives a better preview and the full picture is still accessible by clicking on it, as per default behavior of the proxy camera. I think this can be useful in general, not only for this case.
The PR includes extending the configuration to introduce a mode (either
resize
, default, orcrop
) and further parameters for the crop operation.The crop mode is supported both on static images and on video streams,
but I could only test it on a static image. I'm happy to do further testing on an MJPEG stream if I can get one.Edit: this was successfully tested on a video stream, though with some caveats as illustrated in #39924.
Description:
Related issue (if applicable): N/A
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#7491
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: