apply transformation using `VideoReader`
- Dominant language
- C++
- Stars
- 2.5k
- Forks
- 232
- PR merge metrics
- No merged PRs in 30d
Description
Hi, I know that we can apply the arguments `width` and `height` to resize the read video frames when using `VideoReader`, however if we want to crop the video frame first (or any other transformation) then resize, I think currently there is no way to do this directly. Currently I used `.asnumpy()` to change it to a numpy array, and then cropped it. However I noticed that the performance is far worse than using `width` and `height` to resize directly (more than 6 hours difference in my dataset). But using `width` and `height` lacks the flexibility of applying some customize transformation on the video frames.
Thus I am wondering if its possible to ship an optional function arguments to the `VideoReader`. Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the VideoReader API and the existing width and height handling, then compare it with the current asnumpy() workflow described in the issue. Done means an optional transformation can be applied to video frames before resizing without requiring that conversion path, with the behavior and performance verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100