Seamless Video in Panorama - Hotspot alignment issue

  • Hello,

    I have recently found krpano and purchased it and I am amazed at the things you can do with it. Now I'm trying to figure something out and I would appreciate if anyone could help out.

    I am trying to seamlessly incorporate a video hotspot into my panorama, similar to what the person was inquiring in this post:
    Life Action Effect with video

    I have tried shooting the video with a longer lens and also with my 8mm lens that I used to take the original panorama. When I use the 8mm lens I keep the camera on the tripod in exactly the same position for which I shot the panorama image and I crop the video to the area of interest.

    I understand that neither method can achieve perfect alignment since the longer lens does not have the same perspective, and for the 8mm, even though the 8mm lens has exactly the same perspective it cannot perfectly align because it is not projected and warped into the panorama... but the alignment is quite good if the subject of the video close to the middle or horizon of the panorama.

    Since the video is rectangular, it is easy to spot the misalignments along the straight edge of the video frame. I have provided an image to show what that looks like, with arrows to show where video edge is.

    To better hide the edge of the video, I displayed the panorama in Krpano and clipped out from my panorama the region where the video gets placed to create an image to be positioned as a hotspot image over the video and used an alpha channel to make transparent in the image only the area of the video that changes occur, this way masking the edge of the video. This works perfectly if I do not distort the image hotspot (distort="false"). Every pixel of the hotspot image aligns perfectly with the rest of the panorama. I have attached a jpg version of what this image looks like.

    My problem is not with the video player, but with the image hotspot.

    This is my problem:
    When my panorama is first displayed, everything is aligned perfectly. Because "distort=false" when I move the panorama, the hotspot image does not stay in its position in the panorama. But when I make "distort="true" the hotspot does not appear in the same location, and I am not able to align it again. Why in my code by only changing distort="false" to distort="True" does my hotspot image appear in a different location and is scaled completely differently, why does it not appear in the same location?

    Here is the code I use for the image that "masks" the edge of the video:
    <hotspot name="spot"
    url="VideoMask.png"
    keep="false"
    ath="-19.624749738715153" atv="13.652740974571804"
    zoom="false" distorted="false" details="8" flying="0"
    width="537" height="744"
    scale="1" scale9grid="" scalechildren="false" rotate="0"
    rx="0" ry="0" rz="6.896878842855646"
    edge="center" ox="" oy=""
    crop="" ondowncrop="" onovercrop=""
    visible="true" enabled="true" usecontentsize="false" handcursor="true" capture="true" children="true"
    zorder="3"
    alpha="1.00" blendmode="normal" effect="" smoothing="true"
    refreshrate="auto"
    onloaded=""
    onover=""
    onhover=""
    onout=""
    ondown=""
    onup=""
    onclick=""
    devices="all"
    editor=""
    />

    I have seen that it is possible to apply a mask directly to the video hotspot, however I was unsuccessful in getting a good result by applying a mask directly to the video hotspot. Also my video hotspot is distorted and it is not advised to used the mask property of a hotspot if it is distorted for performance reasons.

    Any ideas out there? Maybe I'm being to complicated and there is an easier way to accomplish what I'm trying to do?
    Thanks,
    -Rick.

Participate now!

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