android-camera

CameraX ImageAnalysis set TargetResolution smaller than 640x480

本秂侑毒 提交于 2020-08-10 20:00:31
问题 I am trying to improve face detection rate by givining a 480x360 image to the ImageAnalysis of CameraX. However the following code produces 640x480 image, which reduces detection to 10 fps. If I give 480x360 I can improve rate to 20. How can I get smaller target resolution and the defualt Is there away to show the image I got for image anaysis as the prweview. As oppose to previews usecase. This is so that face detection overaly will not have big lag with the preview. ImageAnalysis

Access camera functionality in Android webview?

狂风中的少年 提交于 2020-08-09 07:13:57
问题 I'm building a Native-Android/WebView-App thats code is hosted on a remote server (in HTML and Javascript). The Web App has a function that launches the phone's camera via a HTML form, input request: <form action="#" method="post" enctype="multipart/form-data" > <input name="image" type="file" accept="image/*" capture/> </form> This feature works perfectly well in the standard Android web browser but not in the Native App WebView browser. I have enabled the following permissions in the Native

Access camera functionality in Android webview?

流过昼夜 提交于 2020-08-09 07:13:28
问题 I'm building a Native-Android/WebView-App thats code is hosted on a remote server (in HTML and Javascript). The Web App has a function that launches the phone's camera via a HTML form, input request: <form action="#" method="post" enctype="multipart/form-data" > <input name="image" type="file" accept="image/*" capture/> </form> This feature works perfectly well in the standard Android web browser but not in the Native App WebView browser. I have enabled the following permissions in the Native

How to fix wrong rotation of photo from camera in flutter?

时间秒杀一切 提交于 2020-07-07 04:37:08
问题 I'm taking a photo with the newest camera plugin version and I'm using code from flutter example. This is how I pick a camera: final cameras = await availableCameras(); final firstCamera = cameras.first; This is inside init: _cameraController = CameraController( widget.camera, ResolutionPreset.medium, enableAudio: false, ); This is the rest of the relevant code: Future _takePhoto(BuildContext context) async { try { await _initializeControllerFuture; final path = join( (await

Android emulator camera custom image

风格不统一 提交于 2020-07-05 05:26:15
问题 Does anybody know is it possible to open some personal picture when emulator camera starts? I have an application which is based on image analysis and I would like when I click a button for camera that camera opens not that default Android emulator moving image. I want it to open some image which I set as a default image. So when I choose to take a picture it will show only that image and when I take a take a picture, that image will be saved to gallery, not Android default image. 回答1:

preview stretches in camera2 apis

◇◆丶佛笑我妖孽 提交于 2020-06-24 20:51:52
问题 Following are the screenshots when using texture view in camera2 apis.In full screen the preview stretches,but it works when using lower resolution(second image). How to use this preview in full screen without stretching it. 回答1: Below answer assumes you are in portrait mode only. Your question is How to use the preview in full-screen without stretching it Let's break it down to 2 things: You want the preview to fill the screen The preview cannot be distorted First you need to know that this

preview stretches in camera2 apis

二次信任 提交于 2020-06-24 20:51:27
问题 Following are the screenshots when using texture view in camera2 apis.In full screen the preview stretches,but it works when using lower resolution(second image). How to use this preview in full screen without stretching it. 回答1: Below answer assumes you are in portrait mode only. Your question is How to use the preview in full-screen without stretching it Let's break it down to 2 things: You want the preview to fill the screen The preview cannot be distorted First you need to know that this

Android org.webrtc.VideoRenderer.I420Frame arrays to PreviewCallback.onPreviewFrame byte[]

穿精又带淫゛_ 提交于 2020-06-22 22:42:11
问题 I keep hoping some code will appear on the internet, but getting nowhere ;) WebRTC incoming I420Frame object seems to have 3 arrays of yuvPlanes A typical Android camera app gets PreviewCallback.onPreviewFrame byte[] as a single array of bytes. Can someone help me in how to convert I420Frames yuvPlanes to a single byte[] array like PreviewCallback.onPreviewFrame byte[] YCbCr_420_SP (NV21)? For reference, VideoStreamsView.java has this code to render to OpenGL - but I just want it like camera

Android org.webrtc.VideoRenderer.I420Frame arrays to PreviewCallback.onPreviewFrame byte[]

橙三吉。 提交于 2020-06-22 22:40:15
问题 I keep hoping some code will appear on the internet, but getting nowhere ;) WebRTC incoming I420Frame object seems to have 3 arrays of yuvPlanes A typical Android camera app gets PreviewCallback.onPreviewFrame byte[] as a single array of bytes. Can someone help me in how to convert I420Frames yuvPlanes to a single byte[] array like PreviewCallback.onPreviewFrame byte[] YCbCr_420_SP (NV21)? For reference, VideoStreamsView.java has this code to render to OpenGL - but I just want it like camera

Android org.webrtc.VideoRenderer.I420Frame arrays to PreviewCallback.onPreviewFrame byte[]

核能气质少年 提交于 2020-06-22 22:38:30
问题 I keep hoping some code will appear on the internet, but getting nowhere ;) WebRTC incoming I420Frame object seems to have 3 arrays of yuvPlanes A typical Android camera app gets PreviewCallback.onPreviewFrame byte[] as a single array of bytes. Can someone help me in how to convert I420Frames yuvPlanes to a single byte[] array like PreviewCallback.onPreviewFrame byte[] YCbCr_420_SP (NV21)? For reference, VideoStreamsView.java has this code to render to OpenGL - but I just want it like camera