In [3]:
from skimage.transform import (hough_line, hough_line_peaks,
probabilistic_hough_line)
from skimage import data
from scipy.interpolate import interp1d
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import scipy.ndimage as I
import segmentation as seg
import config as cfg
import glob
In [4]:
params = cfg.read_gztf_config("trailfinder.cfg")
In [5]:
files = glob.glob(params["images_root"]+"*.jpg")
In [11]:
im=I.imread(params["images_root"]+"1237649927563837536.jpg")
imshow(im)
Out[11]:
In [22]:
binimage = seg.binarize(im)
h, theta, d = hough_line(binimage)
imshow(h,aspect="auto")
savefig('hough_plot.png',bbox_inches='tight')
In [14]:
imshow(binimage)
Out[14]:
In [15]:
_,angle,dist=hough_line_peaks(h,theta,d)
In [21]:
angle
Out[21]:
In [17]:
dist
Out[17]:
In [ ]: