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

Make Fisheye-gl module compatible with nodejs #542

Closed
jywarren opened this issue Dec 13, 2018 · 18 comments
Closed

Make Fisheye-gl module compatible with nodejs #542

jywarren opened this issue Dec 13, 2018 · 18 comments

Comments

@jywarren
Copy link
Member

This module uses webgl, which isn't available in Node, so let's try to use one of these libraries to make this possible:

https://github.com/publiclab/image-sequencer/tree/main/src/modules/FisheyeGl

This lib is a pure-JavaScript implementation of OpenGL, so it could work on servers without a GPU: https://github.com/Overv/JSGL

This one, i believe, would just make the GPU accessible to Node, so is less useful but still OK: https://github.com/stackgl/headless-gl

This could then open up the possibility of making a perspective-distort module based on:

https://github.com/jywarren/webgl-distort

@gitmate gitmate bot added the module New Module idea label Dec 13, 2018
@gitmate
Copy link

gitmate bot commented Dec 13, 2018

GitMate.io thinks the contributor most likely able to help you is @ccpandhare.

Possibly related issues are #27 (add fisheyegl module), #200 ("Meta" modules -- modules made of other sequences of modules), #108 (Math Module), #112 (Scale module), and #434 (Rotate module).

@Divy123
Copy link
Member

Divy123 commented Dec 16, 2018

Is this issue still open? I would like to work upon it.

@jywarren
Copy link
Member Author

jywarren commented Dec 16, 2018 via email

@Divy123
Copy link
Member

Divy123 commented Dec 21, 2018

@jywarren I was going through with the first link as provided above by you but I found that there was no method for taking an image as an input and always requires an html 'div' to work with.
So, can you please guide me on this?
Should I go on with the second one?
cc: @tech4GT

@jywarren
Copy link
Member Author

Ah, you mean JSGL? Hmm. Would it be possible to run it in phantomjs even in NodeJS - using a div still but not needing a browser? Maybe there's some questions/docs about that in the repo issues?

@Divy123
Copy link
Member

Divy123 commented Dec 26, 2018

As of now I saw phantomjs development is suspended. So, cool, I will find a way to figure it out.
Thanks @jywarren .

@jywarren
Copy link
Member Author

jywarren commented Dec 26, 2018 via email

@tech4GT
Copy link
Member

tech4GT commented Dec 26, 2018

Ohh I really like the idea of running it in a headless browser, this can enable running any browser specific feature in node as we go! Very neat!! :)

@Divy123
Copy link
Member

Divy123 commented Dec 26, 2018

@jywarren Its because they are receiving less contributions these days. So I guess we should not rely on it. Also I explored JSDOM for this but it requires Node v8 or newer.

@jywarren
Copy link
Member Author

jywarren commented Jan 2, 2019 via email

@Divy123
Copy link
Member

Divy123 commented Jan 16, 2019

@jywarren @tech4GT Sorry this issue is taking too much time but I would like to mention that almost all the libraries or modules I saw for this are using node v6+ .
So if we can change out travis can be configured to work with node v6+.
Would like to know your opinion please.

@jywarren
Copy link
Member Author

jywarren commented Jan 16, 2019 via email

@Divy123
Copy link
Member

Divy123 commented Jan 17, 2019

Ya sure.

@aashna27
Copy link

@Divy123 please give me sometime I ll search on this and then will let you know.

@Divy123
Copy link
Member

Divy123 commented Jan 25, 2019

Thanks @aashna27 .
@jywarren I have made some temporary changes to the fisheyegl.js file in src folder in fisheyegl module for fisheye correction.
Please have a look
https://dpaste.de/H3Kf
What I am stuck at is I am using gl and I think it does not support gl.texImage2D function.
Any suggestions please?

@Divy123
Copy link
Member

Divy123 commented Jan 25, 2019

Also I have tries using node-canvas apart from jsdom but that too does not support webGl.
Can you please help me @jywarren ?

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Mar 16, 2019

Can be discussed in #216

@harshkhandeparkar
Copy link
Member

#216 is pinned and discusses the same thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants