Skip to content

osc controls to modify video scale and projection warping in realtime…#36

Open
ibiltari wants to merge 2 commits into
x42:masterfrom
stagesoft:warp_scale_osc_opengl
Open

osc controls to modify video scale and projection warping in realtime…#36
ibiltari wants to merge 2 commits into
x42:masterfrom
stagesoft:warp_scale_osc_opengl

Conversation

@ibiltari
Copy link
Copy Markdown
Contributor

Finally i implemented scale modifying opengl vertex position and perspective projection through homography calculation and applying it to the opengl matrix, (should be perspective correct).

I created the following controls (osc only for the moment):

/jadeo/art/xscale f "modify the x scale of the video, 1.0 = no change, positive to scale up, negative down"
/jadeo/art/yscale f "modify the y scale of the video"

/jadeo/art/corners (8 floats) "x,y,x,y,x,y,x,y corner value to add to each "
(that's why i have created also individual corner controls, i encountered in some softwares is not easy to work with such array, easier with 2 float arrays)

/jadeo/art/corner1 ff "x,y corner 1, displacement, 0= no change"
/jadeo/art/corner2 ff "x,y corner 2, displacement, 0= no change"
/jadeo/art/corner3 ff "x,y corner 3, displacement, 0= no change"
/jadeo/art/corner4 ff "x,y corner 4, displacement, 0= no change"

They are activated with a new configure option --enable-warp, i have put all my new code under '#ifdef WARP' and not modified anything outside that

@x42
Copy link
Copy Markdown
Owner

x42 commented Feb 29, 2020

Wow, that looks good. I'll give it a go later this week-end!

Comment thread src/xjadeo/homography.h Outdated
/*
* homography.h
*
* based on code from arturo castro
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What license does this code have? Can it be used in terms of the GPL?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arturo castro is one of the developers of OpenFrameworks, he posted the code this is based on in the OF forum, so i asume it has the license of OpenFrameworks (Mit license)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify that and add the license boilerplate?
MIT is fine (compatible with xjadeo's GPL)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it on github and it has GNU Affero General Public License v3.0, so i respected that and added reference to the repository, along the one to the forum that also was there.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AGPL is a problem.

The code could be linked with xjadeo's GPLv2 after upgrading the project to GPL version 3, but using it as compile-time header is not allowed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know about that, i have to review these new versions of the GPL. So, this code cannot be included because Xjadeo doesn't use AGPL? Then if i understand correctly to include this code i should have to make it into a library that has to be distributed under AGPL3.0 and then it can be included only in AGPL projects but could be linked by GPL3.0 projects.

Its a bit messi, and then, that library could not be distributed with a GPL3 project, should be hosted has a separate project? i am correct?

Perhaps i should try finding another source for homography calculation, i know it is included in different open source projects, (opencv to say one.. should check license).

Any suggestion?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm asking around. it might be possible to just use it as C file, compile it into a dedicated .o object and link it.

Since the rest of xjadeo is GPLv2+ then product would then be AGPLv3 when configured with --enable-warp.

Copy link
Copy Markdown
Owner

@x42 x42 Mar 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alas, it's not so easy :(

A conversion on #gnu IRC points out that the resulting binary cannot be distributed:

if you modify the gplv2 work to include the agplv3 work, then you already cannot distribute the result.

To take advantage of the limited compatibility between agplv3 and gplv3 you need to upgrade. otherwise you simply don't have the option. Copyleft licenses are by nature mutually incompatible with each other.

This would mean that all of xjadeo would have to be explicitly relicensed under the GPLv3 first.

Also it was noted that the code findHomography has some references to code copied from "Multiple View Geometry in Computer Vision 2ed Hartley R. and Zisserman A." That is (C) and unlikely to be in terms of the AGPL.

I guess you're fine for the art-project (as long as you don't distribute the binary). For that we will eventually have to re-do the homography math.

@ibiltari
Copy link
Copy Markdown
Contributor Author

ibiltari commented Mar 4, 2020

Thank you for you time. I tried contacting Arturo to see what he has to say about this, because such code is been added to Openframeworks with is MIT license...

Anyway this is for a project that we want to re-distribute, it will use Xjadeo as the video player so i will like the licenses to be as compatible as posible so i will look to take it from other sources with other licenses or remaking the mat code.

@ibiltari ibiltari force-pushed the warp_scale_osc_opengl branch 2 times, most recently from f442a74 to ea37fe0 Compare April 28, 2020 21:29
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

Successfully merging this pull request may close these issues.

2 participants