Updated README
This commit is contained in:
parent
55e0e4b15d
commit
3e4424ec3b
1 changed files with 9 additions and 9 deletions
18
README.md
18
README.md
|
@ -12,15 +12,6 @@ go get github.com/AlexEidt/Vidio
|
|||
|
||||
The `Video` struct stores data about a video file you give it. The code below shows an example of sequentially reading the frames of the given video.
|
||||
|
||||
```go
|
||||
video := vidio.NewVideo("input.mp4")
|
||||
for video.Read() {
|
||||
// "frame" stores the video frame as a flattened RGB image
|
||||
frame := video.framebuffer // stored as: RGBRGBRGBRGB...
|
||||
// Video processing here...
|
||||
}
|
||||
```
|
||||
|
||||
```go
|
||||
type Video struct {
|
||||
filename string // Video Filename
|
||||
|
@ -39,6 +30,15 @@ type Video struct {
|
|||
}
|
||||
```
|
||||
|
||||
```go
|
||||
video := vidio.NewVideo("input.mp4")
|
||||
for video.Read() {
|
||||
// "frame" stores the video frame as a flattened RGB image
|
||||
frame := video.framebuffer // stored as: RGBRGBRGBRGB...
|
||||
// Video processing here...
|
||||
}
|
||||
```
|
||||
|
||||
## `Camera`
|
||||
|
||||
The `Camera` can read from any cameras on the device running Vidio. It takes in the stream index. On most machines the webcam device has index 0.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue