Skip to content

Instantly share code, notes, and snippets.

@fyviezhao
fyviezhao / show_and_compare_img_in_html.py
Created August 3, 2021 09:17
Python script for showing and comparing images in html.
#coding=utf-8
import os
import dominate
from dominate.tags import *
import glob
from tqdm import tqdm
class HTML:
def __init__(self, web_dir, title, refresh=0):
self.title = title
@fyviezhao
fyviezhao / TexturedMeshSteps.md
Last active July 22, 2021 08:44 — forked from shubhamwagh/TexturedMeshSteps.md
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

NOTE (@fyviezhao)

There is also another useful blog introducing how to remeshing point cloud using MeshLab.

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
  • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
@fyviezhao
fyviezhao / MVC.md
Last active June 25, 2021 08:36
Python implementaion of 2D Mean Value Coordinates (MVC)

This script is a faithful Python implementation of 2D Mean Value Coordinates (MVC). The code is based on CGAL's C++ implementation here, and has been tested to match it numerically.

import numpy as np
from numpy import linalg as LA
import math

class MeanValue_2:
    def __init__(self, vertices):
        self.vertices = vertices