Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Use of ROI

hrhfhgemt
Beginner
426 Views
Hi,
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:
Code:
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 ?
Code:
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
Peter
0 Kudos
3 Replies
seiji-torigoe
Beginner
426 Views
IppiSize roi={10-3,10-3};
ippiHistogramEven_8u_C3R(
((Ipp8u*)pSrc->DataPtr() + 2 * pSrc->Step() + 2 * 3),
pSrc->Step(),
roi,
his,
lev,
levels,
minLevel,
maxLevel);

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

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

0 Kudos
Maciej_K_
Beginner
426 Views
What is advantage of using roi over shifting source pointer ?
0 Kudos
seiji-torigoe
Beginner
426 Views
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.
0 Kudos
Reply