- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[bash]Ipp8u mask[9] = {0,1,0,1,1,1,0,1,0}; // some random kernel IppiSize maskSize = {3,3}; IppiPoint anchor = {1,1}; IppiMorphState* morphState = NULL; IppStatus status; ippiMorphologyInitAlloc_8u_C1R(dstRoiSize.width, mask, maskSize, anchor, &morphState); status = ippiErodeBorderReplicate_8u_C1R(pSrc, srcStep, pDst, dstStep, dstRoiSize, ippBorderRepl, morphState); ippiMorphologyFree(morphState);[/bash]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you try the latest version?
( geta 30-dayseval version fromIntel Downloads, Registration and Licensing
As you haven't provide the test image,Itried the sample 8-2
#include
#include
#include "ipp.h"
int main()
{
// Print the version of ipp being used
const IppLibraryVersion* lib = ippiGetLibVersion();
printf("%s %s %d.%d.%d.%d\n", lib->Name, lib->Version,lib->major, lib->minor, lib->majorBuild, lib->build);
IppiMorphState* ppState;
IppiSize roiSize = {5, 5};
Ipp8u pMask[3*3] = {1, 1, 1,1, 0, 1,1, 1, 1};
IppiSize maskSize = {3, 3};
IppiPoint anchor = {1, 1};
Ipp8u pSrc[5*5] = {
1, 2, 4, 1, 2,
5, 1, 2, 1, 2,
1, 2, 1, 2, 1,
2, 1, 5, 1, 2};
int srcStep = 5;
int dstStep = 5;
Ipp8u pDst[5*5];
int dstSize = 5;
IppStatus status;
ippiMorphologyInitAlloc_8u_C1R( roiSize.width, pMask, maskSize, anchor,
&ppState);
status = ippiErodeBorderReplicate_8u_C1R( pSrc, srcStep, pDst, dstStep, roiSize,
ippBorderRepl, ppState);
printf ("ippiErodeBorderReplicate return %s\n", ippGetStatusString(status));
ippiMorphologyFree(ppState);
int i=0, j=0;
for ( i=0; i<5; i++)
{
for (j=0;j<5; j++)
printf("%d \t", pDst[i*5+j]);
printf("\n");
}
return 0;
}
I have the below result.
ippiv8-7.0.dll 7.0 build 205.58 7.0.205.1054
ippiErodeBorderReplicate return ippStsNoErr: No error, it's OK
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
0 0 0 0 0
Press any key to continue . . .
Please try it and let me know if any result.
Regards,
Ying H.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you tell theplace of wrong result you are seeing? And if possible, please try the latest Ipp version?
I print some value of the test image and result image. Theirresultseems ok.
With T mask.
Src:
src[0] [0:9] and src [1][0:9]
103 95 95 102 108 112 112 109 107 108110 103 104 110 113 113 112 108 108 110
Dst:
dst[0] [0:9] anddst [1][0:9]
95 95 95 95 102 108 109 107 107 107
95 95 95 95 102 108 109 107 107 107
src[510] [250:259] and src [511][250:259]
(110) 112 114 111 109 111 111 115 106 113 112
(110) 111 113 110 108 109 110 114 105 112 111
dst[510] [250:259] anddst [511][250:259]
111 112 110 108 109 110 107 105 107 111
110 111 109 108 109 110 106 105 106 111
Regards,
Ying
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page