- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my program multiply the RGB vector of a image by a float value,the data type of image is Ipp16s,I write below code to do the multiply:
float ratio=0.5f;//the float value
Ipp16s mulValue[]={IppMax16S*ratio,IppMax16S*ratio,IppMax16S*ratio};
ippiMulC_16s_AC4RSfs(pTempSrc,lineBytesEx,mulValue,pTempDst,lineBytesEx,roiSize,16);//wrong
the result of above code is wrong,and I think the key is that the input of "mulValue" and "scaleFactor" param is wrong,but I can't understand the explaination in SDK,so where is the problem of my code?How to rewrite it?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
seems you need to do shift by 15 not by 16:
ippiMulC_16s_AC4RSfs(pTempSrc,lineBytesEx,mulValue,pTempDst,lineBytesEx,roiSize,15);
Regards,
Vladimir
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