Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crop a Video with four different coodinate pairs #142

Closed
papar22 opened this issue Mar 10, 2015 · 2 comments
Closed

Crop a Video with four different coodinate pairs #142

papar22 opened this issue Mar 10, 2015 · 2 comments

Comments

@papar22
Copy link

papar22 commented Mar 10, 2015

Hi all,

As most of you know, there is a module named "crop" in the video package of the Moviepy and it corresponds to crop a subpart of a video with all embedded frames and sounds. To this end, it needs two pair of cooridnates (the top-left and the bottom-rigth ones). Therefore, it crops a rectangle box. Now, I wanna do the perspective transformation on the video and crop it with four pair of coordinates (the top-left, the top-rigth, the bottom-rigth and the bottom-left). It would be appreciated if you give me any suggestions, as I looked for it on the net and didnot find anything.

P.s. if it is not a new issue, please simply delete the post.

bests,

@takosuke
Copy link

what you want to do would not be called crop, but 'corner pin' in a video effects suite, you will have to write your own I think. Search for matrix transformation algorithms, projective transformations, corner pin matrix...it seems to go by very different names. Here's some links I've found:
http://math.stackexchange.com/questions/296794/finding-the-transform-matrix-from-4-projected-points-with-javascript/339033#339033
http://compgroups.net/comp.graphics.algorithms/constructing-a-corner-pin-matrix/2050857

@keikoro
Copy link
Collaborator

keikoro commented Feb 25, 2017

Yeah, this is more of a (potential) feature request/special effects request. I'm closing this though due to a lack of response/activity on this rather old issue.

@keikoro keikoro closed this as completed Feb 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants