-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Programmatically change resolution #1182
Comments
I guess calling the MediaPipeUnityPlugin/Assets/MediaPipeUnity/Samples/UI/Scripts/ImageSourceConfig.cs Line 38 in bd417bf
By the way, the sample code (under the |
I noticed. This is just for the prototype of a project, the team is already working on a whole new application and UI from scratch but we need a working prototype first.
But I'm not calling any of them, and I intend not to because I'm not using any modal panel. I need the user to press a button and, without any other interaction, the application switches resolution, takes a picture, and goes back to the old resolution. To do this i looked at the code for
Is there a way to change resolution without calling Play ? I guess I have to reproduce the same steps as the method Play , at least those that have an effect on ImageSourceProvider ?
|
If you're switching resolutions using the sample app, I meant to say that you should change the code to call
If you've written code to change the resolution yourself, wouldn't it be sufficient to just not call The sample app assumes that the resolution of the input image won't change while |
The code I sent in the first comment doesn't work because the video stream doesn't restart after changing resolution, and the only alternative I found so far is to use |
Plugin Version or Commit ID
v0.14.3
Unity Version
2022.3.18f1
Your Host OS
Windows 11
Target Platform
Android
Description
Using the Hand Tracking sample as a starting point I'm trying to add a button that, when pressed, takes the current picture from the webcam. I need this picture to have the highest resolution as possible, so when the button is clicked I'd like to:
I managed to pause the video, change resolution take a picture and go back to the original resolution, but after this the video won't start again
Code to Reproduce the issue
I added a button to the UI and this is what I'm trying to do in its
OnClick
functionAnd it actually takes the picture with best quality, but the video stream won't restart with the old resolution after this process
Additional Context
I have looked at the code for
ImageSource Config Button
and I think to understand that when the "Exit" button is pressed (after manually changing resolution from the modal panel) the wholeHandTrackingSolution
is restarted, but I'd like to do this without restartingThe text was updated successfully, but these errors were encountered: