ippiFloodFill bug @ SeedPoint

ippiFloodFill bug @ SeedPoint

Hi I've run the example and might found a Bug.

Using IPP 7.0, VS 2010

The Problem is, when the Seed-Point Value is equal as the new Value, the ippiFloodFill wouldn't run (Area is 0). As seen in the code below.

Changing the New Value to 255 / 253 everything works fine. Area is 13 (as you can count). Is this a bug or a not dokumentet feature?

    Ipp8u pImage[8*8] ={ 0, 1, 200, 3, 4, 5, 6, 7,
        0, 1, 200, 3, 4, 5, 6, 7,
        0, 1, 254, 3, 4, 5, 6, 7,
        0, 1, 254, 3, 4, 5, 6, 7,
        0, 1, 255, 180, 180, 180, 180, 180,
        0, 1, 200, 3, 4, 5, 6, 7,
        0, 1, 200, 3, 4, 5, 6, 7,
        0, 1, 200, 3, 4, 5, 6, 7};

    IppiSize roiSize = { 8, 8 };
    IppiPoint seed = { 2, 2 };
    Ipp8u newVal = 254;
    Ipp8u minDelta = 100;
    Ipp8u maxDelta = 255;

    int pBufferSize;
     IppiConnectedComp pRegion;

     pRegion.area = 0;
 
    ippiFloodFillGetSize_Grad ( roiSize, &pBufferSize );
    Ipp8u* pBuffer = ippiMalloc_8u_C1 ( 8, 8, &pBufferSize );    
    ippiFloodFill_Range8Con_8u_C1IR ( pImage, 8, roiSize, seed, newVal, minDelta, maxDelta, &pRegion, pBuffer );

10 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

>>...Using IPP 7.0, VS 2010

Thanks for the information. What IPP release do you use?

>>The Problem is, when the Seed-Point Value is equal as the new Value, the ippiFloodFill wouldn't run...

This is how the function is declared:

...
IPPAPI( IppStatus, ippiFloodFill_Range8Con_8u_C1IR, ( Ipp8u* pImage, int imageStep,
IppiSize roiSize, IppiPoint seed,
Ipp8u newVal, Ipp8u minDelta, Ipp8u maxDelta,
IppiConnectedComp* pRegion, Ipp8u* pBuffer ))
...

and as you can see seed is IppiPoint type and newVal is Ipp8u type. Do you use seed as follows:

...
IppiPoint seed = { 255, 255 };
...

or somehow else?

Hi Sergey,

Thanks for you postings. I'm using the Intel_IP7.0ia32 version.

The seed points requires the x,y coordinate (px) of the seed in the image. The function should start to fill at the seed point. You can try the code example above with your seed
IppiPoint seed = { 255, 255 };
It is out of range since the image is just 8x8 .-(

Point is, the grey value (254) of the seed (2,2) is the same as the new value (254) the function start to fill. If I change the grey value at (2,2) to e.g. 253 it fills.

If you have a look in the dokumentation at the Description, the condition at point (2,2) is fulfilled.

For me this is a strange behavoir / Bug.

Thanks for these details. When I've asked for a Release number I actually wanted to see an IPP Build Number ( Sorry for a misleading question ).

Please take a look at ippversion.h header file. For example, it looks as follows:

...
#if !defined( __IPPVERSION_H__ )
#define __IPPVERSION_H__

#define IPP_VERSION_MAJOR 7
#define IPP_VERSION_MINOR 0
#define IPP_VERSION_BUILD 205
...

What is IPP_VERSION_BUILD number?

HI

Thanks for your support. The IPP_VERSION_BUILD is the 205.

Hi, what I can see with the latest version 8.0 :

newVal = 254

ippCV PX (px) 8.0.0 (r40040) 8.0.0.40040
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 255 180 180 180 180 180
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
Press any key to continue . . .

newVal = 253
ippCV PX (px) 8.0.0 (r40040) 8.0.0.40040
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 253 253 253 253 253
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
Press any key to continue . . .

from my undestanding all is ok.

Hi everybody,

>>...what I can see with the lates version 8.0...

I used IPP version 7.0.205 ( the same as R.S. uses ) and I'd like to confirm what R.S. reported. Please take a look at a Test-Case I've created based on initial piece of codes.

Fichiers joints: 

Fichier attachéTaille
Télécharger test039.cpp3.38 Ko

// Output for Test-Case 1 - Ipp8u newVal = 253
/*
Data Before Processing:
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 255 180 180 180 180 180
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7

Data After Processing:
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 253 253 253 253 253
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
0 1 253 3 4 5 6 7
*/

// Output for Test-Case 2 - Ipp8u newVal = 254 - Note: There is No change in data after processing
/*
Data Before Processing:
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 255 180 180 180 180 180
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7

Data After Processing:
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 255 180 180 180 180 180
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
*/

// Output for Test-Case 3 - Ipp8u newVal = 255
/*
Data Before Processing:
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 254 3 4 5 6 7
0 1 255 180 180 180 180 180
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7
0 1 200 3 4 5 6 7

Data After Processing:
0 1 255 3 4 5 6 7
0 1 255 3 4 5 6 7
0 1 255 3 4 5 6 7
0 1 255 3 4 5 6 7
0 1 255 255 255 255 255 255
0 1 255 3 4 5 6 7
0 1 255 3 4 5 6 7
0 1 255 3 4 5 6 7
*/

>>...what I can see with the lates version 8.0...

Gennady, This is simply to let you know that user R. S. uses IPP version 7.0.205. I don't know if R. S. is ready or interested to upgrade IPP library to version 8.0 ( it is still Preview ).

Connectez-vous pour laisser un commentaire.