Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Temporary Buffers

Intel_C_Intel
Employee
739 Views

I'm having trouble with commands involving temporary buffers -- like FloodFill.

I'm getting linker error on the FloodFillGetSize and the FloodFill commands.I'm not sure what to do and I don'r recall seeing any examples.

Here's a sample of the code I'm using.

THANKS

________________________________________

IppiSize ROI = {roi.width,roi.height};

int BufSize;

ippiFloodFillGetSize(ROI, &BufSize);

IppiPoint seed = {0,0};

IppiConnectedComp *pRegion;

char* pBuffer = new char[BufSize];

ippiFloodFill_4Con_8u_C1IR(binIPP, width, ROI, seed, 125, pRegion, pBuffer);

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
739 Views

Wetried to build ex.cpp file - it compiles and links OK, the only library required is ippcv.lib

FloodFill functions have not been changed since 4.0 release

#include "ippcv.h"

int main()
{
IppiSize ROI = {2,3};
int BufSize,width=2;

ippiFloodFillGetSize(ROI, &BufSize);
IppiPoint seed = {0,0};
IppiConnectedComp *pRegion;
char* pBuffer = new char[BufSize];
unsigned char* binIPP = new unsigned char[2*3];

ippiFloodFill_4Con_8u_C1IR(binIPP, width, ROI, seed, 125, pRegion, pBuffer);
}

Wethink the errror is somewhere else (wrong settings or lib is not included),
What is the error message?

Regards,
Vladimir
0 Kudos
Intel_C_Intel
Employee
739 Views
Hi Vladimir
I did get it to link. I had to add all of the lib files from /stublib to the project -- using Project, Add Existing Items. This way the files were included in the linking process.
I don't understand why I had to do thissince ippi20 was linked to the project. I did set thepath correctly for the library files. I did notice that ippenv.bat did not set the system variables when I first installed IPP40. I had to manually set them.
It's kind of weird. I didn't have linker problems until I used the FloodFill commands. I'm probably missing something in the project properties or system varibales.
I am able to compile and link now.
THANKS for responding :)
0 Kudos
Vladimir_Dudnik
Employee
739 Views

The trick is we use ippi prefix for functions which resides not only in ippi20.lib. In other words, ipp - means IPP domain which work with 2D signals, like image processing, computer vision, video compression and still image compression. So, your function is in ippcv library, because it is from computer vision domain. So, you can just remove all unnecessary libraries to have clear vision of what you are using from IPP. (Or you can leave it as is, no problems with specifying all the IPP libraries, I believe linker will notlink library to your project if there is no references to it). Anyway, I glad that you solved this issue.

Regards,
Vladimir

0 Kudos
Reply