0

I want to merge the blob whose position inside another blobs.

I use the cvbloblib opencv c++. I can get all the blobs; however, the library basically detect all blob even the position of those blob inside another.

I think of using iterative ways to detect if each blob inside another and merge them together.

for (int i = 0; i<res.GetNumBlobs(); i++){
       for (int j = 0; i<res.GetNumBlobs(); i++){
              //find if each blob is inside another
              if(condition blob(i) inside){
                       //delete
                       //break or return to another blob(i+1)
              }
       }
 }

However there are some issues :

  1. iterative ways is not effecient way
  2. There are the cases where a blobs insides not 1 but could be another N blobs. so I tend to think about recursive function to do that.

Do you have any ways to merge those blobs inside ?

EDITED

Sample image here in this forum

sayvortana
  • 825
  • 2
  • 16
  • 32
  • I think that if you want to get any help, you will have to provide more details. I don't quite understand what you want to "merge" or detect and what the constraints are exactly. – Germán Diago Feb 25 '14 at 11:48
  • @GermánDiago I hope you can carefully read the question and see every links i provided – sayvortana Feb 25 '14 at 12:10
  • I did before putting my comment. Take into account you know very well your problem, but you must make others understand. Noone is going to do that homework for you if you don´t make it easy to be helped. – Germán Diago Feb 25 '14 at 13:14

0 Answers0