Skip to content
Snippets Groups Projects
Commit d2f5ca43 authored by Marc Feger's avatar Marc Feger
Browse files

Add A2b

parent fd4a04dc
No related branches found
No related tags found
No related merge requests found
...@@ -26,8 +26,6 @@ class Interface(object): ...@@ -26,8 +26,6 @@ class Interface(object):
columns = len(img[0, 0:]) columns = len(img[0, 0:])
above = copy.deepcopy(img) above = copy.deepcopy(img)
# above[i, j, :] = [0, 255, 0]
coherent_pixels = [] coherent_pixels = []
for result in results: for result in results:
...@@ -43,7 +41,6 @@ class Interface(object): ...@@ -43,7 +41,6 @@ class Interface(object):
plt.imshow(above, interpolation='none', alpha=alpha) plt.imshow(above, interpolation='none', alpha=alpha)
plt.savefig(fname=self.edit_path, dpi=300, bbox_inches='tight') plt.savefig(fname=self.edit_path, dpi=300, bbox_inches='tight')
plt.close() plt.close()
# plt.show()
def doit(self): def doit(self):
img = np.array(io.imread(self.image_path)) img = np.array(io.imread(self.image_path))
...@@ -56,7 +53,6 @@ class Interface(object): ...@@ -56,7 +53,6 @@ class Interface(object):
g = Graph(row, col, gray, self.bins, self.threshold) g = Graph(row, col, gray, self.bins, self.threshold)
print("Connected components: ") print("Connected components: ")
g.detect_connected_components() g.detect_connected_components()
# print(g.connected_components)
res, vec = g.ccv() res, vec = g.ccv()
print(res) print(res)
print(vec) print(vec)
......
A2/images/astronauts/Eileen-Collins.jpg

46.4 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment