Society of Robots - Robot Forum

Software => Software => Topic started by: evilknight007 on November 12, 2008, 09:13:22 PM

Title: CvBlobslib-Buildtime error
Post by: evilknight007 on November 12, 2008, 09:13:22 PM
Hey guys..
I have just downloaded the cvBlobslib (OpenCV) for imageprocessing.
But i am not able to build the project that came along with the download.
Has anyone encountered the problem.

am attaching the buildlog along here.


cl : Command line warning D9002 : ignoring unknown option '/Qopenmp'
BlobExtraction.cpp
c:\my documents\firefox
downloads\cvblobslib_opencv_v6\blobextraction.cpp(109) : error C2039: 'rows' : is not a member of '_IplImage'
e:\program files\opencv\cxcore\include\cxtypes.h(366) : see declaration of '_IplImage'
c:\my documents\firefox
downloads\cvblobslib_opencv_v6\blobextraction.cpp(109) : error C2039: 'rows' : is not a member of '_IplImage'
e:\program files\opencv\cxcore\include\cxtypes.h(366) : see declaration of '_IplImage'
c:\my documents\firefox
downloads\cvblobslib_opencv_v6\blobextraction.cpp(109) : error C2039: 'cols' : is not a member of '_IplImage'
e:\program files\opencv\cxcore\include\cxtypes.h(366) : see declaration of '_IplImage'
c:\my documents\firefox
downloads\cvblobslib_opencv_v6\blobextraction.cpp(109) : error C2039: 'cols' : is not a member of '_IplImage'
e:\program files\opencv\cxcore\include\cxtypes.h(366) : see declaration of '_IplImage'
BlobResult.cpp
c:\my documents\firefox
downloads\cvblobslib_opencv_v6\blobresult.cpp(17) : fatal error C1083:
Cannot open include file: 'afx.h': No such file or directory
blob.cpp
Generating Code...
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.

BSCMAKE: error BK1506 : cannot open file '.\Debug\BlobResult.sbr': No
such file or directory


I ran a quick search thru the blobextraction.cpp but still there were no reference to 'cols' or 'rows'..

Pls help. :-[
Title: Re: CvBlobslib-Buildtime error
Post by: Admin on November 14, 2008, 07:11:09 AM
It looks like it can't find certain dependencies. For example, the code is linking to other files, but those other files are either not existent or are in folders that your compiler isn't looking at.
Title: Re: CvBlobslib-Buildtime error
Post by: evilknight007 on November 16, 2008, 01:54:40 AM
Thanks for the reply..

But i tried backtracking and did not find any reference to 'cols' or 'rows' in blobextraction.cpp which seems to be  causing the problem.
Looks like i am going to be stuck in this for a while.. can't proceed further without blobs :( :( .
Is there any other ways to detect blobs without the library.

P.S: i am surprised that nobody else has reported about this problem.Four of my friends here could not get it working either  ???


Title: Re: CvBlobslib-Buildtime error
Post by: paulstreats on November 16, 2008, 06:49:17 PM
I believe this is the error right here:

Quote
Copyright (C) Microsoft Corporation. All rights reserved.

 ;D
Title: Re: CvBlobslib-Buildtime error
Post by: Cyborg16 on November 18, 2008, 04:26:44 PM
Replace:

if( !CV_ARE_SIZES_EQ(inputImage, maskImage ) )

with:

if( inputImage->width != maskImage->width || inputImage->height != maskImage->height )

Building in release mode instead of debug mode eliminates the need for MFC.
Title: Re: CvBlobslib-Buildtime error
Post by: evilknight007 on November 18, 2008, 08:00:23 PM
 ;D ;D

Hey Cyborg16.

Thanks a lot man.It worked!!

Again SOR rocks.

Do you mind if i post it in the openCV yahoo groups. No one there seems to know what the problem is.
 :)
Title: Re: CvBlobslib-Buildtime error
Post by: soarnic on November 27, 2008, 02:52:35 AM
the original code definition as followed:

#define CV_ARE_SIZES_EQ(mat1, mat2) \
    ((mat1)->rows == (mat2)->rows && (mat1)->cols == (mat2)->cols)

//if( !CV_ARE_SIZES_EQ(inputImage, maskImage ) )

I believe the correct answer thould be this:


if(!( inputImage->width == maskImage->width && inputImage->height == maskImage->height ))

upstair is correct also. But is seems hard to understand.
Title: Re: CvBlobslib-Buildtime error
Post by: evilknight007 on November 28, 2008, 04:08:36 AM
:(

I was able to build the library.
But when i tried to run a program there was a fatal error.
When the statement with "CBlobResult" was executed..
Any ideas??
Title: Re: CvBlobslib-Buildtime error
Post by: soarnic on December 03, 2008, 01:22:59 AM
1>BlobResult.cpp
1>Creating library...
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 8.00.50727
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Performing Post-Build Event...
1>copiant Debug\cvblobslib.lib a lib\cvblobslib.lib
1>Build log was saved at "file://c:\Documents and Settings\Administrator\cvblob\Debug\BuildLog.htm"
1>cvblobslib - 0 error(s), 5 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

notice: cvblobslib.lib, you read the user document.
Title: Re: CvBlobslib-Buildtime error
Post by: happyuk on July 05, 2012, 01:04:05 PM
I have a blog posting that deals with some of the gotchas involved in setting up cvBlobsLib in Micosoft Visual Studio environments:

http://www.technical-recipes.com/2011/object-detection-using-the-opencv-cvblobslib-libraries/ (http://www.technical-recipes.com/2011/object-detection-using-the-opencv-cvblobslib-libraries/)