Teichmuller / Photo-Sphere-Viewer

Visualize Google Photo Sphere
1 stars 0 forks source link

Compile issues #1

Closed GenaWang closed 6 years ago

GenaWang commented 6 years ago

Hello, Thanks for your code. I want to complie your program in windows by Cmake. But when I compile it some errors occured. Here are the errors. 1 Could you give me some help?If I want to successfully compile the code I need what external dependencies?

I am a student at Xi'an Jiaotong University. If it is convenient, please give me your contact information, just like QQ or mailbox.

Thanks again.

Teichmuller commented 6 years ago

Hi, Thanks for your interest in my code. I compile this project in Linux environment and didn't add configurations for Windows. That's why it failed. You may try to compile in Linux or install MSYS2 to simulate Linux environment on Windows.

For dependencies, yes, there are. Check cmake/dependencies.cmake for your needs.

GenaWang commented 6 years ago

@Teichmuller Thanks for your reply. I have compiled successfully on windows. But when I run it, some things occured. Here is the result. 1 When I use Cmake to organize the program, it shows 2

Does this program need open_gl_lib and open_glu_lib?

Teichmuller commented 6 years ago

It looks like you zoomed in too far. You can use mouse scroll to zoom in/out or drag to move direction.

Yes, this program does need OpenGL. @GenaWang

GenaWang commented 6 years ago

@Teichmuller Thanks for your reply. When I run the program, I can not use the mouse to zoom in and out. I may found the reason of this error. In the process of compiling, there are some errors. It shows that the "_pi" and the "two_pi" are not defined. So I replace "_pi"=3.1415926 and "two_pi"=3.1415926*2. Is the value of "_pi" and "two_pi" too big or too small? Could you please tell me the true value of "_pi" and "two_pi"? Can you give me your contact information: QQ or email?

Teichmuller commented 6 years ago

two_pi is a constant in glm package. If it doesn't exist, your glm might be not installed correctly. However, if so, you shouldn't be able to compile. Could you post the full error messages and warnings, if any? @GenaWang

GenaWang commented 6 years ago

@Teichmuller Thank you very patiently replied and answered. I have successfully compiled the project under Windows and run out of the picture which was given in the source code. Finally there are two more questions:

  1. In the source code there are two files: the "shader.vert" and the "shader.frag". What is the effect of the two files?
  2. When I want to browse other pictures,do I only need to replace the original image name or need new file the "shader.vert" and the "shader.frag"?
Teichmuller commented 6 years ago

@GenaWang Congratulations for your success! For your questions,

  1. shader.vert and shader.frag are GLSL shaders. They are necessary for visualization.

  2. Under my settings, you can pass your image path as the first argument to command line. There is no need to modify anything. If no argument is provided, TestImage.jpg will be the default.

GenaWang commented 6 years ago

@Teichmuller Thanks very much for your answer. I try to run the project with my own picture. But it looks like it is not so smooth. I tried to debug the project and I found the wrong location. Here is the wrong location and error message:

error2 It seems that the image can be read. But its xmpData and the iptcData are empty.

error

Finally there is a question:

  1. The project seems to require that the input picture must be included the xmpMetadata. But usually the general panorama does not contain the xmpMetadata. How to generate a panorama containing xmpMetadata?
Teichmuller commented 6 years ago

@GenaWang Photo sphere is different from flat panorama. It requires additional information to coordinate display. You can refer to https://developers.google.com/streetview/spherical-metadata to understand how photo sphere XMP metadata is organized. Generating photo sphere needs special equipment such as Insta360, or special stitching software working with smart phone camera such as Google Street View. My sample image is taken by Nexus 5X on which photo sphere is a native function.

GenaWang commented 6 years ago

@Teichmuller Thanks for your suggestion. My picture is flat panorama. I try many ways to translate my flat panorama to photo sphere. But all the try failed. Could you give me some suggestions about how to translate my flat panorama to photo sphere?

Teichmuller commented 6 years ago

@GenaWang Well i haven't worked with flat panorama... so the suggestions I can give you may be not detailed or totally correct. Photo sphere uses equirectangular projection to map a spherical surface to a rectangular surface (consider how a world map works). I can imagine that flat panorama must use another sort of projection to map the scenario into rectangular area. The scenario surface may depends on the stitching methods used in your image. So a straightforward way is to figure out how the coordinate system of your flat panorama is defined, map it to a unit spherical surface and then add parameters as XMP. However IMO, if your aim is viewing a flat panorama there is no need to work with photo sphere, cylindrical projection could be a good approximation at equator area.