Skip to content

Instantly share code, notes, and snippets.

View mlaves's full-sized avatar

Max-Heinrich Laves mlaves

View GitHub Profile
@dgobbi
dgobbi / QVTKRenderWindowInteractor.py
Last active January 20, 2025 04:24
Simple QVTKRenderWindowInteractor example in Python
# coding=utf-8
"""
A simple VTK widget for PyQt or PySide.
See http://www.trolltech.com for Qt documentation,
http://www.riverbankcomputing.co.uk for PyQt, and
http://pyside.github.io for PySide.
This class is based on the vtkGenericRenderWindowInteractor and is
therefore fairly powerful. It should also play nicely with the
vtk3DWidget code.
@Mallekin
Mallekin / ueye_example.py
Created May 7, 2018 16:07
Minimal python example to capture frames with an IDS uEye camera
from pyueye import ueye
import numpy as np
import cv2
def main():
# init camera
hcam = ueye.HIDS(0)
ret = ueye.is_InitCamera(hcam, None)
print(f"initCamera returns {ret}")
@ndronen
ndronen / model.py
Last active April 28, 2018 19:50
Semantic segmentation with ENet in PyTorch
#!/usr/bin/env python
"""
A quick, partial implementation of ENet (https://arxiv.org/abs/1606.02147) using PyTorch.
The original Torch ENet implementation can process a 480x360 image in ~12 ms (on a P2 AWS
instance). TensorFlow takes ~35 ms. The PyTorch implementation takes ~25 ms, an improvement
over TensorFlow, but worse than the original Torch.
"""
from __future__ import absolute_import
@nocnokneo
nocnokneo / CMakeLists.txt
Last active August 15, 2024 15:23
VTK Rendered to an FBO in a Qt Quick 2 Scene Graph
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})