xmar / 360Transformations

67 stars 16 forks source link

Viewport from 360 video frame. #23

Open ddrmorais opened 6 years ago

ddrmorais commented 6 years ago

Dear all,

I am working in a project that I need to extract a viewport from a 360 video frame and I have seen in the previous issues the LayoutFlatFixed class deals with this topic.
However, I have looked for in the folder of the project transformation/MainProject/src and I did not find any case that LayoutFlatFixed is used.
Could you please suggest anything to me?

Regards,

Dario
xmar commented 6 years ago

Hi Dario,

The LayoutFlatFixed is never directly used in the code, as any other concrete Layout actually. Only calls to the base class "Layout" are made in the main function. The "Layout" base class define an interface to manipulate any layout without the need to care about its actual type. The main function call a function defined in MainProject/inc/ConfigParser.hpp to instantiate the concrete Layout and that return a pointer of type "Layout" losing the information about the actual type.

If you want to extract viewport, you can also use the layout of type "viewport". It perform a gnomonic projection.

The examples 7 (https://github.com/xmar/360Transformations/blob/master/transformation/examples/Config_7.ini) give you a configuration file that extract a viewport at a static position using the "viewport" layout. If you want to use the facebook flatfixed projection, you can use the type "flatFixed" instead of "viewport". The file MainProject/inc/ConfigParser.hpp defines how a type in the configuration file is translated into a class in the C++ code.

Regards,

Xavier

ddrmorais commented 6 years ago

Hi Xavier,

   Thank you very much for your information. I need to study the code to understand the details you have sent me. 
   Regards,

Dario