I really liked the buttons on this behance post, so I wanted to try and make some for my site. They are wicked cool.
https://www.behance.net/gallery/27689051/Paktor-App
A Pen by Sagnik Das on CodePen.
| ''' | |
| This code was used to capture documents for the Doc3D dataset | |
| For a document it captures the point cloud and the segmentation map | |
| This code uses python (2.7) and pyrealsense2 (2.16) and may be incompatiable with newer versions of pyrealsense2 | |
| Related publication: DewarpNet: Single-Image Document Unwarping With Stacked 3D and 2D Regression Networks (ICCV 2019) | |
| Contributed by: Ke Ma and Sagnik Das (Spring 2019) | |
| Correspndence: sadas@cs.stonybrook.edu | |
| Acknowledgemnts: This code uses snippets from pyrealsense2 tutorials | |
| ''' | 
| # Helpful Tips: https://stackoverflow.com/questions/9567882/sobel-filter-kernel-of-large-size/ | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| from torch.autograd import Variable | |
| import numpy as np | |
| np.set_printoptions(threshold=np.nan) | |
| from math import exp | |
| import cv2 | |
| import matplotlib.pyplot as plt | 
| import os | |
| import numpy as np | |
| import tqdm | |
| inp_pc_path='./simple.xyz' #input point cloud | |
| out_pc_path='./simple_org.xyz' #output point cloud | |
| points=[] | |
| org_points=[] | |
| with open(inp_pc_path,'r') as f: |