Capture image automatically like 360 Panorama

2019-02-23 17:44发布

问题:

I am working on the application which is similar to Panorama app.I want to capture the image automatically when device moved from left to right like 360 panorama app works.After few research,I came to know that Sensor and thread can be useful for that and I have seen some examples of sensor here.But I couldn't understand about how to use sensor for my purpose.I also could not find any tutorial related to sensor with camera for auto capturing image.If anybody have any idea or example regarding this then plz suggest me.

回答1:

I think you are talking about the event handling using accelerometer of the android , you can capture the events like here How to detect shake event with android? , and then can possibly turn on your camera and perform your events.

Also try this http://www.techrepublic.com/blog/app-builder/a-quick-tutorial-on-coding-androids-accelerometer/472

Update :

You need to capture the multiple images and then combine them by using specific algorithm to have the Panoram 360 view on it.

Update 2 :

The algorithm like Image stitching like this : http://en.wikipedia.org/wiki/Image_stitching

Most Important Thing : No one is going to reveal their algorithm on any opensource forum (As per I know)

Have a look at this too : http://www.cs.cornell.edu/courses/cs4670/2010fa/projects/final/results/group_of_acc269_ty244_yc563/cs4670_final.html