I'am currently working on an Android application and I need to be able to :
Find square on a preview Camera. that part is working.
The problem that I have is, in order to be able to find these square on the Camera preview, I need to change my Camera resolution to 800x600 in order to have something smooth.
What I want is : As soon as I hit my button I want to capture the image in a specific resolution (1920x1080 for example). So basically the preview have to be in 800x600 but the capture have to be in 1920x1080.
I'am using openCV to process my camera view on live.
Related
I want to add mirror effect in live camera preview screen.im using open camera library.can anyone help me to achieve this I'm stuck last couple of days.
I have been trying to use the ML Kit Vision Quickstart Sample App to develop a blink detection app.
For this, I have been using the Face Detector module with the CameraX library.
On installing the sample app on my Android phone, I found that rotating the device with Screen Rotation locked makes the app unable to detect faces, as expected.
I want to know how I should modify the code to override the Screen Rotation lock on the device, so that the app automatically rotates its orientation to detect faces.
To override the screen lock you may add the next tag to your target activity in the manifest:
android:screenOrientation="sensor"
Although this will only allow to rotate the activity regardless the screen lock. You still need to handle the orientation changes for the camera code. What I mean is that your camera lens is a fixed device and it doesn't rotate, therefore you need to handle image rotation by code.
Working on an app using Camera-X and I want to capture images in grayscale mode before saving the image,
I checked out this but no solution, what is the best way to go about this.
I am wondering if it is possible to show the output of the camera running on your device immediately on the screen. Just like the native camera app does.
I have to show the picture, that comes into the camera lens, and additionally add some graphics overlays. That's why I guess, starting an Intent to open the camera activity is not suitable.
I've found some SO Threads, Tutorials and documentation about using the Android Camera API, but they are all able to just take a picture and display it afterwards.
Is it possible at all?
Refer to this link Camera Tutorial for Android (using surfaceview)!
Use the SurfaceView to preview the camera output, then, you can add your graphics overlays as you wish.
Hope this helps :)
I'm working on an example I got from Phonegap on capturing Images using the built in device camera. If I rotate the device, the saved image stays in that orientation.
I know in javascript, I can manipulate images-- and Phonegap has a G-Calibration sensor api I can use.... but Is there a straight forward way through Phonegap to auto-detect orientation?
the problem is that the exif data (which contains the orientation among other things) is not passed by the plugin.
For this reason you need to try to understand which "way" the picture was taken.
Worst case, allow the user to rotate it.