Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Effecient ways to merge blob whose position inside another blob using cvbloblib

I basically want to remove all blobs whose positions insides another blobs.

image description

I use the cvbloblib . 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)="" }="" }="" }<="" p="">

However there are some issues :

  1. iterative ways is not effecient way

  2. we you see in the image above, 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 ?

Effecient ways to merge blob whose position inside another blob using cvbloblib

I basically want to remove all blobs whose positions insides another blobs.

image description

I use the cvbloblib . 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)="" }="" }="" }<="" p="">

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. we you see in the image above, 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 ?

Effecient ways to merge blob whose position inside another blob using cvbloblib

I basically want to remove all blobs whose positions insides another blobs.

image description

I use the cvbloblib . 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. we you You see in the image above, 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 ?

click to hide/show revision 4
retagged

updated 2014-02-25 04:45:13 -0600

berak gravatar image

Effecient ways to merge blob whose position inside another blob using cvbloblib

I basically want to remove all blobs whose positions insides another blobs.

image description

I use the cvbloblib . 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. You see in the image above, 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 ?

Effecient ways to merge blob whose position inside another blob using cvbloblib

I basically want to remove all blobs whose positions insides another blobs.

image description

I use the cvbloblib . 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. You see in the image above, 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 ?