preview

Android: how to display camera preview with callback?

跟風遠走 提交于 2019-11-27 12:29:11
What I need to do is quite simple, I want to manually display preview from camera using camera callback and I want to get at least 15fps on a real device. I don't even need the colors, I just need to preview grayscale image. Images from camera are in YUV format and you have to process it somehow, which is the main performance problem. I'm using API 8. In all cases I'm using camera.setPreviewCallbackWithBuffer(), that is faster than camera.setPreviewCallback(). It seems that I cant get about 24 fps here, if I'm not displaying the preview. So there is not the problem. I have tried these

is it possible to preview local images before uploading them via a form?

 ̄綄美尐妖づ 提交于 2019-11-27 12:27:21
To be more specific, I want to use a form with one or more file input fields used for images. When those fields are changed, I'd like to show a preview of the associated image, before sending the data to the server. I've tried a number of javascript approaches, but I always run into security errors. I wouldn't mind using java or flash, as long as the solution degraded gracefully for those users who didn't have them. (They wouldn't get previews, and they wouldn't get an annoying 'install this thing' either.) Has anyone done this in a simple, reusable way? P.S. I know there's a sandbox, but does

iPhone SDK - How to disable the picture preview in UIImagePickerController?

懵懂的女人 提交于 2019-11-27 11:58:14
Is there any way to disable the image preview after taking a picture with the UIImagePickerController? I want to dismiss the ImagePicker as soon as the user pressed the shutter release button. erastusnjuki I asked a similar question here My solution was to create a customized view on top of the default UIImagePickerControllerView. I downloaded the example Augmented Reality Then you can use the OverlayView.m and OverlayView.h by adding them to your project: I made the custom picker toolbar, picker and overlayView global so that I can access them anywhere in the project. In your ViewController.h

Camera Preview is too dark in low light android

六月ゝ 毕业季﹏ 提交于 2019-11-27 07:08:16
问题 My camera app preview is too dark in low light. If I open my google camera it will increase brightness inside the preview so that our face is visible to take photos. But my preview is completely dark. I have handled the brightness and lightsensor. My Lightsensor works when is some light. I need to make preview is visible. Let me what should I have to handle? public void initialBrightness() { try { brightnessMode = Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS

How to get raw preview data from Camera object at least 15 frames per second in Android?

半城伤御伤魂 提交于 2019-11-27 06:14:30
I need to obtain raw preview data from Camera object at least 15 frame per second , but I can only get a frame in 110 milliseconds which means I can get only 9 frames per second. I brief my code below. Camera mCamera = Camera.open(); Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewFrameRate(30); parameters.setPreviewFpsRange(15000,30000); mCamera.setParameters(parameters); mCamera.addCallbackBuffer(new byte[dataBufferSize]); //dataBufferSize stands for the byte size for a picture frame mCamera.addCallbackBuffer(new byte[dataBufferSize]); mCamera.addCallbackBuffer

C# - on mouseover at taskbar, a preview is generated. how can i achieve this by C# coding

坚强是说给别人听的谎言 提交于 2019-11-27 02:28:03
问题 I am developing a winForm application in which i am list all the running processes. on mouseover of any process, i want preview window like (In Windows 7, when you mouse over an application in your task bar, a preview is generated showing the contents of the application window.) See Image. Any idea how to achieve this, i am not able to get it. Any suggestion will be helpful. Thanks.. 回答1: full example at this site You need two functions : [DllImport("dwmapi.dll")] static extern int

Android camera preview is dark

喜欢而已 提交于 2019-11-27 02:02:06
问题 I am trying to create a custom camera app. I followed the Android Developer example from here with minor tweaks. However, my camera preview turns out to be rather dark. On the other hand, the stock camera gives a much brighter preview. I have tried several settings to make it work better but it seems none of them are having any impact. Relevant code is posted here. CameraActivity (Main) protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R

Camera preview image data processing with Android L and Camera2 API

老子叫甜甜 提交于 2019-11-26 21:30:41
I'm working on an android app that is processing the input image from the camera and displays it to the user. This is fairly simple, I register a PreviewCallback on the camera object with the setPreviewCallbackWithBuffer . This is easy and works smoothly with the old camera API public void onPreviewFrame(byte[] data, Camera cam) { // custom image data processing } I'm trying to port my app to take advantage of the new Camera2 API and I'm not sure how exactly shall I do that. I followed the Camera2Video in L Preview samples that allows to record a video. However, there is no direct image data

When does Android take its recent apps switcher screenshot?

ぃ、小莉子 提交于 2019-11-26 21:14:37
问题 I am developing an app that has private information and should not display a real screenshot in Android's recent app switcher. I've tried a variation of this solution, by setting the content view to an ImageView inside the onPause function, but it seems that the operating system takes a screenshot before the content view is changed to the custom image. I am also aware of setting the window's layout parameter flags to secure, making the screenshot completely white, but I'd hope that there

Android “tools” namespace in layout xml documentation

谁说胖子不能爱 提交于 2019-11-26 19:43:45
问题 Per the question here, What's "tools:context" in Android layout files? The 'tools' namespace reference (xmlns:tools="http://schemas.android.com/tools") has begun to appear in my layouts recently, and I want to know more. The original post only described the 'tools:context' attribute, but I have also noticed usage of the "tools:listitem" attribute appearing when I have designated a preview layout item for a listview, i.e. <ListView android:id="@+id/lvCustomer" tools:listitem="@layout/customer