From c9bbcb14eee45a5261d50da3a71cdfb0d4930230 Mon Sep 17 00:00:00 2001 From: Adit Agarwal Date: Sun, 18 Oct 2020 14:44:34 +0530 Subject: [PATCH] Update Seg2.cpp Updating the description of the file to include more details on structures. --- Seg2.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Seg2.cpp b/Seg2.cpp index 09914e9..d24b1a9 100644 --- a/Seg2.cpp +++ b/Seg2.cpp @@ -1,5 +1,8 @@ //Serialized implementation for image segmentation using Boruvka's algorithm +// Boruvka's Algorithm is a greedy algorithm for finding a minimum spanning tree in a connected graph + + #include #include #include @@ -7,6 +10,8 @@ #include using namespace std; using namespace cv; + +// Structure containing coordinates of any point struct pixel{ int x; int y; @@ -14,6 +19,8 @@ struct pixel{ bool use=false; typedef struct un un; typedef struct pixel pixel; + +// Structure defining an edge with the two end points and weight of the edge struct edge{ float weigh; pixel node1;