- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Im trying to implement Emboss filter through ippiFilter, but I cannot find a way to use an offset value.
Imaging software like Photoshop or GIMP allows setting three parameters for custom filters: convolution matrix, scale and offset.
Is there something like "ippiFilter + offset" I can use for my purposes?
Best regards,
Evgeniy
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
For the offset, do it mean that it only process part of the image? For ippiFilter_ function, you can set the pSrc to start of that part, and also the function set the ROI size for that part.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chao,
Thanks for your reply.
I'm attaching two screenshots from Photoshop to illustrate what I mean.
"Offset" is not a buffer offset.By applying kernel to source image we have some sum for one destination pixel. This sum is divided by divisor and placed to destination buffer and there is no way to add some fixed offset to this result. Some effects like emboss from my screenshots requires constant to be added.
In all imaging software offset is supported and I wonder is there any stuff for this in IPP?
Best regards,
Evgeniy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Evgeniy,
After calling the filter, can this be done with calling ippiAddC_ ? That will add one const value to the image.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, it cannot be done.
ippiFilter_ will truncate negative values to zeros and effect will be wrong.
Let's say, for example, I need to implement color invertion with ippiFilter_.
ippiFilter_ will truncate negative values to zeros and effect will be wrong.
Let's say, for example, I need to implement color invertion with ippiFilter_.
In general it can be done with {0, 0, 0, 0, -1, 0, 0, 0, 0} 3x3 kernel + 255 offset.
Now ippiFilter_ gives me complete black destination buffer after applying kernel and there is nothing to add with constant.
Best regards,
Now ippiFilter_ gives me complete black destination buffer after applying kernel and there is nothing to add with constant.
Best regards,
Evgeniy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Evgeniy,
Thanks for input. I am tracking this function as feature request.
Thanks,
Chao
Thanks for input. I am tracking this function as feature request.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IPP 2107 added the following API, which can support this functionality now:
IPPAPI( IppStatus, ippiFilterBorderSetMode, (IppHintAlgorithm hint, int offset, IppiFilterBorderSpec* pSpec))
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Chao.
I'll try it as soon as I can.
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