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

Copying Pixels

reportbase
Beginner
475 Views
Lets say I have an ROI with a height of 100 pixels. I want to copy all the pixels from the first row and
paste them onto the next 99 rows. Of course, I know that I can loop through the rows
and do it.

My question, is there a fast optimized way to do this in IPP, where the algorithm just pastes the same set of pixels
onto the entire ROI.

(This is uesful if you want to expand an image at a given x-y coordinate.)
0 Kudos
1 Solution
Ying_H_Intel
Employee
475 Views
Quoting - reportbase
Lets say I have an ROI with a height of 100 pixels. I want to copy all the pixels from the first row and
paste them onto the next 99 rows. Of course, I know that I can loop through the rows
and do it.

My question, is there a fast optimized way to do this in IPP, where the algorithm just pastes the same set of pixels
onto the entire ROI.

(This is uesful if you want to expand an image at a given x-y coordinate.)

Hello

may you try the function

IppStatus ippiCopyReplicateBorder_c8u_C1IR(const Ipp* pSrc, int srcDstStep, IppiSize srcRoiSize, IppiSize dstRoiSize, int topBorderHeight,int leftBorderWidth);
see if it can meet your request?

(the functionis supposedbe able tocopy

1 2 3 4 5
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
to
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5)

Regards,
Ying

View solution in original post

0 Kudos
2 Replies
Ying_H_Intel
Employee
476 Views
Quoting - reportbase
Lets say I have an ROI with a height of 100 pixels. I want to copy all the pixels from the first row and
paste them onto the next 99 rows. Of course, I know that I can loop through the rows
and do it.

My question, is there a fast optimized way to do this in IPP, where the algorithm just pastes the same set of pixels
onto the entire ROI.

(This is uesful if you want to expand an image at a given x-y coordinate.)

Hello

may you try the function

IppStatus ippiCopyReplicateBorder_c8u_C1IR(const Ipp* pSrc, int srcDstStep, IppiSize srcRoiSize, IppiSize dstRoiSize, int topBorderHeight,int leftBorderWidth);
see if it can meet your request?

(the functionis supposedbe able tocopy

1 2 3 4 5
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
to
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5)

Regards,
Ying

0 Kudos
reportbase
Beginner
475 Views
Quoting - Ying H (Intel)

Hello

may you try the function

IppStatus ippiCopyReplicateBorder_c8u_C1IR(const Ipp* pSrc, int srcDstStep, IppiSize srcRoiSize, IppiSize dstRoiSize, int topBorderHeight,int leftBorderWidth);
see if it can meet your request?

(the functionis supposedbe able tocopy

1 2 3 4 5
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
to
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5)

Regards,
Ying


Thank You. That did the trick.
0 Kudos
Reply