This file contains 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
## Example command-line usage: $ for i in *.dae; do echo $i; blender -b --python convert.py -- $i ${i%.dae}.obj; done | |
## Need to be careful about face normals direction of exported object | |
import bpy | |
import sys | |
argv = sys.argv | |
argv = argv[argv.index("--") + 1:] # get all args after "--" | |
dae_in = argv[0] |
This file contains 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 argparse | |
import json | |
import numpy as np # (pip install numpy) | |
from PIL import Image # (pip install Pillow) | |
from skimage import measure # (pip install scikit-image) | |
from shapely.geometry import Polygon, MultiPolygon # (pip install Shapely) | |
SPLIT_RATIO = 0.9 |
This file contains 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 argparse | |
import os | |
import sys | |
import cv2 | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from cv_bridge import CvBridge, CvBridgeError | |
sys.path.append("/usr/lib/python2.7/dist-packages/") | |
import rospy | |
import rosbag |