You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/static/tutorials/video/index.html
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ <h3>Live Video</h3>
55
55
<li><strong>240:</strong> The height of the video.</li>
56
56
</ul>
57
57
58
-
There are some cases, however, where the above will not do. For example, what if you have multiple cameras attached to your computer. How do you select the one you want to capture? In addition, in some rare cases, you might also want to specify a frame rate from the camera. For these cases, Processing will give you a list of all possible camera configurations via <tt>Capture.list()</tt>. You can display these in your message console, for example, by saying:<br/>
58
+
There are some cases, however, where the above will not do. For example, what if you have multiple cameras attached to your computer. How do you select the one you want to capture? In addition, in some rare cases, you might also want to specify a frame rate from the camera. For these cases, Processing will give you a list of all possible camera configurations via <tt>Capture.list()</tt>. You can display these in your message console, for example, by saying:<br/>
59
59
<pre>
60
60
printArray(Capture.list());
61
61
</pre>
@@ -107,7 +107,7 @@ <h3>Live Video</h3>
107
107
<strong>Step 6. Display the video image.</strong>
108
108
<br/><br/>
109
109
This is, without a doubt, the easiest part. You can think of a <tt>Capture</tt> object as a <tt>PImage</tt> that changes over time, and, in fact, a <tt>Capture</tt> object can be utilized in an identical manner as a <tt>PImage</tt> object.
Displaying recorded video follows much of the same structure as live video. Processing’s video library accepts most video file formats; for specifics, visit the <tt>Movie</tt><ahref="https://www.processing.org/reference/libraries/video/Movie.html">reference</a>.
231
-
<br/><br/>
230
+
Displaying recorded video follows much of the same structure as live video. Processing’s video library accepts most video file formats; for specifics, visit the <tt>Movie</tt><ahref="https://www.processing.org/reference/libraries/video/Movie.html">reference</a>.<br/><br/>
231
+
232
232
<strong>Step 1. Instead of a Capture object, declare a Movie object.</strong>
233
233
<pre>
234
234
Movie movie;
@@ -269,7 +269,6 @@ <h3>Recorded video</h3>
269
269
<pre>
270
270
image(movie, 0, 0);
271
271
</pre>
272
-
273
272
The following code shows the program all together:<br/>
274
273
<pre>
275
274
import processing.video.*;
@@ -373,7 +372,8 @@ <h3>Software mirrors</h3>
373
372
I can now capture a video image that is 80 × 60. This is useful because capturing a 640 × 480 video from a camera can be slow compared to 80 × 60. I only want to capture the color information at the resolution required for the sketch.
For every square at column <tt>i</tt> and row <tt>j</tt>, I look up the color at pixel <tt>(i, j)</tt> in the video image and color itaccordingly. See the following example with the new parts in bold:<br/>
375
+
<br/><br/>
376
+
For every square at column <tt>i</tt> and row <tt>j</tt>, I look up the color at pixel <tt>(i, j)</tt> in the video image and color it accordingly. See the following example with the new parts in bold:<br/>
377
377
<pre>
378
378
// Size of each cell in the grid, ratio of window size to video size
0 commit comments