Is there any method or technique to identify a bitmap (png/jpeg) is actually a 360 degree panoramic image or a normal image. What is the mechanism to distinguish panoramic image from normal image in C# or Three.js.
-
I would think one could do some pattern matching / correlation between the left and right edges of the photograph. If they are substantially similar, it *might* imply that the camera rotated all the way around. However, this would probably also flag a lot of typical panoramic shots (e.g. ocean horizon) – Jonathon Reinhart Mar 20 '14 at 05:06
-
@Jonathon Reinhart: This is complex and error not dependable (implementation is not tough as we can easy do this matching using OPENCV). Is there any other method or parameter? – Razack Mar 20 '14 at 05:32
-
If I knew of anything else, I would have mentioned it. – Jonathon Reinhart Mar 20 '14 at 05:34
-
Hope I can find an expert here... – Razack Mar 20 '14 at 06:07
-
Hi @Razack, I know its over 2 years later, but did you ever get a solution to this? Thanks in advance! – Arthur Nov 29 '16 at 19:12
-
No solutions we tried later as we asked the user to input, when uploading an image. Comparing the ends slices is the option but not fool proof – Razack Nov 30 '16 at 10:50
-
Do you know of any way to bump up this Stack Overflow question? Or should I possibly just ask it again? I'm wondering if a couple years later anyone has come up with a more reliable method – Arthur Dec 01 '16 at 15:53
1 Answers
The ratio of the image has to be 2:1, for example, if your image width is 6000px and height 3000px, this is 360 images... in another words, calculate like this:
var width = 6000; var height = 3050; var ratio = width/2; if(ratio >= height){ return 'This is 360 image';}else{ return 'This is not 360 image';}
But this is just Client side solution, not sure if it will work for you, but i think Facebook have same solution. You can check Facebook website, and see how they do it, here your link: https://facebook360.fb.com/editing-360-photos-injecting-metadata/
If you have access to the server side or you using server application(php,asp,coldfusion etc), you can check for meta tags, the 360 image should contain "XMP GPano Tags". You can use also a good online tool to check the meta tags for GPano for testing: https://www.thexifer.net/#xmp-gpano-tags