- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am having trouble with using the ippiCopyReplicateBorder function when performing the in-place operation. I used the not-in-place operation without a problem but I get "Access violation reading location" errors when I try to use the "in-place" Copy version.
I have a 1504x1504 byte image and I am trying to add a (16 pixel) border around in order to run the Median Filter function on the image. My confusion is what to set the "srcDstStep" argument to? I tried 1504 and 1536. I am not sure where my error is.
Can I copy the whole image using the "in-place" operation and add the needed border to it? Then I would not need to create a copy of the image on which I perform the median filtering.
Function call:
ippiCopyReplicateBorder_8u_C1IR(ippImg,srcDstStep,roi,roi2,height,width);
ippImg = 1504 by 1504 byte image
roi = 1504x1504
roi2 = 1536x1536
height = 16
width = 16
Thanks for your help in advance.
ippiCopyReplicateBorder_8u_C1IR(ippImg+stepBytes*10,500,roi4,roi3,16,16);
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hello,
in case of in-place operations, your source image should be located inside your destination image. It means you allocate extra memory, taking into account border size, then somehow you place your data inside that bigger image (you point pSrc to the first pixel of your inner image). The line step is step in your outer image. The function will just set border pixels into specified value, no image copy operation is needed in that case.
Regards,
Vladimir
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Vladimir,
Thanks for the clarification. I guess for my filtering applicationthe in-place operation is not necessary since itadds extra steps to get the same final point (since the "not in-place" Copy operation creates the wanted image with the border in function call step).
Thanks for your time,
Petrovic
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
It is up to you to decide what is better fits your needs. Just note from my side is that with in-place operations you use less memory, so more chances to keep everything in cache (at least L2 in case of your big images)
Vladimir
