video-capture

How to create a BitmapImage from a pixel byte array (live video display)

与世无争的帅哥 提交于 2019-11-28 05:09:00
I need to display live images on a WPF control. I'm looking for the fastest way to do this using WPF. I'm capturing images from a camera using its dll API ( AVT ). The image is writen by the dll and the camera rises a callback with an IntPtr to a Image struct called tFrame (described below). The pixel data is stored at the ImageBuffer propertie with is an InPtr to a byte array. I know how to create a Bitmap from the pixel byte array, but not a BitmapImage. So it is possible to create a Bitmap and then create a BitmapImagem from it. Here there is a way to create a BitmapImage from a Bitmap on

How to capture video in Android?

放肆的年华 提交于 2019-11-28 03:36:09
I would like to create a video recorder and so far haven't figured out how to set parameters in order to successfully go through MediaRecorder.prepare() method. Executing the following method public void start() throws IOException{ String state = android.os.Environment.getExternalStorageState(); if(!state.equals(Environment.MEDIA_MOUNTED)) { throw new IOException("SD card is not mounted. It is " + state + "."); } File directory = new File(path).getParentFile(); if(!directory.exists() && !directory.mkdirs()) { throw new IOException("Path to file could not be created."); } recorder

Android: Video recording output orientation flipped

别来无恙 提交于 2019-11-28 02:24:12
I have developed an app that can record video. When the recording starts the video is recorded in a rotated orientation. The video view while recording is flipped to the left. I cant figure out why its like that. Can someone help me with this issue. My codings are as follows: MainActivity.java: import android.app.Activity; import android.media.CamcorderProfile; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Environment; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.Button; import java.io.File

VerifiyAndSetParameter error when trying to record video

五迷三道 提交于 2019-11-28 01:45:41
I've been trying to create an app that records and uploads a video to a S3 bucket. I've been using (with a little altering) the Android capture video intent article . but when the recording is over, I get a list of errors. (I'm using a Galaxy S2 phone so it's supported). Code for CameraActivity: Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); fileUri = SavingMedia .getOutputMediaFileUri(SavingMedia.MEDIA_TYPE_VIDEO); path = fileUri.toString(); intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, 30); intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); intent.putExtra(MediaStore.EXTRA

Android - is there a way to define the video resolution when taking video from application?

不想你离开。 提交于 2019-11-28 01:40:56
问题 I am not familiar with android programming, I wish to know if there is a way to set the video resolution when it is filmed inside an android application ? Or, is there a way to reduce the resolution later. We need to reduce the file size of the video that we capture. Thanks Shani 回答1: There are three things you can control to manage the resulting file size when recording video. All three are available as methods in MediaRecorder class: Frame size (width x height). Use method setVideoSize(int

OpenCV: Reading image series from a folder

空扰寡人 提交于 2019-11-28 01:21:36
问题 I am trying to read a series of images from a folder using OpenCV's VideoCapture function. After some search on the internet, my current code is like this: cv::VideoCapture cap ( "C:\\Users\\Admin\\Documents\\Images\\%02d.jpg"); I was expecting to see that VideoCapture function should read all the images in that folder with names of two serial digits, like 01.jpg, 02.jpg, ..., 30.jpg . Someone told on the internet that the VideoCapture function should be ale to catch all of these images once

How to get web cam images in C#?

倾然丶 夕夏残阳落幕 提交于 2019-11-27 20:56:14
I'm working on online video conferencing project in C# and .Net4.0. I want a library or code which I can use for collecting web camera images per second in different form. I try this by using the AVICAP32, in which we send Messages for different purpose like copy or edit frames.but in this we have to pass a reference of picturebox while creating handler as given below: mCapHwnd = capCreateCaptureWindowA("0", 268435456 | 1073741824, 0, 0, 640, 480,picturebox1.Handle.ToInt32(), 0); Using these commands I'm able to capture images but the problem comes when I minimize the picturebox form. At that

How to apply filter to Video real-time using Swift

回眸只為那壹抹淺笑 提交于 2019-11-27 17:45:35
is possible to apply filter to AVLayer and add it to view as addSublayer ? I want to change colors and add some noise to video from camera using Swift and I don't know how. I thought, that is possible to add filterLayer and previewLayer like this: self.view.layer.addSublayer(previewLayer) self.view.layer.addSublayer(filterLayer) and this can maybe create video with my custom filter, but I think, that is possible to do that more effectively usign AVComposition So what I need to know: What is simplest way to apply filter to camera video output realtime? Is possible to merge

Creating thumbnail from local video in swift

穿精又带淫゛_ 提交于 2019-11-27 17:03:34
How to create thumbnail in swift from a local video file ? For example if the video file path is located here : file:///Users/Dev/Library/Developer/CoreSimulator/Devices/F33222DF-D8F0-448B-A127-C5B03C64D0DC/data/Containers/Data/Application/4BC62DBF-0108-453C-9324-5BC0E356FE24/tmp/trim.059D11E6-F0EF-43DB-9E97-CA4F1F95D6B6.MOV Thank you. Translated with some edits from: First frame of a video using AVFoundation var err: NSError? = nil let asset = AVURLAsset(URL: NSURL(fileURLWithPath: "/that/long/path"), options: nil) let imgGenerator = AVAssetImageGenerator(asset: asset) let cgImage =

Getting a snapshot from a webcam with Delphi

空扰寡人 提交于 2019-11-27 15:15:04
问题 I need to get a regular snapshot from a webcam in Delphi. Speed is not a problem (once a second is fine). I have tried demo code from based on stuff from http://delphi.pjh2.de but I can't get it to work. It compiles and runs OK but the callback function never fires. I don't have a real webcam but am running instead a simulator. The simulator works (I can see the video using Skype) but not with the test app. I don't really know where to start looking... Can anyone be bothered to try this code?