This file contains hidden or 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
| from __future__ import division | |
| import numpy as np | |
| from skimage import io, color | |
| import matplotlib.pyplot as plt | |
| import vlfeat as vlf | |
| import os | |
| import math | |
| # Reduced matches | |
| l1,d1 = vlf.read_features_from_file('bust_matches.txt') |
This file contains hidden or 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
| from __future__ import division | |
| import numpy as np | |
| from skimage import io, color | |
| import matplotlib.pyplot as plt | |
| import vlfeat as vlf | |
| import os | |
| import math | |
| # Reduced matches | |
| l1,d1 = vlf.read_features_from_file('bust_matches.txt') |
This file contains hidden or 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
| from __future__ import division | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from skimage import io, img_as_float | |
| A = img_as_float(io.imread('lego1.jpg', plugin='pil')) | |
| # noise | |
| n = np.random.random_sample() |
This file contains hidden or 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
| image1 = io.imread('perold1.jpg') | |
| image2 = io.imread('perold2.jpg') | |
| image = np.zeros((image1.shape[0], image1.shape[1]*2, 3)) | |
| image[:, 0:image1.shape[1], :] = image1 | |
| image[:, image1.shape[1]:, :] = image2 | |
| imshow(image) |
This file contains hidden or 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
| from __future__ import division | |
| import numpy as np | |
| from _growcut import growcut | |
| from orientation import orientation | |
| from skimage import io | |
| from skimage.morphology.convex_hull import grid_points_inside_poly | |
| def segmentation(image): | |
| image = np.resize(image, (256, 256)) |
This file contains hidden or 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
| from __future__ import division | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| from skimage import io, color | |
| from skimage.io import ImageCollection | |
| #Training recognition system | |
| ic = ImageCollection('*.pgm') | |
| for image in enumerate(ic): | |
| image = color.rgb2gray(image) |
This file contains hidden or 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
| # On branch master | |
| # Changes to be committed: | |
| # | |
| # new file: experiments/fin_detect_shortest_path.py | |
| # new file: sharkfin/__init__.py | |
| # new file: sharkfin/data.py | |
| # | |
| # Unmerged paths: | |
| # (use "git add/rm <file>..." as appropriate to mark resolution) | |
| # |
This file contains hidden or 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
| from __future__ import division | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from skimage import io, color, img_as_float | |
| def histogram_equalization(A): | |
| rows = A.shape[0] | |
| columns = A.shape[1] | |
| histogram, bin_edges = np.histogram(A.flatten(), range=(0, 1), bins=256) | |
| histogram = histogram/np.max(histogram) |
This file contains hidden or 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
| from __future__ import division | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from skimage import io, color, img_as_float | |
| def histogram_equalization(A): | |
| rows = A.shape[0] | |
| columns = A.shape[1] | |
| histogram, bin_edges = np.histogram(A.flatten(), range=(0, 1), bins=256) | |
| histogram = histogram/np.max(histogram) |
This file contains hidden or 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
| def histogram_equalization_point_transformation(A): | |
| B = A.copy() | |
| P1 = B[:, :, 0] | |
| P2 = B[:, :, 1] | |
| P3 = B[:, :, 2] | |
| G = (np.sum(B * (1/3, 1/3, 1/3), axis=2))/255 | |
| rows = G.shape[0] | |
| columns = G.shape[1] | |
| histogram, bin_edges = np.histogram(G.flatten(), range=(0, 1), bins=256) |
NewerOlder