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 Answers
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
-
Thanks for the reply.I have already gone through your links before.Your given links are for the shaking events and Actually I could not understand how to use it for my purpose of capturing the image on device movement?Any idea? – krushnakant Mar 29 '13 at 09:16
-
look you need to start your camera on the specific events , these movements are the pointers for you when you need to capture the events ? If I am not in the line where you are, can you please elaborate your problem in more detail ? – Chetan Mar 29 '13 at 09:50
-
:Thanks for the reply.I have already done the image stitching part using OpenCV.I have also seen your last link which is also using opencv.I have also tried to use that but my problem is how to use sensor during image capture and in the last link also I could not find that solution. – krushnakant Mar 29 '13 at 13:29
-
you have done the hardest part and now you are running for the easy solution , I think you should try enabling the sensor , whenever you camera starts...though I have not tried , I only have this answer :) – Chetan Apr 01 '13 at 08:08
-
ohk..Thanks..I am trying to do it but not get success till now.Anyways thanks for your help – krushnakant Apr 01 '13 at 08:17
-
at least I deserve thumbs up :) – Chetan Apr 01 '13 at 08:31
-
I have already upvoted you.But I can't accept you answer because for that you have to help me one more time :-) – krushnakant Apr 01 '13 at 08:34
-
Thank u very much for your great support:) – krushnakant Apr 01 '13 at 09:48
-
Which sensor you want to use ? – Chetan Sep 30 '13 at 06:46
-
hey @krushnakant have you done panorama with sensor? – maddy d May 01 '14 at 05:07
-
@krushnakant i am compiling opencv pano stiching project but it causes error in compiling , its humble request if you can help me to do that successfully. i have posted [http://stackoverflow.com/questions/30617572/compiling-opencv-library-for-imagestitching-using-androiud-ndk-in-cygwin-but-it] (question and error) on this . – WonderSoftwares Jun 03 '15 at 12:43