-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adjust scaling with parameter #14
Comments
Awesome! I'll ad this part in tomorrow as well! This is coming together rather quickly!! Exciting!! |
yes it's super exciting to see it all happening :-)))))
…On Tue, May 28, 2019 at 2:36 PM Varun Gupta ***@***.***> wrote:
Awesome! I'll ad this part in tomorrow as well! This is coming together
rather quickly!! Exciting!!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAAF6J4AMT3KLT36S3JX7Q3PXV3P5A5CNFSM4HQF56N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWNBLUQ#issuecomment-496637394>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J23ARGQ6ZLF6CVA5E3PXV3P5ANCNFSM4HQF56NQ>
.
|
Okay I tried running this with node v10 to export a 11904x8928 Image and it is taking somewhere in the neighborhood of about 4-5 minutes on my machine! |
that's great - esp. compared to the 8000x14000 image that Ruby ran in 10
minutes.
However, it'll depend in part on how may sub-images it's made up of.
Another great reason to start benchmarking!
…On Tue, May 28, 2019 at 2:44 PM Varun Gupta ***@***.***> wrote:
Okay I tried running this with node v10 to export a 11904x8928 Image and
it is taking somewhere in the neighborhood of about 4-5 minutes on my
machine!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAAF6JYNVQ5HWFYTJRWCTMLPXV4O3A5CNFSM4HQF56N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWNCCMI#issuecomment-496640305>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J24PBTEXF2ENZLF5R3PXV4O3ANCNFSM4HQF56NQ>
.
|
Yes! I better sleep now but I think I can push everything we talked about tomorrow itself! 😄 |
go sleep! goodness! yikes i can't imagine what time it is there :-)
Great work today!!!
…On Tue, May 28, 2019 at 2:51 PM Varun Gupta ***@***.***> wrote:
Yes! I better sleep now but I think I can push everything we talked about
tomorrow itself! 😄
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAAF6J3SPRWBXRB2HPSCFTDPXV5J5A5CNFSM4HQF56N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWNCV7Y#issuecomment-496642815>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6JZXWY4W62YQSCIHSMLPXV5J5ANCNFSM4HQF56NQ>
.
|
Hi @tech4GT did the scaling code get added in and would you mind adding some brief docs? Thanks!! |
@jywarren The scaling part was still giving me trouble. I'll add the details in a couple of hours. |
Okay, here is the detailed explanation of the problem:
|
We may need to use the haversine formula if we're not already doing so to correctly scale: https://www.npmjs.com/package/haversine-distance |
Hmm here are the sections where scaling might be needed. We probably need a scale coefficient. image-sequencer-app/src/api/v2/util/converter-multiSequencer.js Lines 60 to 63 in 9afad91
I couldn't find a commit referencing scale, or code referencing a scale parameter. Is this in a feature branch somewhere? Can you open a PR? Thanks! We can refer to the matching section of code in mapknitter-exporter, which does the same thing but in Ruby and ImageMagick: https://github.com/publiclab/mapknitter-exporter/blob/main/lib/mapknitterExporter.rb#L251 |
Yeah, I was kind of trying this stuff out when we decided to circle back later. I couldn't really figure out how to convert the parameters using scale though, by looking at the ruby code! |
The npm module looks great! It might just make the job easier for us!! |
And now since the deployment stuff is figured out, this is all that remains I guess 😄 |
@jywarren Is there someone I can talk to maybe? Someone who worked on the ruby version, maybe they'll be able to better explain this part of the logic to me. I still can't really wrap my head around this! |
Probably myself... would you have time to join the Code Open Call tomorrow?
https://everytimezone.com/s/adff8f42
https://publiclab.org/opencall
Thanks, Varun!
…On Sun, Jul 7, 2019 at 10:27 AM Varun Gupta ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Is there someone I can talk to
maybe? Someone who worked on the ruby version, maybe they'll be able to
better explain this part of the logic to me. I still can't really wrap my
head around this!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14?email_source=notifications&email_token=AAAF6J24N7D2NXHTC3ZDMMTP6H4KDA5CNFSM4HQF56N2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLMRIY#issuecomment-509003939>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAF6J75YSS3G6TFWNXXHLLP6H4KDANCNFSM4HQF56NQ>
.
|
It’s in the evening, I think I can make it! Thanks! |
OK so placement is incorrect - but rotation and distortion are good. Let's then look at this segment of code: https://github.com/publiclab/mapknitter-exporter/blob/main/lib/mapknitterExporter.rb#L250-L282 |
We scale the output image with a provided
cm per pixel
value calledscale
or sometimesresolution
-- here is the relevant segment -- but also search forscale
orpxperm
in this file!https://github.com/publiclab/mapknitter-exporter/blob/c767780392342c109b26a887971b3ab6bcd98c94/lib/mapknitterExporter.rb#L125-L126
It's not super complex, it's just a scaling factor because we know the real-world dimensions of the images, and we know the pixel dimensions as well.
cc @tech4GT !
The text was updated successfully, but these errors were encountered: