- 🤖 Android Developer at Critical Tech works
- 💬 If you have any questions please feel free to ask
ujizin / camposer Goto Github PK
View Code? Open in Web Editor NEWCamera Library for Android Jetpack Compose. 📸✨
License: Apache License 2.0
Camera Library for Android Jetpack Compose. 📸✨
License: Apache License 2.0
If I don't explain it clearly, you can open the system camera and see the focus mode and exposure adjustments
thanks
Hi. first of all, thanks for developing this package.
I have tested this package and it works great but I have a device which has android 6.
When I launch CameraScreen, it gives me this exception:
The selected camera does not support the enabled use cases. Please "
+ "disable use case and/or select a different camera. e.g. "
+ "#setVideoCaptureEnabled(false)
how can I solve it?
I used this:
cameraState.controller.setEnabledUseCases(CameraController.IMAGE_ANALYSIS)
but nothing changed.
any idea?
Now only support 4:3, 16:9 aspect ratio.
Hope to add full screen and 1:1 support
You know, the full screen of today's mobile phones is not 16:9, so if you are full screen, part of the content will be cropped out
please complete the following information
Describe the bug
I'm not able to make the preview transparent.
To Reproduce
CameraPreview(
modifier = Modifier
.alpha(0.1f),
cameraState = cameraState,
camSelector = camSelector,
) {
// Camera Preview UI
}
Expected behavior
Content should be transparent
Screenshots
Are you willing to provide a PR?
Can the functionality of manually controlling exposure be added? Add left-right swipe on the preview to control the exposure
Is your feature request related to a problem? Please describe.
When you want to access the CameraState
to record video in a Foreground Service for example, you are currently out of luck
Describe the solution you'd like
Remove the internal
property
Describe alternatives you've considered
Are you willing to provide a PR?
Yes
Would like to ask if, would be supported on future releases the raw ByteArray output? i think this a good option that there were no more file save on the storage and the user can retake a picture.
Also how do I make a retake a picture functionality?
Cheers!
Is your feature request related to a problem? Please describe.
This library currently uses CameraX version 1.1.0. Since then, 1.2.2 has been released (and 1.3.0 is in the works). The new version adds new features and fixes bugs
Describe the solution you'd like
Describe alternatives you've considered
Are you willing to provide a PR?
If it's as simple as bumping the version, sure. However, there are new features in 1.2.x that may be worth integrating (such as ZERO_SHUTTER_LAG
, MLKitAnalyzer
it somehow like QR code scanner, that has a semi-transpatent layer to limit the scan area.
could you suggest me some keyeords that I can search in google to learn hoe to integrate this or some useful information.
Thank you
Lib can now only save pictures to filesystem, I need to store them into ram only.
Also, 1.3 version provides new methods of recording, so some things has to be modified.
Sorry no time for PR :((((
Lib works, thanks for that though...
API 21: support #4
Add ability to use video capture and Image analysis at the same time
Remove use cases conditions from camera state
Yupi!
Is your feature request related to a problem? Please describe.
Currently, there's no way to disable/enable audio in Camposer
Describe the solution you'd like
Add audio config parameter when starting recording video
Describe alternatives you've considered
None.
Are you willing to provide a PR?
Yes, however, I'm waiting for release 1.3.0 stable because it'll be added the parameter on CameraController.
Is your feature request related to a problem? Please describe.
The specific use case I'm looking to solve is to know when the camera tap-to-focus has completed. The current tap-to-focus functionality does not hook into CameraController#getTapToFocusState
and seems to rely on an arbitrary delay to consider the focusing "done".
While this should theoretically be independently solvable, the more general "issue" here is the availability of the data but a restrction on access. Since CameraController is the interface to the Camera, it would be nice if that was directly exposed instead of needing native support within the library for a specific feature.
Describe the solution you'd like
It would be nice if the controller
property in CameraState
was publicly accessible (currently it is declared as internal
)
The KDoc for the property in this library even says itself (emphasis mine): Main controller from CameraX. **useful in cases that haven't been release some feature yet**.
And yet it cannot be useful if it is not marked as public
Describe the bug
The camera preview does not respect size constrains.
I have set the height with .height(), .weight(), .fillMaxHeight(). But nothing works. The only thing that seems to affect it is padding, but that will also affect all other screen sizes and API levels.
I have tested with API level 24 and 30 with the same screensize, and it only happens on level 24.
To Reproduce
Screenshots
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
ImageCapture use case with Aspect Ratio support.
Describe alternatives you've considered
Most photo applications needs to control the aspect ratio of the generated image. The default available ones for the ImageCapture use case are RATIO_4_3
and RATIO_16_9
.
Are you willing to provide a PR?
Yes.
please complete the following information
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Capture image in portrait mode
Normal configuration and setup of camerax - here is the link of the video of the issue
https://drive.google.com/file/d/1MfzUONmr0ggrY2_bVAWNZEO6Q1GRZ7lQ/view?usp=share_link
Expected behavior
Since I captured it on portrait mode the image preview should be on portrait also
Screenshots
If applicable, add screenshots to help explain your problem.
https://drive.google.com/file/d/1MfzUONmr0ggrY2_bVAWNZEO6Q1GRZ7lQ/view?usp=share_link
Really dont know if it is a bug or not? is it camerax bug or not?
Any idea why this happening?
Thanks a lot!
Hi. There are two options we have from camerax that allow us to change aspect ration:
Preview preview = new Preview.Builder()
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
.build();
ImageCapture imageCapture = new ImageCapture.Builder()
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
.build();
The first one change the viewfinder ration, the second one changes the output picture ratio.
Can I change aspect ratio only for ImageCapture and not for preview?
What code should I write to change aspect ration in both cases?
I haven't found any setTargetAspectRatio lines inside library code.
please complete the following information
Describe the bug
Following the How To Use first example, the following error message pops up:
Type mismatch.
Required: CamSelector
Found: MutableState<CamSelector>
To Reproduce
Just follow the documentation.
Expected behavior
Same behavior as expected in the documentation.
Are you willing to provide a PR?
I can. If I understood correctly what is the expected behavior: between CameraPreview
to receive a mutableStateOf<CamSelector>
or just the CamSelector
, the second one is the intended one. So just fixing the documentation would be the solution.
Is your feature request related to a problem? Please describe.
The device I used didn't have a built-in camera, it connected to an external UVC Camera via USB.
Currently, there's no way to connect UVC Camera in Camposer.
Describe the solution you'd like
Add parameter when use CamSelector, it can be the VID/PID or a UsbDevice instance.
Describe alternatives you've considered
None.
Are you willing to provide a PR?
I'm a beginner programmer and this might be too difficult for me. But I'll try to help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.