- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a newbie issue with ipp in understanding ROI.
What I'm trying to do is to is to "paint" using ippiCopy a small image into a much larger image to build up a composite image. My problem is that I don't understand how to configure the region of interest (ROI) for the destination. The code I'm using is below. I'm trying to write newImage into location target.x, target.y in to large image named buffer.
My problem is that I don't see how to configure the starting X coordinate in the target image.
What I'm trying to do is to is to "paint" using ippiCopy a small image into a much larger image to build up a composite image. My problem is that I don't understand how to configure the region of interest (ROI) for the destination. The code I'm using is below. I'm trying to write newImage into location target.x, target.y in to large image named buffer.
[cpp] IppiSize roi; roi.height = newImage->height(); roi.width = newImage->width(); IppStatus resultCopy = ippiCopy_8u_C4R(newImage->scanLine(0), newImage->width()*4, buffer->scanLine(target.y), buffer->width()*4, roi);[/cpp]
My problem is that I don't see how to configure the starting X coordinate in the target image.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You can configure the X coordinate by shift the target image's starting position.
For example,
assume the buffer->scanLine(target.y)is pointing to Buffer
Then you can enterbuffer->scanLine(target.y)+target.x*4 directly as pDst parameter.
Or any other way, whichcan make sure that pDst pointers to the starts position ofdestination ROI Buffer.
There isa picture in IPP manual ippiman.pdf, Figure 2-1 Image, ROI, and Offsets. You may refer it.
Regards,
Ying
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