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

Copying Pixels

Jump to solution
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
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

View solution in original post

2 Replies
Ying_H_Intel
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

View solution in original post

reportbase
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.
Reply