- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
Lien copié
7 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Evgeniy,
After calling the filter, can this be done with calling ippiAddC_ ? That will add one const value to the image.
Thanks,
Chao
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
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
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
IPP 2107 added the following API, which can support this functionality now:
IPPAPI( IppStatus, ippiFilterBorderSetMode, (IppHintAlgorithm hint, int offset, IppiFilterBorderSpec* pSpec))
Thanks,
Chao
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you, Chao.
I'll try it as soon as I can.
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable