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
library(feather) |
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
R version 3.3.0 (2016-05-03) -- "Supposedly Educational" | |
Copyright (C) 2016 The R Foundation for Statistical Computing | |
Platform: x86_64-apple-darwin13.4.0 (64-bit) | |
R is free software and comes with ABSOLUTELY NO WARRANTY. | |
You are welcome to redistribute it under certain conditions. | |
Type 'license()' or 'licence()' for distribution details. | |
Natural language support but running in an English locale |
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 trans #pip install trans | |
import time | |
import cv2 | |
import math | |
import pandas as pd | |
import numpy as np | |
def distance(p, q): | |
return math.sqrt(math.pow(math.fabs(p[0]-q[0]),2)+math.pow(math.fabs(p[1]-q[1]),2)) |
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 cv2 | |
import numpy as np | |
MIN_MATCH_COUNT = 10 | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-i1", "--trainimage", required = True, help = "Path to the image") | |
ap.add_argument("-i2", "--queryimage", required = True, help = "Path to the image") | |
args = vars(ap.parse_args()) |
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
--- | |
title: "testforcarson" | |
author: "Brandon Hurr" | |
date: "September 15, 2016" | |
output: html_document | |
--- | |
```{r setup, eval = TRUE, echo = FALSE, warning = FALSE, message = FALSE, results='asis', out.width = 1000, out.height = 1000} | |
library(ggplot2) | |
library(dplyr) |
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
--- | |
output: | |
html_document: | |
mathjax: null | |
theme: null | |
highlight: null | |
pandoc_args: [ | |
"+RTS", "-K64m", | |
"-RTS" | |
] |
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
library(tidyverse) | |
dt <- tibble(V1=c(1,2,4), V2=c("a","a","b"), V3=c(2,3,1)) | |
swap_if<- function (condition, val1, val2, missing = NA) | |
{ | |
if (!is.logical(condition)) { | |
stop("`condition` must be logical", call. = FALSE) | |
} | |
out1 <- val1[rep(NA_integer_, length(condition))] |
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 trans #pip install trans | |
import time | |
import cv2 | |
import math | |
import pandas as pd | |
import numpy as np | |
import zbar # sudo apt-get install libzbar-dev \ pip install zbar | |
from sklearn.neighbors import NearestNeighbors | |
from scipy.spatial.distance import squareform, pdist |
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
# Brandon Hurr | |
# Assumptions | |
# 1. Color card is Xrite Passport | |
# 2. Card is not mirrored | |
# 3. Only color calibration half of card is visible | |
# 4. When remove edges is selected at command line, the card is not at the edge of the image. | |
# 3. The scale factor is based upon median width of found objects (contours) that should be xrite squares, but could not be | |
# could be problematic with lots of squares objects in image other than color card | |
import argparse |
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 sys | |
import os.path | |
import trans #pip install trans | |
import time | |
import datetime | |
import cv2 | |
import math | |
import pandas as pd | |
import numpy as np |