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

Clarification for Opencv API cvFilter2D()

rajikha
Beginner
509 Views
Hi,

I am trying to convert IPL API iplConvolve2D() to OpenCV API cvFilter2D() with the same buffer ,kernel and anchor point.
But the results from both the APIs are different.
Could you please explain me how to do this?
What is the API corresponding to iplConvolve2D() in OpenCV?

Information regarding data I used:

void cvFilter2D(const CvArr* src,CvArr* dst,const CvMat* kernel,CvPoint anchor = cvPoint(-1,-1));

1. src - IPLImage of IPL_DEPTH_16U , 1024x 1024
2. dst of same type and size as that of src
3. kernel - size 26 x 26, filled with few 1s and rest 0s
4. Anchor point = tried both (-1,-1) and (12,12)

iplConvolve2D(src,dst,Kernel,1,0);
1. src and dst same as in cvFilter2D
2. kernel same as in cvFilter2D
3. Anchor = 12,12

Thanks for any help.

Regards,
Rajikha
0 Kudos
5 Replies
Ying_H_Intel
Employee
509 Views
Hi Rajikha,

It seems not a real ipp question in IPP forum , but some kind of related :).

we assumedIPLshould be replaced with IPP
and OpenCV have it's owndiscussion group ( Please see Intel IPP - Open Source Computer Vision Library (OpenCV) FAQ).

Just quick comment, how different of the results from both the APIs ? It is because cacluating error like precisionlossor saturation problem as the data type IPL_DEPTH_16U or they are completely different?).

If just from the functionality, the OpenCV API cvFilter2D() should be ok to replace ofiplConvolve2D.

Best Regards,
Ying
0 Kudos
rajikha
Beginner
509 Views
Hi,

I have tested both the APIs(IPL and OpenCV)with a sample buffer of size 4x4(filled with all 1s)and kernel of size 3x3(again filled with all 1s) and in this case the data array is of depth IPL_DEPTH_8U.
I could see the difference only for the border pixels(which anyways I could overcome using a cvCopyMakeBorder).

But in my application, i am using data of type IPL_DEPTH_16U, which is showing different results( PFA the output buffers for IPL-iplConvolve2D and OpenCV-cvFilter2D)

Details of Attachment: Raw buffer which can be opened in any image editor as raw data image
1.Image Size : 1024x1024; 16bit unsigned
2. IPL filename : IPL16Bit_iplConvolve2D
3. openCV fileneame : OpenCV16Bit_cvFilter2D

Regards,
Rajikha
0 Kudos
Naveen_G_Intel
Employee
509 Views

Hi Rajikha,

I strongly suggest you to migrate into Intel IPP, we have published migration documentation - Intel IPL Migration Documentation

Sorry to say that, we are no longer supporting IPL. Let us know if you have speciific question related to usage of IPP with OpenCv.

Regards,

Naveen Gv

0 Kudos
SergeyKostrov
Valued Contributor II
509 Views
...I strongly suggest you to migrate into Intel IPP...

Naveen, could youunderstand that some companies are still using IPL because they possiblywork in a very regulated,
for example byISO 8000 standard,industries? In such cases a Software Developer can't do everything he or she wants.

Best regards,
Sergey
0 Kudos
Not applicable
509 Views
 
0 Kudos
Reply