I am making an application where the user has to be suggested about the quality of the picture he is about to take.
Like "Brightness is low" and "Your environment is dim".
To achieve this, we need to put an overlay message on the camera preview while the user is viewing the subject.
Does anyone have an idea on how could we take the image brightness from the camera preview by using sensors or some other way in live mode even before the picture is taken?
Any help would be appreciated.
Using the camera parameters as pointed out by #appleskin, would either of these methods help? setWhiteBalance() or setExposureCompensation().If you want to achieve this functionality at run time then use native NDK effect for brightness.you can easily got .so files from github just use according to your further requirement.
Related
I'm trying to project the camera to the screen in flutter with android studio but all of the videos I've watched, are all full camera tutorials with a gallery and take picture functionality. But all I want is to display the camera with a button to flip the camera, and I can't figure out how.
If anyone knows could help, it would be appreciated :)
You can use any plugin like this https://pub.dev/packages/camera and directly load the camera alone without the gallery option.
You can use camera_package.
Pls check this code sample, This is a full option camera.
I am new with android studio and I have a question about camera.I have done the Take photo tutorial and now I have a button that opens my camera app. I want to take the color of a pixel from the camera app without saving the picture.
It is possible or I need to make camera API in order to take that color?
Any suggestion or tips about how I can make this project are welcomed.
Android camera intent either saves an image file, or it is cancelled. You need camera API approach to catch pixels without creating files. You can use a library like fotoapparat to wraps the tricky API for easy usage.
I want to develop a camera demo app using the following web page example.
http://marakana.com/forums/android/examples/39.html
After taking a photo, I want to display the captured image in the main activity. How can I do this? Thanks.
Best to use another example. I can't get this one to work. Judging by the other Camera questions in SO, I think lots of people have the same problem. But before you give up on Marakana's example completely, try moving the elements OUTSIDE the element. And include the Marko forgot.
By doing that, I got past the RuntimeException, and now get a completely different error, one I think is specific to my phone: it is trying to create a Preview with an 'invalid preview size' of 480x604. But Marko's code sets the size from the size of the preview surface created,, so the phone itself is defaulting to an invalid size for the Preview surface.
I want to create a simple game for android which is supposed to use a camera. The thing is that I don't really care about the resolution of the picture, what meters to me is speed. I need the picture to be taken the moment a key is pressed. Ideal solution would be to use a frame from camera preview. I need this picture as a table of data for analysis, I don't need a file.
Is this possible to get a single frame form camera/video camera preview?
Or maybe it's easier to get a low resolution picture?
Can you tell me which function would be useful here, and maybe give a short example?
How can I get access to picture data using such a function?
Thanks in advance!
Bye
You may find the ZXing barcode scanner's source code helpful.
I have found good examples on how to call the native Android camera app using an intent, and I know you can set the app to take black and white photos using the UI, but I couldn't find a way to take a BW photo using the intent. Is there a way?
You might want to check on the Camera class that is provided in case you need more precise control over the way a picture is taken. If you're interested in color effects, there are some "pre-defined" color effects that can be found in the Camera.Parameters class. Hope you find your way now :-)