views:

170

answers:

1

When I type the following code line.. where img_hsv is a Mat image...

IplImage abc=img_hsv;


// object that will contain blobs of inputImage
CBlobResult blobs;

// Extract the blobs using a threshold of 100 in the image
blobs = CBlobResult(&abc,NULL,100,true);

It displays the following error...

error C2661: 'CBlobResult::CBlobResult' : no overloaded function takes 4 arguments.. Any help is welcome...!!

A: 

You probably have code written for an older library. Have a look at the header file, I guess the constructor has only 3 arguments. Remove true, then it should work.

This discussion might point out the problem with more details: http://tech.groups.yahoo.com/group/OpenCV/message/61534 to help you finding a maybe more suitable solution if simply removing the flag does have some undesirable side effects.

jdehaan
yes it still doesn't work...now the modified line is blobs = CBlobResult(still it gives errors...
Kaushal
what errors? compiler errors, linker errors or runtime errors? what do you see? not easy to help with no information. :-)
jdehaan
Kaushal
you forgot to link to the opencv library. Look at your linker settings (project settings) and add the appropriate lib. http://stackoverflow.com/questions/2282216/configuring-opencv-with-visual-c-2008
jdehaan
nope .. i linked the opencv libraries correctly.... but blogslib libraries couldn't be linked ... can you please suggest how to do that for a VC++ 2008 edition?
Kaushal
add it into the linker settings or add a `#pragma comment(lib, "blobslib.lib")` somewhere in an appropriate header or source file (perhaps stdafx.cpp could be a good idea)
jdehaan