image-capture

How to capture the image and save it in sd card

白昼怎懂夜的黑 提交于 2019-11-27 03:00:49
问题 hey guys i am using the following code to access camera from my application. The application is able to access the camera i have also added a button whose onclicklistener adds this line of code :- camera.takePicture(mShutterCallback, mPictureCallbackRaw, mPictureCallbackJpeg); Now i dont know what happens but the application gets stuck i have to force close it and then i can not even access the native camera application. I think it leaves the application without releasing the Camera object.

Why does AVCaptureVideoOrientation landscape modes result in upside down still images?

被刻印的时光 ゝ 提交于 2019-11-27 01:59:24
问题 I am using AVFoundation classes to implement a custom camera in my app. I am only capturing still images, not video. I have everything working but am stumped by something. I take into account the device orientation when a still image is captured and set the videoOrientation of the video connection appropriately. A code snippet: // set the videoOrientation based on the device orientation to // ensure the pic is right side up for all orientations AVCaptureVideoOrientation videoOrientation;

How do I connect to a USB webcam in .NET? [closed]

邮差的信 提交于 2019-11-27 00:06:38
I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don't know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way? Eric Schoonover You will need to use Windows Image Acquisition (WIA) to integrate a webcam with your application. There are plenty examples of this readily available. Here is a C# Webcam User Control with source. Here are some more articles and blog posts from people looking to solve the

What is the best method to capture images from a live video device for use by a Java-based application?

爱⌒轻易说出口 提交于 2019-11-27 00:03:29
I am looking into an image processing problem for semi-real time detection of certain scenarios. My goal is to have the live video arrive as Motion JPEG frames in my Java code somehow . I am familiar with the Java Media Framework and, sadly, I think we can consider that an effectively dead API. I am also familiar with Axis boxes and, while I really like their solution, I would appreciate any critical feedback on my specific points of interest. This is how I define "best" for the purpose of this discussion: Latency - if I'm controlling the camera using this video stream, I would like to keep my

when take photo get - java.lang.Throwable: file:// Uri exposed through ClipData.Item.getUri()

风流意气都作罢 提交于 2019-11-26 22:53:19
问题 The Exception is: file:// Uri exposed through ClipData.Item.getUri() java.lang.Throwable: file:// Uri exposed through ClipData.Item.getUri() at android.os.StrictMode.onFileUriExposed(StrictMode.java:1618) at android.net.Uri.checkFileUriExposed(Uri.java:2341) at android.content.ClipData.prepareToLeaveProcess(ClipData.java:808) at android.content.Intent.prepareToLeaveProcess(Intent.java:7926) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1506) at android.app.Activity

How to capture image from custom CameraView in Android?

我与影子孤独终老i 提交于 2019-11-26 11:56:51
问题 i need to capture image from required portion of the screen . capture image from camera . at that time other screen content as it is . how is this possible ? 回答1: try to use Surface View for creating dynamic camera view and set in your required portion. following code try variables set Class level (Global) Button btn_capture; Camera camera1; SurfaceView surfaceView; SurfaceHolder surfaceHolder; public static boolean previewing = false; Following code in onCreate() method getWindow().setFormat

How do I connect to a USB webcam in .NET? [closed]

ぐ巨炮叔叔 提交于 2019-11-26 09:20:20
问题 I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don\'t know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way? 回答1: You will need to use Windows Image Acquisition (WIA) to integrate a webcam with your application. There are plenty examples of this readily available. Here is a C# Webcam User

What is the best method to capture images from a live video device for use by a Java-based application?

我的梦境 提交于 2019-11-26 09:17:37
问题 I am looking into an image processing problem for semi-real time detection of certain scenarios. My goal is to have the live video arrive as Motion JPEG frames in my Java code somehow . I am familiar with the Java Media Framework and, sadly, I think we can consider that an effectively dead API. I am also familiar with Axis boxes and, while I really like their solution, I would appreciate any critical feedback on my specific points of interest. This is how I define \"best\" for the purpose of

Images taken with ACTION_IMAGE_CAPTURE always returns 1 for ExifInterface.TAG_ORIENTATION on some Gingerbread devices

ぃ、小莉子 提交于 2019-11-26 02:29:27
问题 I had the orientation issue when working with ACTION_IMAGE_CAPTURE activity. I have used the TAG_ORIENTATION so that I would rotate the picture accordingly. But now we found that on some newer devices this doesn\'t work. In fact it returns 1 for all orientations. Here\'s the list of devices we observed this on; Samsung Infuse 4G (2.3.3) Samsung Galaxy SII X (2.3.5) Sony Xperia Arc (2.3.3) Interesting thing is that once this image is the gallery it shows up properly and if I select it, the TAG

How to capture UIView to UIImage without loss of quality on retina display

两盒软妹~` 提交于 2019-11-25 21:57:42
问题 My code works fine for normal devices but creates blurry images on retina devices. Does anybody know a solution for my issue? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage * img = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return img; } 回答1: Switch from use of UIGraphicsBeginImageContext to UIGraphicsBeginImageContextWithOptions (as documented on