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
#!/bin/sh | |
# | |
# This script should be run via curl: | |
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# or via wget: | |
# sh -c "$(wget -qO- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# or via fetch: | |
# sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# | |
# As an alternative, you can first download the install script and run it afterwards: |
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
@nb.njit(nb.float64[:, :](nb.float64[:, :], nb.float32)) |
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 BLH2XYZ(B, L, H): | |
'''B: lat L:lon H: height''' | |
Lat, Lon = B, L | |
N, E, h = 0, 0, 0 | |
L0 = (int((L - 1.5) / 3.0) + 1) * 3.0 # | |
a = 6378245.0 # | |
F = 298.257223563 # |
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 open3d as o3d | |
import time | |
class NonBlockVisualizer: | |
def __init__(self, point_size=2, background_color=[0, 0, 0]): | |
self.__visualizer = o3d.visualization.Visualizer() | |
self.__visualizer.create_window() | |
opt = self.__visualizer.get_render_option() | |
opt.background_color = np.asarray(background_color) | |
opt = self.__visualizer.get_render_option() |
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
image_width: 640 | |
image_height: 480 | |
camera_name: dope_webcam_0 | |
camera_matrix: | |
rows: 3 | |
cols: 3 | |
data: [641.5, 0, 320.0, 0, 641.5, 240.0, 0, 0, 1] | |
distortion_model: plumb_bob | |
distortion_coefficients: | |
rows: 1 |
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
// | |
// Created by hvt on 2021/11/3. | |
// | |
#include <stddef.h> | |
#include <stdio.h> | |
enum PARSE_STATES { | |
FIND_HEAD_0, | |
FIND_HEAD_1, | |
FIND_LENGTH, |
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 devignetting(image, radius_sigma=0.3, amount=0.7, power=1.1): | |
""" | |
:param image: input image | |
:param radius_sigma: vignetting radius = radius_sigma * image width | |
:param amount: the amount of exposure increment for devignetting | |
:param power: increase this will add extra exposure increment on image border | |
:return: | |
""" |
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 cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
K = np.array([ | |
[1377.4254511359, 0, 1054.3015274037], | |
[0, 1373.0788259424, 760.6952319349], | |
[0, 0, 1], | |
]).astype(np.float32) | |
D = np.array([-0.5522170592, 0.2365604514, 0.0021662078, -0.0028341398]).astype(np.float32) |
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
touch .gitignore && echo '.idea\ncmake-build-debug\n.vscode' > .gitignore |
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 numpy as np | |
import ros_numpy | |
from sensor_msgs.msg import PointCloud2 | |
""" | |
pc: 2d numpy array of shape (N, 4) | |
""" | |
pc_array = np.zeros(len(pc), dtype=[ |