android-camera

First steps in creating a chroma key effect using android camera

拟墨画扇 提交于 2019-12-21 17:07:59
问题 I'd like to create a chroma key effect using the android camera. I don't need a step by step, but I'd like to know the best way to hijack the android camera and apply the filters. I've checked out the API and haven't found anything super definitive on how to manipulate data coming from the camera. At first I looked into using a surface texture, but I'm not fully aware how that helps or how to even use it. Then I checked out using a GLSurfaceView, which may be the right direction, but not

Open camera inside fragment

我的未来我决定 提交于 2019-12-21 09:25:03
问题 Is it possible to use camera in fragment like view, so that it wouldn't open another app and go away from my special app? I want something like SurfaceView with camera? 回答1: Yes it is, Check this link . Basically overwritting the SurfaceView and integrating the camera picture callback . example code : /* Surface on which the camera projects it's capture results. */ class CameraPreview extends SurfaceView implements SurfaceHolder.Callback { SurfaceHolder mHolder; Camera mCamera; public

Camera intent android

一笑奈何 提交于 2019-12-21 06:32:51
问题 When I begin the camera intent I give it a file name I would like it to use. When I get this on the phone it uses the phones default file name. Which is no help as I need the image name later in the app. Camera intent code... public void onClick(View view) { String currentDateTimeString = DateFormat.getDateInstance().format(new Date()); System.out.println(currentDateTimeString); filename = ("/sdcard/" + currentDateTimeString + ".jpg"); Intent intent = new Intent(MediaStore.ACTION_IMAGE

Using a ViewPager over a CameraPreview

浪尽此生 提交于 2019-12-21 06:25:24
问题 I've been trying to create a Camera Preview that displays a View Pager with several transparent images over the preview. But, I'm getting this error: 05-10 03:31:23.614: E/AndroidRuntime(674): FATAL EXCEPTION: main 05-10 03:31:23.614: E/AndroidRuntime(674): java.lang.NullPointerException 05-10 03:31:23.614: E/AndroidRuntime(674): at com.android.gs1.MainActivity$CameraPreview.surfaceCreated(MainActivity.java:102) 05-10 03:31:23.614: E/AndroidRuntime(674): at android.view.SurfaceView

Change camera resolution setting programmatically in android

旧时模样 提交于 2019-12-21 04:56:08
问题 I'm using the below code to open the camera. Is it possible to set the camera resolution to high programmatically? private void openDefaultCameraApp() { Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(i, CAPTURE_PHOTO_CONSTANT); } 回答1: You must add an MediaStore.EXTRA_OUTPUT to the intent. In the extra, you have to specify a Uri for the picture to be saved to. This will save the full resolution image, otherwise, it will just snap a small image.

Android Custom Camera - Crop image inside Rectangle

别等时光非礼了梦想. 提交于 2019-12-21 04:45:15
问题 I have a custom camera app which have a centered rectangle view, as you can see below: When I take a picture I want to ignore everything outside the rectangle. The view hasn't any connection with the Camera Preview or SurfaceView in my XML view, as follows: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <FrameLayout android:id="@+id/preview" android:layout_width="fill_parent" android:layout_height

Camera of any emulator not working

ⅰ亾dé卋堺 提交于 2019-12-21 04:37:09
问题 Friends I am facing this issue since so long but i am able to get any kind of solution to get working camera in emulator. I have gone through all the answer of the SO but none helped me uptill now. If i create any emulator with any api but in none of my emulator camera application does not work. So i am not able to test any of the application which contains camera functionality. I guess may be its happening because of the hardware configuration of my system. But i am not sure about it. I do

How to implement Camera functionality with extra options (like Panorama)?

北战南征 提交于 2019-12-21 03:43:27
问题 I am mainly interested in panorama option. Is there a way to open the native Camera app (the enhanced version), so the user can switch between normal photo and panorama view? Is it possible at all or should I stop trying? Here is the code that I am using right now: Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(i, CAMERA_REQUEST); This is what currently happens: And this is what I need to achieve: Thank you! 回答1: Apparently, it is not yet

Android MediaRecorder setOutPutFile() to stream using Socket

回眸只為那壹抹淺笑 提交于 2019-12-20 23:22:45
问题 I am developing an Android app that should be capable of streaming video to a local server on my network without storing it on SD card. For this I have made simple socket application in C# that listens to the specific IP:PORT On Android part, I had set the setOutputFile() to this IP:PORT using socket. This application starts perfectly on Android phone but it does not display preview and when I start recording it exits without any exception. It also do not send any data stream to the network.

Camera2 API - How to set long exposure times

╄→尐↘猪︶ㄣ 提交于 2019-12-20 20:03:06
问题 I'm trying to capture images with 30 seconds exposure times in my app (I know it's possible since the stock camera allows it). But SENSOR_INFO_EXPOSURE_TIME_RANGE (which it's supposed to be in nanoseconds) gives me the range : 13272 - 869661901 in seconds it would be just 0.000013272 - 0.869661901 Which obviously is less than a second. How can I use longer exposure times? Thanks in advance!. 回答1: The answer to your question : You can't. You checked exactly the right information and