Skip to content

Instantly share code, notes, and snippets.

View thejasonfisher's full-sized avatar

Jason Fisher thejasonfisher

View GitHub Profile
@thejasonfisher
thejasonfisher / tensor_2_cv2.py
Created December 10, 2023 08:56 — forked from gsoykan/tensor_2_cv2.py
pt tensor to cv2 image
import cv2
import numpy as np
import torch
# Create a random torch tensor
tensor = torch.randn(3, 256, 256)
# Convert the tensor to a numpy array
numpy_image = tensor.numpy()
@thejasonfisher
thejasonfisher / cupy_gl_interop.py
Created January 16, 2024 20:04 — forked from keckj/cupy_gl_interop.py
CuPy/OpenGL interop example
import sys
from cuda import cudart
import numpy as np
import cupy as cp
import pyrr
import glfw
@thejasonfisher
thejasonfisher / LICENSE
Created February 5, 2024 08:24 — forked from asaboor-gh/LICENSE
JSON Encoder/Decode for Numpy Objects
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
@thejasonfisher
thejasonfisher / bezier.frag
Created February 24, 2024 23:00 — forked from vicrucann/bezier.frag
GLSL shader that allows to draw smooth and thick Bezier lines in 3D; added fog effect; using OpenSceneGraph for visualization
#version 330
in VertexData{
vec4 mColor;
} VertexIn;
void main(void)
{
gl_FragColor = VertexIn.mColor;
}