Questions tagged [capture]

capture is the process of converting a set of pixels on a screen into a bitmap image stored in memory

1376 questions
311
votes
18 answers

Capture Image from Camera and Display in Activity

I want to write a module where on a click of a button the camera opens and I can click and capture an image. If I don't like the image I can delete it and click one more image and then select the image and it should return back and display that…
Harsha M V
  • 50,335
  • 109
  • 326
  • 496
230
votes
2 answers

How to screenshot website in JavaScript client-side / how Google did it? (no need to access HDD)

I'm working on web application that needs to render a page and make a screenshot on the client (browser) side. I don't need the screenshot to be saved on the local HDD though, just kept it in RAM and send it to the application server later. I…
Paweł Szymański
  • 7,102
  • 6
  • 19
  • 18
140
votes
3 answers

How to capture stdout output from a Python function call?

I'm using a Python library that does something to an object do_something(my_object) and changes it. While doing so, it prints some statistics to stdout, and I'd like to get a grip on this information. The proper solution would be to change…
Nico Schlömer
  • 37,093
  • 21
  • 139
  • 189
131
votes
4 answers

Can I use an OR in regex without capturing what's enclosed?

I'm using rubular.com to build my regex, and their documentation describes the following: (...) Capture everything enclosed (a|b) a or b How can I use an OR expression without capturing what's in it? For example, say I want to capture either…
goggin13
  • 6,996
  • 6
  • 26
  • 43
96
votes
9 answers

Regex group capture in R with multiple capture-groups

In R, is it possible to extract group capture from a regular expression match? As far as I can tell, none of grep, grepl, regexpr, gregexpr, sub, or gsub return the group captures. I need to extract key-value pairs from strings that are encoded…
Daniel Dickison
  • 21,525
  • 12
  • 67
  • 88
86
votes
16 answers

Capturing image from webcam in java?

How can I continuously capture images from a webcam? I want to experiment with object recognition (by maybe using java media framework). I was thinking of creating two threads one thread: Node 1: capture live image Node 2: save image as…
Divide By Zero
  • 861
  • 1
  • 7
  • 3
62
votes
3 answers

How can I capture which direction is being panned using UIPanGestureRecognizer?

Ok so I have been looking around at just about every option under the sun for capturing multi-touch gestures, and I have finally come full circle and am back at the UIPanGestureRecognizer. The functionality I want is really quite simple. I have…
Brandon B.
  • 707
  • 2
  • 8
  • 9
61
votes
2 answers

Does [=] imply that all local variables will be copied?

When I write a lambda with [=], does it mean that all my local variables will be copied into members of the created struct or can I assume that only those will that are actually used in the lambda? For example: void f() { vector v(10000); …
Armen Tsirunyan
  • 120,726
  • 52
  • 304
  • 418
40
votes
2 answers

How to capture standard output of a shell command in elisp?

I want to run a shell command within Emacs and capture the full output to a variable. Is there a way to do this? For example, I would like to be able to set hello-string to "hello" in the following manner: (setq hello-string…
Ryan C. Thompson
  • 37,328
  • 27
  • 87
  • 147
39
votes
1 answer

Android > 4.0 : Ideas how to record/capture internal audio (e.g. STREAM_MUSIC)?

Some months ago, with Android ICS (4.0), I developed an android kernel module which intercepted the "pcmC0D0p"-module to fetch all system audio. My target is to stream ALL audio (or at least the played music) to a remote speaker via AirPlay. The…
Martin L.
  • 2,848
  • 5
  • 32
  • 56
37
votes
4 answers

How to tell a lambda function to capture a copy instead of a reference in C#?

I've been learning C#, and I'm trying to understand lambdas. In this sample below, it prints out 10 ten times. class Program { delegate void Action(); static void Main(string[] args) { List actions = new…
Eclipse
  • 42,854
  • 19
  • 110
  • 166
34
votes
4 answers

How do I capture the output from the ls or find command to store all file names in an array?

Need to process files in current directory one at a time. I am looking for a way to take the output of ls or find and store the resulting value as elements of an array. This way I can manipulate the array elements as needed.
fzkl
  • 887
  • 2
  • 11
  • 15
33
votes
2 answers

Android VpnService to capture packets won't capture packets

I been searching for my answer for a couple of hours now and I can't figure it out. Please help. What I want to do is to use the VpnService in Android to grab network packets like the application tPacketCapture I started by using the ToyVpn sample…
Juan Acevedo
  • 1,507
  • 2
  • 18
  • 37
33
votes
3 answers

Capture incoming traffic in tcpdump

In tcpdump, how can I capture all incoming IP traffic destined to my machine? I don't care about my local traffic. Should I just say: tcpdump ip dst $MyIpAddress and not src net $myIpAddress/$myNetworkBytes ... or am I missing something?
Ricky Robinson
  • 17,881
  • 35
  • 113
  • 172
32
votes
2 answers

Java generics "capture of ?"

I'm working with a TreeTable and when changing cell factory I am required to pass a Callback, TreeTableCell> where A is a class I am working with but I have no idea how to work with the "capture of…
kotycheese
  • 323
  • 1
  • 3
  • 6
1
2 3
91 92