-
Notifications
You must be signed in to change notification settings - Fork 407
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
Ability to customize CameraParameters/CaptureRequest #21
Comments
We indeed currently do not provide the possibility to change those parameters, but thanks for the suggestion. That would be the first thing which we'll do after fixing all the bugs. |
I need these features for a project in which I'm already using this library, and I would like to try to implement them. Could you provide some hints? It looks like for v1, For v2, it looks like Is that correct? Also what's the purpose of the above multiple classes used in v2? |
@hagabaka if you would help to implement a feature, that would be appreciated. To simplify things, since Camera2 is still work-in-progress you can just throw As for Camera1, you almost got it right.
Note, that
Next thing to take into account, we never expose native camera classes in If you have any other questions, feel free to ask! :) |
I started trying to add support for sensor sensitivity, and have encountered a few issues: The only way to test for this capability with v1 seems to be explained here, which is to look for a device-dependent key like "iso-values" in On v2 this can be queried using I'm under the impression that the finished API would look something like:
Does that make sense? |
API Looks good. If I understood correctly this feature is available only on Camera2?
I see the problem. Our interface SelectorFunction<Input, Output> {
Output select(Input input);
} Then our existing selectors can be represented like that: SelectorFunction<List<Size>, Size> biggestSize() And your range could be represented like that (assuming you'll create SelectorFunction<Range<Integer>, Integer> highestSensorSensitivity() |
The feature depends on the device, but the ability to reliably query the capability is only on camera2. On my phone, the camera apparently supports it but only reports it on camera2. Still, it's known to work for some devices on camera1 as listed in the Stackoverflow answer. I think changing |
It has a Input and Output type, so that it's possible to have SelectorFunctions based on input other than Collection. Following advice in RedApparat#21 RedApparat#21 (comment)
Add querying and selection functions WIP for RedApparat#21
So far I think the approach of making To recap, on v1 the sensor sensitivity information, if available, is reported as a list of numbers, while on v2 it is a range. I can't have functions overrides returning different I still need to add code and allow the user to use the new |
Add querying and selection functions WIP for RedApparat#21
How about instead of creating interface Range<T> {
boolean contains(T value);
T maxValue();
T minValue();
} Then you can implement This is roughly the same idea as you had, but with a more generic name. |
OK. Should I put |
I think |
I would go with the least abstract package. |
Following advice in RedApparat#21 (comment) WIP RedApparat#21
Add API for setting sensor sensitivity (FotoapparatBuilder#sensorSensitivity) Handle conversion to CaptureRequest and Camera.Parameter WIP RedApparat#21
So I think the sensor sensitivity/ISO part of this feature is done. It's hard to tell that it is working, but code using the added API is compiling, and debugger shows that the value is being set in The earlier change to |
@hagabaka sorry for the delay. To run tests in Android Studio you can right click the test folder and click Run. Or, you can right click on each individual test and do the same. Could you perhaps create a Pull Request with your changes so that we can review them and integrate into the project? |
OK, I've fixed the tests and created a pull request. |
Hi,
I'd like to configure the camera's ISO (sensor sensitivity), aperture, and exposure time settings. It looks like these may be possible in the old API with
Camera.Parameters
and incamera2
withCaptureRequest
, with varying hardware support. This library doesn't seem to provide a way to access or inject them. Is it possible to provide this ability?The text was updated successfully, but these errors were encountered: