Reputation: 1
TL;DR - What I'm looking for
Given an equirectangular image and a list of (x,y) coords (clicks made by a user on the image), I'd like to get the smallest possible rectilinear image containing all the former coords and a list of (x',y') coords that represent the corresponding coords (mapping) of the same points in the rectilinear image.
My final goal:
I want to texture a face of an object with a rectilinear image extracted out a equirectangular one.
My current (smelly) approach:
User clicks on the equirectangular picture -actually the user clicks on a gnomic web visor that allows him to see it in a human friendly perspective- as many times as needed to select the desired part of the source equirectangular picture that will be ultimately used to texturize the face of an object.
Once those equirectangular coordinates are known, my ugly approach consist in:
1) Making a grayscale version of the source equirectangular picture.
2) Inserting some funny colourfull pixels in the spots clicked by the user.
3) Projecting the involved part of the grayscaled equirectangular picture into a rectilinear one and (and here comes the funny and unreliable part) using imagemagick to find the given coordinates/spots clicked by the user ending up with an equirectangular to rectilinear coordinates mapping.
NOTE: Cubemap is out of the equation. Mapping points from equirectangular to cubemap is trivial but the surfaces selected by the user rarely fit into any of the faces one gets out of a cubemap.
Upvotes: 0
Views: 259