help needed for opencvExample,blob center identifying


I am currently using the pre-release v.0062

and i am working with the opencvExample in the addons example folder.

I was wondering if i would be able to identify the center (x,y) of the blob being drawn by this program.

I tried simply using

getX =;  
getY =;  

it compiles but the whole program simply closes after i run it.

and it gives me an error in the command prompt…

This application has requested the Runtime to terminate it in an unusal way. Please contact the application’s support team for more information

anybody has any idea how to identify the center of a single blob.

are you sure your blobs vector is popoluated (ie. there’s at least 1 blob inside)?

if it’s empty you’ll try to read garbage memory and the app will close

Oh, thanks, fixed by using

    for (int i = 0; i < contourFinder.nBlobs; i++){  
        getX =;  
        getY =;  

Thanks man!