Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Seg2.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
//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 <iostream>
#include <omp.h>
#include <opencv/cv.h>
#include "opencv2/highgui/highgui.hpp"
#include <vector>
using namespace std;
using namespace cv;

// Structure containing coordinates of any point
struct pixel{
int x;
int y;
};
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;
Expand Down