Questions tagged [connected-components]

Connected-component labeling (alternatively connected-component analysis, blob extraction, region labeling, blob discovery, or region extra

Connected-component labeling (alternatively connected-component analysis, blob extraction, region labeling, blob discovery, or region extra

327 questions
0
votes
1 answer

Group nodes by connections

I would like to know if there is a proper algorithm to group nodes for the following problem: Input: Relational disconnected graph, with following data structure: per_id com_id 1 1 2 1 2 2 3 2 3 3 4 …
0
votes
0 answers

Opencv Connected Componenet Labeling

I have an image ımage has curves but these curves have cut ;not contunie How can I do more clear this curves with connected componenet
j.doe
  • 327
  • 7
  • 22
0
votes
1 answer

How to display a single connected component out of many using `regionprops`

When using the function regionprops in MATLAB, there is an option to extract the binary image of each connected component. The size of the binary image is reduced to the size of the connected component. I don't want the size of the binary image to…
Senyokbalgul
  • 1,058
  • 4
  • 13
  • 37
0
votes
3 answers

Working out dependent groups

Using the following function I can generate some test data. import random, string a = list(string.ascii_lowercase) def gen_test_data(): s = [] for i in xrange(15): p = random.randint(1,3) xs = [random.choice(a) for i in…
Jakob Bowyer
  • 33,878
  • 8
  • 76
  • 91
0
votes
1 answer

Graphx get vertex label from vertex id

I have the following graph in Graphx graph.vertices.foreach(println) (6109253945443866644,"Futurama"@en) (7558506336564503178,"AccessibleComputing"@en) (0,null) (-2278222762001827643,"Programming…
0
votes
1 answer

Reduce computational time in Spark application

I have a Spark application that runs iteratively over 5 million elements. The application takes 2 hours to run on the whole dataset. But I have to run the application on the whole dataset of over 50 million elements. The code runs successfully but…
0
votes
1 answer

MATLAB: isolating perimeters of regions of interest in binary image: bwmorph issues

I have a binary image (attached) with connected components isolated with bwconncomps. I'm trying to identify the outline of each of these components but in a way where I can still refer back to the filled object-(I am using the outline as a mask on…
user3470496
  • 141
  • 7
  • 33
0
votes
1 answer

Query about number of Connected Components

I have written the code to find the number of Connected Components of Directed Graph.When I use the Diagram below as my Adjacency Matrix.It gives the number of Connected Components as 2(First DFS: 0->1->2,Second DFS: 3). But when I use the Diagram…
0
votes
1 answer

R: Identifying Data Frame Rows Connected By Shared Values In Two Columns

My objective is to identify "connected" rows within a single data frame based on the shared values between two columns in R. In this example, there are 10 unique segments (i.e., clusters of data) which are identified by integers corresponding to…
Gerald
  • 3
  • 1
0
votes
0 answers

Finding connected component in undirected graph with union-find algorithm gives wrong answer

I'm using union-find algorithm to find all the connected components of an un-directed graph. For some unknown reasons it gives a wrong answer. The input graph that I give is connected and yet it outputs 2 different labels for that graph. I would be…
user3811219
  • 93
  • 1
  • 8
0
votes
0 answers

Connected components skeleton

I'm working on features extraction from digits skeletons with OpenCV 3.1.0 on C++. I'm looking for a method that give me the number of closed contours in an a skeleton image (for example 2 for 8, 1 for 0,6,9 and 0 for 1,2,3,4,5,7). I used the method…
Anis
  • 36
  • 4
0
votes
2 answers

C++: Vector of Pointers to Objects from another Vector

I have two classes, similar to this: class A { public: B* ptr1; } class B { public: std::vector list; } In the main implementation, I'm doing something like this: int main() { // there are a lot more A objects than B objects, i.e.…
kushy
  • 356
  • 2
  • 14
0
votes
0 answers

How to code a simple connected component labeling with MATLAB?

+---------------+ | | | white | | | +------+ | +---------------+ | | …
tewoos
  • 45
  • 2
  • 10
0
votes
1 answer

Connected components accessing matrix values

I am trying to classify a connected component in a video based on its location. I am using the connectedComponentsWithStats function from opencv 3. I am trying to access values from the stats matrix which is a 1x5 matrix. When i use the following…
0
votes
1 answer

Area of intersection of connected components

I am doing a segmentation task using MATLAB. To analyze the performance of my algorithm, I need the area of intersection of each connected component in both images. In what way are the connected components labelled in an image? Also, does…
Mojo Jojo
  • 369
  • 3
  • 11
  • 31