This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import re | |
| import os | |
| import glob | |
| import shutil | |
| import copy | |
| try : | |
| import cv2 | |
| except : |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def colorize_long_int_img(img, max_var): | |
| img_colorized = np.zeros([img.shape[0],img.shape[1],3]).astype(np.uint8) | |
| img_colorized[:,:,1]=255 | |
| img_colorized[:,:,2]=255 | |
| img_hue = img.copy().astype(np.float32) | |
| img_hue[np.where(img_hue > max_var)] = 0 | |
| zero_idx = np.where((img_hue>max_var) | (img_hue == 0)) | |
| img_hue *= 255.0/max_var | |
| img_colorized[:,:,0] = img_hue.astype(np.uint8) | |
| img_colorized = cv2.cvtColor(img_colorized, cv2.COLOR_HSV2RGB) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ros_numpy | |
| import rospy | |
| from sensor_msgs.msg import PointCloud2 | |
| import open3d as o3d | |
| class PointCloud2Converter: | |
| def __init__(self): | |
| self.pc_npy = None | |
| self.sub_pc = rospy.Subscriber('/aspara_detector/ground_point_cloud', PointCloud2, self.callback_pcl) | |
| self.pcd = o3d.geometry.PointCloud() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <cmath> | |
| #include <iostream> | |
| #include "PicoZense_api.h" | |
| using namespace std; | |
| int main(int argc, char *argv[]) | |
| { | |
| PsReturnStatus status; | |
| int32_t deviceIndex = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # vscode | |
| RUN wget -O vscode-amd64.deb https://go.microsoft.com/fwlink/?LinkID=760868 | |
| RUN apt-get update && apt-get install -y gdebi | |
| RUN yes | gdebi vscode-amd64.deb | |
| RUN rm vscode-amd64.deb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import toml | |
| import click | |
| from collections import OrderedDict | |
| from ruamel import yaml # "import yaml" cannot deal with nested list | |
| import pdb | |
| import copy | |
| SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| $ python ndarray_median_with_completion.py | |
| [[1 2 1] | |
| [2 1 2] | |
| [1 2 1]] | |
| ''' | |
| from typing import List | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from pyudev import Context | |
| import errno | |
| import sys | |
| from select import select | |
| from time import sleep | |
| # Based on below code | |
| # https://github.com/econsysqtcam/qtcam/blob/6b9d31bb7fa9ecf619987cc1433c1ac2398706fe/src/see3cam_cu20.cpp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import shutil | |
| import cv2 | |
| import numpy as np | |
| from pathlib import Path | |
| from tqdm import tqdm | |
| import pdb | |
| def get_image_pathes(input_dir_pathlib: Path): | |
| extf = [".jpg", ".png"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import shutil | |
| import argparse | |
| import numpy as np | |
| from pathlib import Path | |
| from scripts.utils import get_image_pathes | |
| SCRIPT_DIR = str(Path(__file__).parent) | |
| USERNAME = os.getenv("USER") |
OlderNewer