Instructions for Setting up of DIY VR Laparoscopic Trainer
- Required Hardware
- P4 Workstation with WinXP or higher
- Graphics Card with minimum 128Mb memory
- Two Webcameras - identical
- LED + Battery (for tracking) (Preferably Blue or White LEDs directly connected to Batteries)
- Trocar (or similar tool)
- Required Software
- Initial Setup - Hardware
- Connect a webcamera to the computer via a USB port.
- Open the camera utilities/settings and adjust settings to ensure
a. Minimum Exposure
b. Nominal Gain
- Repeat the procedure with the other camera, but make sure that it is connected to a different USB port on a different internal bus. [This translates as connect one camera to a front USB port and the other to a rear USB port - at least for most computers]
- Setup the webcameras on a platform within the operational area/dome such that they are relatively orthogonal and note the spacing between them. (also to be noted a the view angles and effective focal lenghts of the cameras)
- Setup the trocar/tool such that its tip has the LED mounted on it. Ensure that the LED tip is in the view range of the cameras to begin with.
- Procedure
- Setup Visual Studio for use with OpenCV as given in : http://opencvlibrary.sourceforge.net/VisualC++
- Add the Blob Detection Library as given
- open the project of the library and build it
- in the project where the library should be used, add:
- In "Project/Settings/C++/Preprocessor/Additional Include
directories" add the directory where the blob library is stored
- In "Project/Settings/Link/Input/Additional library path" add
the directory where the blob library is stored and in "Object/Library
modules" add the cvblobslib.lib file
- Include the file "BlobResult.h" where you want to use blob variables.
- To see an example on using the blob library, see the file
example.txt inside the zip file.
NOTE: Verify that in the project where the cvblobslib.lib is used, the MFC Runtime Libraries are not mixed:
- Check in "Project->Settings->C/C++->Code Generation->Use run-time library" of your project and set it to
Debug Multithreaded DLL (debug version ) or to Multithreaded DLL ( release version ).
- Check in "Project->Settings->General" how it uses the MFC. It should be "Use MFC in a shared DLL".
- NOTE: The library can be compiled and used in .NET using this steps, but the menu options may differ a little
- NOTE2: In the .NET version, the character sets must be equal in the .lib and in the project.
- Open the simulation program in Visual Studio and run without debugging
- Results
- The 3D coordinates are output to a text file for which a simulation can be run