How to scale a distorted image cropped from a equirectangular pano?

  • Hi!
    I have a problem trying to place a crop from the original equirectangular pano.

    So, I have the cropped image dimensions and the position of the crop in the original equirectangular pano.


    I, calculated the ath, atv s like this:

    Code
    Crop upper left corner = ox, oy 
    Pano equirectangular dimensions = pw, ph
    ath = ((ox / pw) - 0.5)  * 360
    atv = ((oy /ph) -0.5) * 180

    That works just fine.

    I'm having trouble with the width and height.

    I found this in the documentation:

    Quote from krpano

    Note - when using distorted hotspots, then the size is relative to an internal base-size where 1000 pixel are covering a 90 degree field of view.

    So I tried this:

    Code
    width = (cw / pw) * 4000
    height = (ch /ph) * 2000


    Width is kinda close, height, not so much.
    I tried height = "prop", a bit better but no cigar.

    Well, I tried a bunch of different stuff, nothing worked.

    Please help out!

    Edited 2 times, last by robertl (July 9, 2017 at 2:10 AM).

  • After doing more research, I concluded it's not possible with the current Krpano.
    Seems it expects only rectilinear images.

    It would be nice to be able to use cropped equi images as distorted hotspots in the future.

  • Hi,

    even when that might be (or get) be possible, because of the required distortions equirectangular-crops would be only the low-quality solution.

    The better and higher-quality solution would be this:
    Example/Tutorial - Extract a Distorted Hotspot from any kind of Pano Image (with perfect pixel alignment)

    Thanks, found it and I'm successfully using it using it.
    I do have a small issue, but I'll post it in that thread.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!