Image-guided surgery functions, in C++, using OpenCV and wrapped in Python.
Project description
scikit-surgeryopencvcpp
scikit-surgeryopencvcpp implements image guided surgery algorithms, using OpenCV, in C++ and wrapped in Python.
scikit-surgeryopencvcpp is part of the SNAPPY software project, developed at the Wellcome EPSRC Centre for Interventional and Surgical Sciences, part of University College London (UCL).
Features
- Support for Python Wheels, thanks to Matthew Brett's multibuild.
- Triangulation using Hartley and Zisserman's method, and the midpoint of two lines.
- Surface reconstruction, using Dan Stoyanov's MICCAI 2010 method, implemented in OpenCV by Dimitris Psychogyios.
Installing
You can pip install the latest Python package as follows:
pip install scikit-surgeryopencvcpp
Examples
Surface Reconstruction
pip install pptk opencv-python scikit-surgeryopencvcpp
python
import sksurgeryopencvpython as skscv
import pptk
import numpy as np
import cv2
left_image = cv2.imread('Testing/Data/reconstruction/f7_dynamic_deint_L_0100.png')
right_image = cv2.imread('Testing/Data/reconstruction/f7_dynamic_deint_R_0100.png')
left_intrinsics = np.loadtxt('Testing/Data/reconstruction/calib.left.intrinsic.txt')
right_intrinsics = np.loadtxt('Testing/Data/reconstruction/calib.right.intrinsic.txt')
l2r = np.loadtxt('Testing/Data/reconstruction/calib.l2r.4x4')
rotation_matrix = l2r[0:3, 0:3]
translation_vector = l2r[0:3, 3:4]
points = skscv.reconstruct_points_using_stoyanov(left_image, left_intrinsics, right_image, right_intrinsics, rotation_matrix, translation_vector, False)
points_3d = points[:,0:3]
v = pptk.viewer(points_3d)
Developing
Cloning
You can clone the repository using the following command:
git clone https://github.com/UCL/scikit-surgeryopencvcpp.git
Build instructions
Still not for the faint-hearted. It depends if you are a C++ developer familiar with CMake or a hybrid C++/Python developer primarily interested in writing Python extensions.
The simplest advice really is to read appveyor.yml
, as this will always
be up to date.
Preferred Branching Workflow for Contributions.
We welcome contributions to this project. Please use the following workflow.
- Raise issue in this project's Github Issue Tracker.
- Fork repository.
- Create a feature branch called
<issue-number>-<some-short-description>
replacing<issue-number>
with the Github issue number and<some-short-description>
with your description of the thing you are implementing. - Code on that branch.
- Push to your remote when ready.
- Create pull request.
- We will review code, suggest and required changes and merge to master when it is ready.
Dashboards
In addition to Travis and Appveyor builds, C++ results are also submitted to a public CDash dashboard.
Licensing and copyright
Copyright 2018 University College London. scikit-surgeryopencvcpp is released under the BSD-3 license. Please see the license file for details.
Acknowledgements
Supported by Wellcome and the EPSRC.
The project was generated, using CMakeCatchTemplate and CMakeTemplateRenamer.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp38-cp38-manylinux1_i686.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp38-cp38-manylinux1_i686.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6beabcce8a65907ce3a05966ca5d1a2e0f20884549721a310c2055f00597840d |
|
MD5 | 09365a930fc9dcb0c5c125d482791a06 |
|
BLAKE2b-256 | 4bb4b545236e67c5e433a3c23d77035d544404fd8c6bfe7f94d0cedd3fdc6694 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9386bc0bd018bf3d6a94f986890d6af0a8d63d6bed38704a0b65354d579ee99d |
|
MD5 | 5555461fd98e983332715a4f7ef36b60 |
|
BLAKE2b-256 | e35f1f61fecbd4a3c05cbdc54e2f2e9c1a5413b70242f02a5bd636136cc09aa3 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 15.9 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c46b427f0fbabb557bdcf17186261f13334bd41cdee2a27aa3044b82ac5dc290 |
|
MD5 | d25a8664b2d917d78a9bcc7253916923 |
|
BLAKE2b-256 | ff32ffe08c29cd9ad879f87815a0b80f5233ad80309d662a35bac9612950667e |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win32.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-win32.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fc22b3431567345c4422c06154b54b5718f30f75d0af284681c68821fc725cf |
|
MD5 | e2e0f018cac7937d95253908826ad4e7 |
|
BLAKE2b-256 | 6068100c55dffad0b420a431b3889d107aac1c57ad69093b2c68d47b1e8a99a7 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 390d36b52478f553f154dd14ca794409eff23fad92f9f93f1eccf474695d80de |
|
MD5 | 9544062b74c398f52812014d09a9ca07 |
|
BLAKE2b-256 | 5acb3ffbc0a0acee4903634bd6470fb8ddd2b876b2b7b63fb4db97c4bb368fe2 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-manylinux1_i686.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-manylinux1_i686.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94158600a0454855597730e970f192c02578cd03dfa6e3e4c59ecb7c51bc4626 |
|
MD5 | 0b80c2553f71f1f231b2c33fd69eb834 |
|
BLAKE2b-256 | b5293f2b5dcd8150c8af4c733a4f84da8edb09585c6f29d686726e4f4f3bc1b9 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 494a7da45e1f35368cd258fe8579b821c73b138c1e217a8ea8690b836d4d950e |
|
MD5 | 7bb9b5562a50f41a5e7c211e5f0ae11f |
|
BLAKE2b-256 | 5324f7b4f33cabd42fdf2ef5039450a51dabb7f4b714d5c11d9d0f956d232931 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 16.1 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df4c233fdda541245b3842c73bbfe608de47dc24a62e11ad4dce2e6f3ec01189 |
|
MD5 | 677c2da158df3167aead3ee2e59d6752 |
|
BLAKE2b-256 | 443dbfd6a70745ad50dcdf1df9a8b61f68186c8f93427eca45aebfd838e365cb |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win32.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-win32.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ee4fa7e6f4dbbcbb9f909aeca6cf70af08b18707cb6ab3fc9da91aef9da480 |
|
MD5 | eb53f023aec4d5f63d28aa5291223bf7 |
|
BLAKE2b-256 | 872b7bce3ffedfe443e8b83627408bcc5765448b291fac4991af73bce56e5c6d |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49ac7e2e3f1fe3a2f91306221d35a0c41f26739a96b0fffac09ef01cf90b7da6 |
|
MD5 | edd9a8b0f42d7f9babd705c66d0fccc9 |
|
BLAKE2b-256 | 5243937871ef0203c5b851ae50e411d7e0953d3f77e9e0353542d452cba1b583 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-manylinux1_i686.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-manylinux1_i686.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c10baea751a6d868c4c4e3168c963e114fc6a77bec60cdf55b0aefad305a5660 |
|
MD5 | 5332a0057ba87e08c7296c4d99702fd4 |
|
BLAKE2b-256 | 6b3518571a1831093341798f7caae7cb24c5bb68a7bb13273d1ad0a8ebce6c82 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp36-cp36m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.6m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8fa72e2c55d0458bd9304151e1dec9433cf65fd17ccc41b8b5602ba77293b45 |
|
MD5 | 3b16704a537c8e017f531d4dc47552f6 |
|
BLAKE2b-256 | 940538496e96c1c5b7e9e2a4cb4b06accdacf4e865ec6cca1a3f0adca8b9fa4d |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 16.1 MB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 131b36c24c671c5cfef91d3f086f338581fa579bc106a42ce303684cb9b2e39a |
|
MD5 | e95da484ed6754fc2c6b9a95afe2427f |
|
BLAKE2b-256 | b5fbfa4e952ba73096fd9b6931a1c5f3ca034c4573eb9cd60bc8c1ec46be1d05 |
File details
Details for the file scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win32.whl
.
File metadata
- Download URL: scikit_surgeryopencvcpp-0.0.13-cp35-cp35m-win32.whl
- Upload date:
- Size: 8.6 MB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aa749473a784b805c2e62f44b0ab3fe01f14cb91a3358226e1ea846501ac98c |
|
MD5 | 45f1e44c55f83ff8d377d9a10c308264 |
|
BLAKE2b-256 | 7a2c51693580dd965bc07655a732dfb835f0e954570e24c9ee113f3794342644 |