We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Реализовать метод увеличения разрешения для трехмерной voxel модели, используя метод обратной свертки.
reference code: https://gist.github.com/dkurt/d9dfa96c0f4e9a09d8018351a9f08ef4
import matplotlib.pyplot as plt import numpy as np import cv2 as cv slices = [] for i in range(1, 73): slices.append(cv.imread(f"test/image{i:04}.png", cv.IMREAD_UNCHANGED)) slices[-1] = cv.rotate(slices[-1], cv.ROTATE_90_CLOCKWISE) slices[-1][...,3] = slices[-1][...,3] > 0 img = np.stack(slices, axis=2) x, y, z = np.indices((img.shape[0] + 1, img.shape[1] + 1, img.shape[2] + 1)) is_visible = img[...,3] img = img.astype(np.float32) / 255 colors = img[..., [2, 1, 0]] ax = plt.figure().add_subplot(projection='3d') ax.voxels(x, y, z, is_visible, facecolors=colors, edgecolors=np.clip(2*colors - 0.5, 0, 1), # brighter linewidth=0.5) ax.set(xlabel='x', ylabel='y', zlabel='z') ax.set_aspect('equal') plt.savefig("img.png")
Воксельная модель по слоям (в виде .png изображений): test.zip
The text was updated successfully, but these errors were encountered:
cv::Mat voxels({num_images, 4, rows, cols}, CV_8U); for (int i = 0; i < num_images; ++i) { cv::Mat img = cv::imread("image_i.png", cv::IMREAD_UNCHANGED); std::vector<cv::Mat> colors(4); for (int j = 0; j < 4; ++j) { colors[j] = cv::Mat(std::vector<int>{rows, cols}, CV_8U, voxels.ptr<uchar>(i, j)); } cv::split(img, colors); }
Sorry, something went wrong.
При make для x86 почему-то подцепляется библиотека линейной алгебры Eigen, там немного другие функции. rv64 собирается. Как поправить?
try add -DWITH_EIGEN=OFF to https://github.com/dkurt/halide_riscv/blob/main/CMakeLists.txt (OpenCV part with ExternalProject_Add)
-DWITH_EIGEN=OFF
ExternalProject_Add
No branches or pull requests
Voxel model upsampling
Реализовать метод увеличения разрешения для трехмерной voxel модели, используя метод обратной свертки.
reference code: https://gist.github.com/dkurt/d9dfa96c0f4e9a09d8018351a9f08ef4
Скрипт для визуализации
Воксельная модель по слоям (в виде .png изображений): test.zip
The text was updated successfully, but these errors were encountered: