
BEE09:03 Building of a Stereo Camera System Thom Persson This thesis is presented as part of Degree of Bachelor of Science in Electrical Engineering Blekinge Institute of Technology August 2009 Blekinge Institute of Technology School of Engineering Department of Applied Signal Processing Supervisor: Abhishek Ivaturi, eXperience3D Sweden AB Examiner: Siamak Khatibi Abstract This project consists of a prototype of a stereo camera rig where you can mount two DSLR cameras, and a multithreaded software application, written in C++, that can move the cameras, change camera settings and take pictures. The resulting 3D-images can be viewed with a 2-view autostereoscopic display. Camera position is controlled by a step engine which is controlled by a PIC microcontroller. All communication with the PIC and the computer is made over USB. The camera shutters are synchronized so it is possible to take pictures of moving objects at a distance of 2.5 m or more. The results shows that there are several things to do before the prototype can be considered a product ready for the market, most of all the camera callback functionality. i Acknowledgments I start by thanking Linus Nilsson for helping out with the construction and design of the rig and electronics. Without him this project would not have been as feasible as it was. Nord-Lock AB, where Linus works, has contributed with several parts of the hardware construction, among other things aluminum parts, screws, some electronics and tools, for example CNC milling machine and lathe, to make customized parts. Linus also helped me find other companies which have conduced with parts for the hardware constructions. All Motion Technology AB conduced with the step engine and Teknikprodukter AB conduced with the belt transmission, and I thank them as well for making this thesis project feasible. Company/Person Contact/Information All Motion Technology AB http://www.allmotion.se/ Linus Nilsson [email protected] Nord-Lock AB, Linus Nilsson www.nord-lock.com Teknikprodukter AB http://www.teknikprodukter.se/ iii Table of Contents Abstract.......................................................................................................................................................i Acknowledgments....................................................................................................................................iii Figure Index.............................................................................................................................................vii Abbreviations............................................................................................................................................ix 1. Introduction............................................................................................................................................1 2. Background............................................................................................................................................3 3. Requirements.........................................................................................................................................5 4. Design....................................................................................................................................................7 4.1. Choice of Camera...........................................................................................................................7 4.2. The Rig...........................................................................................................................................8 4.3. Software..........................................................................................................................................9 4.3.1.Redesign................................................................................................................................10 4.3.2.Commands and Properties.....................................................................................................13 5. Hardware Implementation....................................................................................................................15 5.1. Electronics....................................................................................................................................16 6. Software Implementation.....................................................................................................................17 6.1. Threading......................................................................................................................................17 6.1.1.Live View...............................................................................................................................17 6.2. Commands....................................................................................................................................18 6.2.1.Queuing.................................................................................................................................18 6.3. Problem With Camera Callbacks.................................................................................................19 6.4. User Interface...............................................................................................................................19 6.4.1.Events....................................................................................................................................20 6.5. Storing Data in XML File.............................................................................................................21 6.6. Error Handling..............................................................................................................................21 6.7. Hardware Interaction....................................................................................................................22 6.7.1.Commands.............................................................................................................................22 6.7.2.Byte Buffers...........................................................................................................................23 7. Testing..................................................................................................................................................25 7.1. Software........................................................................................................................................25 7.2. Hardware......................................................................................................................................25 8. Performance.........................................................................................................................................27 8.1. Image Result.................................................................................................................................27 9. Results and Conclusions......................................................................................................................31 10. Future Work........................................................................................................................................33 Appendix I -Camera Rig and Related USB Control Box........................................................................35 Appendix II -Project Specifications.........................................................................................................37 Appendix III -Part of the Property XML Schema....................................................................................39 Appendix IV -Circuit Diagram................................................................................................................41 v Figure Index Figure 1: Picture taken with two cameras, viewed on a autostereoscopic display....................................3 Figure 2: Conceptual camera movement and rotation on the rig...............................................................5 Figure 3: Schematics for the shutter release..............................................................................................8 Figure 4: Engine rotating the belt counter-clockwise................................................................................8 Figure 5: Diagram over the application....................................................................................................11 Figure 6: Handling a controller event......................................................................................................14 Figure 7: Camera mounting device..........................................................................................................15 Figure 8: Taking Picture (note: no additional cables attached)................................................................16 Figure 9: Application directly after start-up.............................................................................................20 Figure 10: Comparison of unsynchronized and synchronized shutter release.........................................28 Figure 11: Alignment comparison............................................................................................................29 vii Abbreviations API Application Programming Interface CNC Computer Numerical Control DSLR Digital Single-Lens Reflex Camera FIFO First In First Out GUI Graphical User Interface LCD Liquid Crystal Display LSB Least Significant Byte MSB Most Significant
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages53 Page
-
File Size-