capture

How to use custom video resolution when use AVFoundation and AVCaptureVideoDataOutput on mac

元气小坏坏 提交于 2020-01-03 10:43:50
问题 I need to process each frame of captured video frame, although AVCaptureDevice.formats provided so many different dimension of frame sizes, it seems AVCaptureSession only support those frame sizes defined in presets. I've also tried to set AVCaptureDevice.activeFormat before AVCaptureInputDevice or after, no matter what setting I set, if I set AVCaptureSessionPresetHigh in AVCaptureSession , it always give me a frame of 1280x720. Similar , If i set AVCaptureSessionPreset 640x480, then I can

How can I capture video from a webcam in java with an applet?

♀尐吖头ヾ 提交于 2020-01-03 05:42:28
问题 I am loking into capturing and streaming video over the network using a java applet. So far, it looks like JMF is outdated and FMJ won't be able to capture at any reasonable speed. Is there any other library that I can use to go about capturing and or streaming video from a webcam at at least 10-15 frames per second? 回答1: I have done this recently and had to write a JNI to capture the video and encode it or decode it. It is a pain because you have to write the JNI for each platform like

Can use casperjs login to facebook but capture to png only show nav bar

大兔子大兔子 提交于 2020-01-02 08:09:15
问题 Can use casperjs login to facebook but capture to png only show nav bar this my code: facebook.js casper.start("http://www.facebook.com/login.php", function(response) { if (this.exists('[name="lsd"]')) { this.page.evaluate(function(a,b) { document.querySelector("input[name='email']").value = a document.querySelector("input[name='pass']").value = b; document.querySelector("#login_form").submit(); console.log("Login submitted!"); },user_email,user_pass); } else { this.echo('[name="lsd"] not

Switch To Front Camera and Back Camera Android SurfaceView

泄露秘密 提交于 2020-01-02 04:46:07
问题 I want to use the switch camera function. Currently I have Developed a Camera Object That working fine for back-camera but not working for front-camera. And I am unable to find a solution for switching between front and back cameras. Here is My Code..! public class MyCamera extends Activity implements SurfaceHolder.Callback, Camera.ShutterCallback, Camera.PictureCallback { Camera mCamera; SurfaceView mPreview; String filePath; @Override public void onCreate(Bundle savedInstanceState) { super

C++ SetWindowsHookEx WH_KEYBOARD_LL Correct Setup

北城以北 提交于 2020-01-01 11:46:51
问题 I'm creating a console application in which I'd like to record key presses (like the UP ARROW). I've created a Low Level Keyboard Hook that is supposed to capture all Key Presses in any thread and invoke my callback function, but it isn't working. The program stalls for a bit when I hit a key, but never invokes the callback. I've checked the documentation but haven't found anything. I don't know whether I'm using SetWindowsHookEx() incorrectly (to my knowledge it successfully creates the hook

using out of scope variables in C++11 lambda expressions

廉价感情. 提交于 2019-12-31 20:30:30
问题 I'm playing with C++11 for fun. I'm wondering why this happens: //... std::vector<P_EndPoint> agents; P_CommunicationProtocol requestPacket; //... bool repeated = std::any_of(agents.begin(), agents.end(), [](P_EndPoint i)->bool {return requestPacket.identity().id()==i.id();}); Compilation terminates with this error: error: 'requestPacket' has not been declared Which is declared earlier in code. I tried ::requestPacke and it doesn't worked too. How can I use an external scope variable inside a

Screenshot while using the camera (Android)

喜你入骨 提交于 2019-12-30 07:21:08
问题 I'm trying to make a snapshot of my app. The problem I have is that this app is intented to be a augmented reality app and I have a view with some layers and the background layer is the camera view. I tried it by enabling and getting root view drawing cache but the result was a bitmap with a black background and the rest of the layers on it. Also, to get the camera os a background again I had to disable the cache and restart the camera. (i.e. How to programmatically take a screenshot in

opencv VideoCapture使用示例

余生颓废 提交于 2019-12-30 02:24:49
在centos7下验证VideoCapture功能。 1 opencv处理视频时要使用ffmpeg,这里使用添加源的方式安装,分为3步 1.1 先安装EPEL Release,使用其他的repo源,所以需要EPEL支持 yum install -y epel-release #如果出现缺少Code提示,可以: sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 #安装完成之后,可以查看是否安装成功 yum repolist 1.2 安装Nux-Dextop源 #导入一个Code sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro #安装nux-dextop 源 sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm #查看repo源是否安装成功 yum repolist 1.3 yum安装ffmpeg yum install -y ffmpeg yum install -y ffmpeg-dev 2 还要安装gtk库 yum install gtk+-devel gtk2-devel 3

Camera2 get continuous access to camera preview images

本秂侑毒 提交于 2019-12-29 07:13:22
问题 I want to extend an app from Camera1 to Camera2 depending on the API. One core mechanism of the app consists in taking preview pictures at a rate of about 20 pics per second. With Camera1 I realized that by creating a SurfaceView, adding a Callback on its holder and after creation of the surface accessing the preview pics via periodic setOneShotPreviewCallbacks. That was pretty easy and reliable. Now, when studying Camera2, I came "from the end" and managed to convert YUV420_888 to Bitmap

Cordova video capture - how can I save file it out to server?

佐手、 提交于 2019-12-25 14:48:08
问题 I'm successfully capturing a video stream via Cordova Video Capture, and the file is saved to something like file:///storage/emulated/... . However I'm stuck on how to save the file out to a remote server by sending its source code (blob data?) What I've tried ( path is the path to the saved video.) Attempt 1 This does return the file, but only as garbled text. If I set dataType: 'blob' , the callback never fires. Dom7.ajax({ //<-- I'm using Framework7, hence the Dom7 DOM/AJAX library url: