|
1 | 1 | _________________________________ |
2 | | - Version: 1.1.4 |
| 2 | + Version: 1.1.5 |
3 | 3 | Author: ES Alexander |
4 | | - Release Date: 11/Oct/2020 |
| 4 | + Release Date: 17/Oct/2020 |
5 | 5 | _________________________________ |
6 | 6 |
|
7 | 7 | # About |
@@ -134,9 +134,32 @@ with VideoReader('my_vid.mp4', auto_delay=False, skip_frames=10, |
134 | 134 | vid.headless_stream() |
135 | 135 | ``` |
136 | 136 |
|
137 | | -### Advanced Example (something_fishy.py) |
138 | | -Copy the `names.txt` file to where you want to create your gallery (or create your |
139 | | -own `names.txt` with one name per line, of your friends and family for example), |
140 | | -and run `python3 -m pcv.something_fishy` to run the example. There are several |
141 | | -generally useful processing techniques included, so take a look through the code |
142 | | -and find the functionality that's most interesting to you to explore and modify. |
| 137 | +### Advanced Examples |
| 138 | +Check the `pcv/examples` folder for some examples of full programs using this library. |
| 139 | + |
| 140 | +#### Something Fishy |
| 141 | +This example is a relatively basic augmented reality example, which creates a tank of |
| 142 | +fish that swim around on top of a video/webbcam feed. You can catch the fish (click and |
| 143 | +drag a 'net' over them with your mouse), or tickle them (move around in your webcam feed). |
| 144 | +There are several generally useful processing techniques included, so take a look |
| 145 | +through the code and find the functionality that's most interesting to you to explore |
| 146 | +and modify. |
| 147 | + |
| 148 | +To run the example use `python3 -m pcv.examples.something_fishy`, or optionally specify |
| 149 | +the path to a newline separated text file of names (of your friends and family for |
| 150 | +example), and run with `python3 -m pcv.examples.something_fishy path/to/names.txt`. |
| 151 | + |
| 152 | +#### Video Switcher |
| 153 | +This was made in response to a question from u/guillerubio on reddit, to show how to |
| 154 | +efficiently read multiple videos simultaneously while only displaying one, and switching |
| 155 | +between videos based on what's happening in a webcam feed. |
| 156 | + |
| 157 | +The current video is switched out when the camera is covered/uncovered. Switching is |
| 158 | +performed intelligently by only actually reading frames from a single 'active' video |
| 159 | +at a time. The `VideoSwitcher` class allows tracking along all the videos simultaneously |
| 160 | +based on how many frames have occurred since they were last active, as well as just |
| 161 | +resuming from where each one left off when it was last active. When a video ends it gets |
| 162 | +started again (in an infinite loop). |
| 163 | + |
| 164 | +To run the example use `python3 -m pcv.examples.cam_video_switch` while in a directory |
| 165 | +with the `.mp4` files you want to switch between. |
0 commit comments