- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let say there is a 7x5 matrix (16-bit image) with the following values, and a raster with equdistant length of 3 pixels between the lines. So I want to copy every 3rd value into a new 3x2 matrix
=>
0 3 6 21 24 27
I tried ippiCopySubpix_16u_C1R but it does not seem to be the correct function. Do you have any ideas how to solve it? I'm using IPP 5.2.
Thanks.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
On a common PC and For small images up to 640x480, c\c++ implementation might be faster than using IPP.
If the images are of constant size and are as small as 5x7 than hard coding is probably the fastest way.
That is because the code is reading from only a fraction of the memory.
Many rows are not even looked at, and may not even be loaded into the cache ( any real expert, please correct me here if I'm wrong)
If you have very big images or want to use IPP anyway you could do the following:
For every third row,
use the ippsSampleDown function.
Very useful function, ippsSampleDown.
If you do not have that function in 5.2 you could use a combination of ippscopy, shift, logical and arithmetic ops to do the same.
It becomes a little more complex.
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you check the
ippiCopy_16u_C3C1R ( )
function, and see if it can meet your requirement?
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
btw, the IPP 5.2 is pretty old version, if possible, I would suggest you upgrade to the new IPP versions, which include the new optimization, bug fix, etc.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
On a common PC and For small images up to 640x480, c\c++ implementation might be faster than using IPP.
If the images are of constant size and are as small as 5x7 than hard coding is probably the fastest way.
That is because the code is reading from only a fraction of the memory.
Many rows are not even looked at, and may not even be loaded into the cache ( any real expert, please correct me here if I'm wrong)
If you have very big images or want to use IPP anyway you could do the following:
For every third row,
use the ippsSampleDown function.
Very useful function, ippsSampleDown.
If you do not have that function in 5.2 you could use a combination of ippscopy, shift, logical and arithmetic ops to do the same.
It becomes a little more complex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great! Exactly what I wanted. Thanks!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page