Community
cancel
Showing results for
Did you mean:
Beginner
94 Views

## Copying Pixels

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.)
1 Solution
Employee
94 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

2 Replies
Employee
95 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

Beginner
94 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.