image-sequencer icon indicating copy to clipboard operation
image-sequencer copied to clipboard

[WIP] Fisheye for GIF

Open ataata107 opened this issue 5 years ago • 13 comments

Concerns #1470

Currently in this PR src/modules/FisheyeGl/Module.js the method setImage of distorter is called after all the steps of extramanipulation is called because of being a callback I guess. Is there any way to execute setImage in each call of extramanipulation?

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • [ ] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm test
  • [ ] code is in uniquely-named feature branch and has no merge conflicts
  • [ ] PR is descriptively titled
  • [ ] ask @publiclab/is-reviewers for help, in a comment below
  • [ ] Insert-step functionality is working correct as expected.

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part Thanks!

ataata107 avatar Jan 13 '20 21:01 ataata107

@HarshKhandeparkar can you help me out in this one?

ataata107 avatar Jan 13 '20 21:01 ataata107

Codecov Report

Merging #1489 into main will increase coverage by 10.41%. The diff coverage is 62.31%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1489       +/-   ##
===========================================
+ Coverage   55.11%   65.53%   +10.41%     
===========================================
  Files         117      132       +15     
  Lines        2344     2742      +398     
  Branches      360      430       +70     
===========================================
+ Hits         1292     1797      +505     
+ Misses       1052      945      -107     
Impacted Files Coverage Δ
examples/lib/scopeQuery.js 18.51% <ø> (ø)
src/Modules.js 100.00% <ø> (ø)
src/modules/WebglDistort/Module.js 2.29% <0.00%> (ø)
src/ui/SetInputStep.js 12.90% <0.00%> (-1.39%) :arrow_down:
src/modules/ColorHalftone/Module.js 3.63% <3.63%> (ø)
examples/lib/defaultHtmlStepUi.js 11.35% <4.08%> (-0.85%) :arrow_down:
examples/lib/intermediateHtmlStepUi.js 11.11% <5.55%> (+0.94%) :arrow_up:
src/modules/FisheyeGl/Module.js 18.18% <19.23%> (+5.68%) :arrow_up:
examples/lib/insertPreview.js 13.15% <20.00%> (-0.36%) :arrow_down:
src/util/getImageDimensions.js 20.00% <20.00%> (ø)
... and 100 more

codecov[bot] avatar Jan 13 '20 21:01 codecov[bot]

output fisheye-gl

input SampleGIFImage_40kbmb (1)

ataata107 avatar Jan 16 '20 22:01 ataata107

it is only rendering the first frame whereas for the rest it renders white frame. Any reason why this might be happening

ataata107 avatar Jan 16 '20 22:01 ataata107

fisheye-gl (1) Wohoo it is working now i guess only issue is the output is rotated by 90 deg

ataata107 avatar Jan 16 '20 23:01 ataata107

wow! Great work!

On Thu, Jan 16, 2020 at 6:02 PM Shazeb Ata [email protected] wrote:

[image: fisheye-gl (1)] https://user-images.githubusercontent.com/32903329/72570089-ee98a680-38e1-11ea-9e20-b23c6a191ecb.gif Wohoo it is working now i guess only issue is the output is rotated by 90 deg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/pull/1489?email_source=notifications&email_token=AAAF6J5UJBI32Q2B7HJ32VTQ6DRPDA5CNFSM4KGJGNIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJF3PXI#issuecomment-575387613, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF6J2X2KYPUC5CQDCS6JTQ6DRPDANCNFSM4KGJGNIA .

jywarren avatar Jan 16 '20 23:01 jywarren

Apparently there is a need to take transpose if the source is gif (dont know why that is happening) but now the code is working perfectly for gif and normal images

Edit1: It is only working well for gifs having same dimension along both axis. The main issue is that the pixels get rotated .

ataata107 avatar Jan 17 '20 10:01 ataata107

Solved for all kinds of gif @HarshKhandeparkar. We need to pass dataurl as it is instead of using canvas to get the url. Wow this issue was a good one

ataata107 avatar Jan 17 '20 13:01 ataata107

You already completed this? Wow.

On Fri, 17 Jan, 2020, 7:09 PM Shazeb Ata, [email protected] wrote:

Solved for all kinds of gif @HarshKhandeparkar https://github.com/HarshKhandeparkar. We need to pass dataurl as it is instead of using canvas to get the url. Wow this issue was a good one

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/pull/1489?email_source=notifications&email_token=AIJI5HYCWGLF6YQYCJTXAHDQ6GYIDA5CNFSM4KGJGNIKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHWQMI#issuecomment-575629361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJI5HYGZLEWTFPHUB7N2ETQ6GYIDANCNFSM4KGJGNIA .

harshkhandeparkar avatar Jan 17 '20 13:01 harshkhandeparkar

Do I need to refactor it?

ataata107 avatar Jan 17 '20 23:01 ataata107

Please rebase it to fix the conflicts. Ty!

harshkhandeparkar avatar Jan 19 '20 07:01 harshkhandeparkar

Ok I changed the PixelManipulation

ataata107 avatar Jan 21 '20 20:01 ataata107

gitpod-io[bot] avatar Jul 08 '20 05:07 gitpod-io[bot]