Use of ROI

Use of ROI


I'am a new User at the IPP.

I will usethe ROI feature with some IPP functions, but I'am not sure if I understand the use of ROI in the right way.
I tryed a Histogram calculation inside the ippisample application in the following way:


IppStatus status = ippiHistogramEven_8u_C3R((Ipp8u*)pSrc->DataPtr(), pSrc->Step(), imgSize, his, lev, levels, minLevel, maxLevel);

It works fine and now I will try to do this just with a part of the image.

For example with a rectangle from the 3rd line and 3rd colum to the 10th line and 10th column. Is the following code correct for this use ?


IppStatus status = ippiHistogramEven_8u_C3R(  ((Ipp8u*)pSrc->DataPtr()+ 2*pSrc->Step()+2) , 10-3, (10-3)*(10-3), his, lev, levels, minLevel, maxLevel);

I moved the source pointer to the left top corner of my ROI and use the width of the ROI as srcStep and the width*height of the ROI as imagesize.

Thanx beforehand

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

IppiSize roi={10-3,10-3};
((Ipp8u*)pSrc->DataPtr() + 2 * pSrc->Step() + 2 * 3),

Message Edited by Seiji-Torigoe on 07-08-2004 09:51 PM

Message Edited by Seiji-Torigoe on 07-13-2004 05:36 PM

What is advantage of using roi over shifting source pointer ?

In general, the machine vision does not process the entire huge image.
It secures the performance by processing only a necessary region.

The performance of this example is uncertain.
However, it is easy.
It might be fast to process it on cashe with the copy of the region in the buffer according to the size and processing.

Leave a Comment

Please sign in to add a comment. Not a member? Join today