Skip to content

Commit 1d52f15

Browse files
committed
Updates to Video Tutorial
1 parent cc5697b commit 1d52f15

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed
-1.24 KB
Loading

content/static/tutorials/video/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h3>Live Video</h3>
5555
<li><strong>240:</strong> The height of the video.</li>
5656
</ul>
5757

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 />
5959
<pre>
6060
printArray(Capture.list());
6161
</pre>
@@ -107,7 +107,7 @@ <h3>Live Video</h3>
107107
<strong>Step 6. Display the video image.</strong>
108108
<br /><br />
109109
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.
110-
<br />
110+
<br /><br />
111111
<img src="imgs/fig_16_01_capture.png" class="tut" />
112112
<pre>
113113
image(video, 0, 0);
@@ -227,8 +227,8 @@ <h3>Live Video</h3>
227227

228228
<h3>Recorded video</h3>
229229
<p>
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> <a href="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> <a href="https://www.processing.org/reference/libraries/video/Movie.html">reference</a>.<br /><br />
231+
232232
<strong>Step 1. Instead of a Capture object, declare a Movie object.</strong>
233233
<pre>
234234
Movie movie;
@@ -269,7 +269,6 @@ <h3>Recorded video</h3>
269269
<pre>
270270
image(movie, 0, 0);
271271
</pre>
272-
273272
The following code shows the program all together:<br />
274273
<pre>
275274
import processing.video.*;
@@ -373,7 +372,8 @@ <h3>Software mirrors</h3>
373372
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.
374373
<br /><br />
375374
<img src="imgs/fig_16_05_pixelated.png" class="tut" />
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 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 />
377377
<pre>
378378
// Size of each cell in the grid, ratio of window size to video size
379379
int videoScale = 8;

0 commit comments

Comments
 (0)