- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sepia on a picture is basically color conversion, Intel IPP has got several APIs for this type of operation, like Color models conversion, Gamma correction, Color twist, Color keying etc. I am sure you can use IPP for sepia on an image.
Sorry, I dont know how to do it using OpenCV, also this forum is intended for Intel IPP discussion, feel free to share your experience on using IPP for sepia.
Regards,
Naveen Gv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
// Convert RGB to gray
IppiSize roi;
roi.width = uiWidth;
roi.height = uiHeight;
status = ippiRGBToGray_8u_C3C1R((const Ipp8u*)uiInputImage, uiWidth*3, (Ipp8u*)pGrayImage, stepBytes, roi);
// Copy gray channels to color image
status = ippiDup_8u_C1C3R((const Ipp8u*)pGrayImage, stepBytes, (Ipp8u*)uiOutputImage, uiWidth*3, roi);
//Shift colors
const Ipp8u movColor[3] = { 162, 138, 101 };
status = ippiAddC_8u_C3IRSfs(movColor, (Ipp8u*)uiOutputImage, uiWidth*3, roi, 1);
// Shift colors
unsigned int newR, newG, newB;
newR = (unsigned int)(R * 0.393 + G * 0.769 + B * 0.189); if (newR > 255) newR = 255;
newG = (unsigned int)(R * 0.349 + G * 0.686 + B * 0.168); if (newG > 255) newG = 255;
newB = (unsigned int)(R * 0.272 + G * 0.534 + B * 0.131); if (newB > 255) newB = 255;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regards,
Vladimir

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page