0

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.

  • 1
    Welcome to Stack Overflow. Please take the **tour** (https://stackoverflow.com/tour) and read the information guides in the **help center** (https://stackoverflow.com/help). Users are much more likely to help if you (1) show some research effort on your own (Google and StackOverflow searches), (2) learn what are appropriate questions for this forum, (3) show your images and (4) provide a minimal, complete, and verifiable example to your specific problem. – fmw42 Nov 14 '19 at 17:55
  • You can use ImageMagick's -fx to do any computation you feel is appropriate on a point by point basis. – fmw42 Nov 14 '19 at 17:56
  • @fmw42 thank you for your help. I've been googling around for quite a while already about this topic, mainly about IM -this way I found out I can get the pixel coordinates for any pixel of any specific RBG hex code- and Blender, and I haven't found anything even close to what I'm looking for. It looks like -fx is a powerfull tool but I see no way in which it could help me (maybe projecting the equirectangular into rectilinear but that is already under control) However, please, If you provide me with any link or example you think could help me, It would be very much appreciated. – Wyatt Orador Nov 14 '19 at 18:38
  • No, I just thought you could use -fx to do your own computations for a few points. Otherwise, it is slow. But you seem to already have the computations going. – fmw42 Nov 14 '19 at 22:54

0 Answers0