android-camera

Can an android.hardware.camera2.CaptureRequest be used with OpenCV?

那年仲夏 提交于 2021-02-18 20:26:55
问题 I've worked on this for days now. I have an OpenCV/JavaCameraView-based project I am trying to integrate with an Android android.hardware.camera2.CaptureRequest object I use to control the camera's sensitivity to light. The CameraBridgeViewBase.CvCameraViewListener2/JavaCameraView project works (I can see an image on the screen), and the CaptureRequest project works (see this, too), but combining the two technologies in a single project has proved a big problem. Has anyone gotten these two

Can an android.hardware.camera2.CaptureRequest be used with OpenCV?

。_饼干妹妹 提交于 2021-02-18 20:26:05
问题 I've worked on this for days now. I have an OpenCV/JavaCameraView-based project I am trying to integrate with an Android android.hardware.camera2.CaptureRequest object I use to control the camera's sensitivity to light. The CameraBridgeViewBase.CvCameraViewListener2/JavaCameraView project works (I can see an image on the screen), and the CaptureRequest project works (see this, too), but combining the two technologies in a single project has proved a big problem. Has anyone gotten these two

Accessing android flashlight(camera LED flash) with kivy/python

时光毁灭记忆、已成空白 提交于 2021-02-18 18:19:08
问题 I can't figure out how to access the led light on my android with python or kivy, I have tried installing python-for-android to be able to import the android module into my code but it's not the module can't be found. I cloned python-for-android as instructed here. I didn't install the ndk or sdk as per that page as I thought since kivy already uses them they were already installed. Can someone please point me in the right direction? 回答1: Yes, you can write this app in Kivy from the desktop,

Accessing android flashlight(camera LED flash) with kivy/python

会有一股神秘感。 提交于 2021-02-18 18:17:13
问题 I can't figure out how to access the led light on my android with python or kivy, I have tried installing python-for-android to be able to import the android module into my code but it's not the module can't be found. I cloned python-for-android as instructed here. I didn't install the ndk or sdk as per that page as I thought since kivy already uses them they were already installed. Can someone please point me in the right direction? 回答1: Yes, you can write this app in Kivy from the desktop,

Encrypt video on the fly from android camera

百般思念 提交于 2021-02-18 11:14:26
问题 I want to encrypt video on the fly that android camera captures. So I need to tell android MediaRecorder to write it video stream to my CipherOutputStream . The problem is MediaRecorder.setOutputFile() method accepts only FileDescriptor and there is no way to get encrypting file descriptor from CipherOutputStream. So my question is how can I either emulate FileDescriptor to receive data writes and do encryption manually or somehow convince MediaRecorder to stream video into CipherOutputStream

Why do I get null in data parmeter of onActivityResult

孤者浪人 提交于 2021-02-17 07:05:45
问题 I use the following code to take picture from the android camera, after taking the pic onActivityResult is called with data parameter equals NULL. Code - public void getpic(View v){ Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); // Ensure that there's a camera activity to handle the intent if (takePictureIntent.resolveActivity(getPackageManager()) != null) { // Create the File where the photo should go File photoFile = null; try { photoFile = createImageFile(); }

Textureview/Surface view for Camera preview - Android

佐手、 提交于 2021-02-11 05:12:41
问题 I am working on developing an Android applications that uses camera. To display the camera preview, I observed a lot of examples using surface view or texture view. Why are these preferred over using ImageView to display the camera preview? I have used Imageview to display the preview and it works fine. Thanks. 回答1: Please do not use ImageView for this. It is extremely inefficient, and I'd be surprised if you are able to produce high-resolution preview (1080p) with this approach. SurfaceView

Textureview/Surface view for Camera preview - Android

本秂侑毒 提交于 2021-02-11 05:09:31
问题 I am working on developing an Android applications that uses camera. To display the camera preview, I observed a lot of examples using surface view or texture view. Why are these preferred over using ImageView to display the camera preview? I have used Imageview to display the preview and it works fine. Thanks. 回答1: Please do not use ImageView for this. It is extremely inefficient, and I'd be surprised if you are able to produce high-resolution preview (1080p) with this approach. SurfaceView

Textureview/Surface view for Camera preview - Android

大兔子大兔子 提交于 2021-02-11 05:09:13
问题 I am working on developing an Android applications that uses camera. To display the camera preview, I observed a lot of examples using surface view or texture view. Why are these preferred over using ImageView to display the camera preview? I have used Imageview to display the preview and it works fine. Thanks. 回答1: Please do not use ImageView for this. It is extremely inefficient, and I'd be surprised if you are able to produce high-resolution preview (1080p) with this approach. SurfaceView

Different capture output size on certain camera resolutions in Android

北城余情 提交于 2021-02-08 23:43:55
问题 I am developing a custom camera application using the Android Camera2 API where you can switch between the different camera and video resolutions available in the phone. It also offers the possibility to take squared 1:1 pictures. To take the square pictures, I take a normal 4:3 picture and then crop it to maintain the 1:1. (So 4032x3024 would be 3024x3024). I noticed a problem when taking a 1:1 picture on certain resolutions, the output is slightly cropped (zoomed). This is the result of the