Difference between revisions of "SlicerOpenCV"
m (Text replacement - "http://www.slicer.org/slicerWiki/index.php/" to "https://www.slicer.org/wiki/") |
|||
(16 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
=How to build 3D Slicer with OpenCV library= | =How to build 3D Slicer with OpenCV library= | ||
− | + | Currently (Nov 2010), 3D Slicer 3.6 in trunk repository (http://svn.slicer.org/Slicer3/trunk) is the only version that can be compiled with OpenCV. | |
− | + | Please download the source code from the repository, open slicer_variables.tcl and change the following line (around line 190) | |
− | |||
− | |||
− | |||
set ::USE_OPENCV "OFF" | set ::USE_OPENCV "OFF" | ||
Line 16: | Line 13: | ||
set ::USE_OPENCV "ON" | set ::USE_OPENCV "ON" | ||
− | then, follow [ | + | then, follow "Building the latest development version" in [https://www.slicer.org/wiki/Slicer3:Build_Instructions Build Instruction Page]. |
− | |||
− | |||
− | |||
=Example 3D Slicer modules= | =Example 3D Slicer modules= | ||
− | A good example of application is image overlay system, which projects 3D organ model onto endoscopic video image. There are | + | A good example of application is image overlay system, which projects 3D organ model onto endoscopic video image. There are three experimental module with different approaches are available: |
==Secondary Window with OpenCV module (Nagoya Institute of Technology)== | ==Secondary Window with OpenCV module (Nagoya Institute of Technology)== | ||
− | This module creates a new window with a VTK renderer independent from 3D Slicer's scene. The module copies all VTK models from the MRML scene to its own VTK scene and overlays them on to a video image imported by using OpenCV. The merit of this approach is that the developers can change any properties of models, cameras etc. without modifying any objects in MRML scene. | + | |
+ | |||
+ | |||
+ | |||
+ | {| border="1" cellpadding="8" cellspacing="1" | ||
+ | | style="background: #ebeced" colspan="2" align="left"| This module creates a new window with a VTK renderer independent from 3D Slicer's scene. The module copies all VTK models from the MRML scene to its own VTK scene and overlays them on to a video image imported by using OpenCV. The merit of this approach is that the developers can change any properties of models, cameras etc. without modifying any objects in MRML scene. | ||
+ | | style="background: #ebeced"| [[Image:Secondary_Window_with_OpenCV2.png|360px|thumb| Screenshot of the Secondary Window with OpenCV module. A 3D model is overlaid on the laparoscopic video image in the right side of secondary window. The left side of the secondary window is 3D viewer which viewpoint is independent of the 3D viewer in 3D Slicer.]] | ||
+ | |} | ||
+ | |||
+ | ==StereoCalib module (Nagoya Institute of Technology)== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | {| border="1" cellpadding="8" cellspacing="1" | ||
+ | | style="background: #ebeced" colspan="2" align="left"| This module is for camera calibration not only single camera but also stereo camera. The output files are the camera intrinsic parameter matrix and the camera distortion compensation vector for Secondary Window with OpenCV module. | ||
+ | | style="background: #ebeced"| [[Image:StereoCalib3.png|360px|thumb| Screenshot of the StereoCalib module. You can obtain the intrinsic parameters matrix and the lens distortion compensation vector of your medical camera device by using a checker board.]] | ||
+ | |} | ||
==Video Importer module (BWH)== | ==Video Importer module (BWH)== | ||
Line 34: | Line 45: | ||
{| border="1" cellpadding="8" cellspacing="1" | {| border="1" cellpadding="8" cellspacing="1" | ||
| style="background: #ebeced" colspan="2" align="left"| This is a simple demo module of an image overlay. This module copies the video frame into the background of 3D viewer in 3D Slicer and displays 3D models in front of video image. Since the video image is directly imported into the 3D viewer in 3D Slicer, all properties of VTK models in the MRML scene are reflected in the overlaid image. | | style="background: #ebeced" colspan="2" align="left"| This is a simple demo module of an image overlay. This module copies the video frame into the background of 3D viewer in 3D Slicer and displays 3D models in front of video image. Since the video image is directly imported into the 3D viewer in 3D Slicer, all properties of VTK models in the MRML scene are reflected in the overlaid image. | ||
− | | style="background: #ebeced"| [[Image:SlicerOpenCV_VideoImporter_Demo.jpg|360px|thumb| Screenshot of VideoImporter module. A 3D model of prostate is overlaid on the laparoscopic video image in the left 3D viewer.]] | + | | style="background: #ebeced"| [[Image:SlicerOpenCV_VideoImporter_Demo.jpg|360px|thumb| Screenshot of the VideoImporter module. A 3D model of prostate is overlaid on the laparoscopic video image in the left 3D viewer.]] |
|} | |} | ||
Line 49: | Line 60: | ||
*About 3D Silcer-OpenCV integration | *About 3D Silcer-OpenCV integration | ||
**[[User:Tokuda|Junichi Tokuda, Ph.D. /Brigham and Women's Hospital]], (tokuda at bwh.harvard.edu) | **[[User:Tokuda|Junichi Tokuda, Ph.D. /Brigham and Women's Hospital]], (tokuda at bwh.harvard.edu) | ||
− | *About Secondary Window with OpenCV module | + | *About Secondary Window with OpenCV module and StereoCalib module |
− | **Atsushi Yamada, Ph.D. / Nagoya Institute of Technology, Japan (yamada.atsushi at nitech.ac.jp) | + | **[[User:Ayamada|Atsushi Yamada, Ph.D. / Nagoya Institute of Technology, Japan]], (yamada.atsushi at nitech.ac.jp) |
+ | **Masai Komura, MS / Nagoya Institute of Technology, Japan | ||
*About the project | *About the project | ||
**[http://www.spl.harvard.edu/pages/People/noby Nobuhiko Hata, Ph.D. / Brigham and Women's Hospital] (hata at bwh.harvard.edu) | **[http://www.spl.harvard.edu/pages/People/noby Nobuhiko Hata, Ph.D. / Brigham and Women's Hospital] (hata at bwh.harvard.edu) | ||
**[http://staff.aist.go.jp/k.chinzei/ Kiyoyuki Chinzei, Ph.D. / AIST, Japan] (chin at ni.aist.go.jp) | **[http://staff.aist.go.jp/k.chinzei/ Kiyoyuki Chinzei, Ph.D. / AIST, Japan] (chin at ni.aist.go.jp) |
Latest revision as of 18:07, 10 July 2017
Home < SlicerOpenCVContents
About This Page
This page provides information about integration of 3D Slicer and OpenCV. OpenCV is a library of programming functions for real time computer vision. The primary goal of 3D Slicer-OpenCV integration is to provide functionalities to import and process video images used in the medical field e.g. ultrasound and endoscopic video images in 3D Slicer.
How to build 3D Slicer with OpenCV library
Currently (Nov 2010), 3D Slicer 3.6 in trunk repository (http://svn.slicer.org/Slicer3/trunk) is the only version that can be compiled with OpenCV. Please download the source code from the repository, open slicer_variables.tcl and change the following line (around line 190)
set ::USE_OPENCV "OFF"
to
set ::USE_OPENCV "ON"
then, follow "Building the latest development version" in Build Instruction Page.
Example 3D Slicer modules
A good example of application is image overlay system, which projects 3D organ model onto endoscopic video image. There are three experimental module with different approaches are available:
Secondary Window with OpenCV module (Nagoya Institute of Technology)
This module creates a new window with a VTK renderer independent from 3D Slicer's scene. The module copies all VTK models from the MRML scene to its own VTK scene and overlays them on to a video image imported by using OpenCV. The merit of this approach is that the developers can change any properties of models, cameras etc. without modifying any objects in MRML scene. |
StereoCalib module (Nagoya Institute of Technology)
This module is for camera calibration not only single camera but also stereo camera. The output files are the camera intrinsic parameter matrix and the camera distortion compensation vector for Secondary Window with OpenCV module. |
Video Importer module (BWH)
This is a simple demo module of an image overlay. This module copies the video frame into the background of 3D viewer in 3D Slicer and displays 3D models in front of video image. Since the video image is directly imported into the 3D viewer in 3D Slicer, all properties of VTK models in the MRML scene are reflected in the overlaid image. |
The code is available in: http://svn.na-mic.org/NAMICSandBox/trunk/IGTLoadableModules/VideoImporter/
Support
This work is supported by
- Intelligent Surgical Instrument Project (Funded by New Energy and Industrial Technology Development Organization (NEDO), Ministry of Economy, Trade and Industry (METI), Japan)
- Image Guided Therapy Center (NIH P41RR019703)
- IMage Guided Therapy (NIH P01CA67165)
Contact
- About 3D Silcer-OpenCV integration
- Junichi Tokuda, Ph.D. /Brigham and Women's Hospital, (tokuda at bwh.harvard.edu)
- About Secondary Window with OpenCV module and StereoCalib module
- Atsushi Yamada, Ph.D. / Nagoya Institute of Technology, Japan, (yamada.atsushi at nitech.ac.jp)
- Masai Komura, MS / Nagoya Institute of Technology, Japan
- About the project
- Nobuhiko Hata, Ph.D. / Brigham and Women's Hospital (hata at bwh.harvard.edu)
- Kiyoyuki Chinzei, Ph.D. / AIST, Japan (chin at ni.aist.go.jp)