Skip to content

Commit

Permalink
[example] Raise warning message for ngp renderer (#7434)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
neozhaoliang and pre-commit-ci[bot] authored Apr 26, 2023
1 parent 776516f commit dcd2df1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions python/taichi/examples/rendering/taichi_ngp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@
import time
from typing import Tuple

import cv2
import numpy as np
import wget
from matplotlib import pyplot as plt
from scipy.spatial.transform import Rotation as R

import taichi as ti
from taichi.math import uvec3, vec2, vec3

try:
import cv2
import wget
from scipy.spatial.transform import Rotation as R
except:
raise ImportError("The Taichi NGP renderer requires cv2, wget and scipy to be installed.")


def depth2img(depth):
depth = (depth - depth.min()) / (depth.max() - depth.min())
Expand Down

0 comments on commit dcd2df1

Please sign in to comment.