- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I was using openCV library to implement some image processing functionalities .. and I used this function

**cvInRangeS**(imgHSV, cvScalar(24, 100, 150), cvScalar(34, 255, 255),

imageTest[0]);

which basically filter out the colors in this range (This is a iyellow color)

I fail to locate a function which is simmilar to it in IPP .. any help ?

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

*hello there,*

I was using openCV library to implement some image processing functionalities .. and I used this function

imageTest[0]);

which basically filter out the colors in this range (This is a iyellow color)

I fail to locate a function which is simmilar to it in IPP .. any help?

I was using openCV library to implement some image processing functionalities .. and I used this function

**cvInRangeS**(imgHSV, cvScalar(24, 100, 150), cvScalar(34, 255, 255),imageTest[0]);

which basically filter out the colors in this range (This is a iyellow color)

I fail to locate a function which is simmilar to it in IPP .. any help?

I would try to look at a source code for**cvInRangeS** function. Does it use any **IPP** functions?Another optionto

consider is **IPP** thresholding functions.

Best regards,

Sergey

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

void cvInRangeS( const CvArr* src, CvScalar lower, CvScalar upper, CvArr* dst );

**src**- The first source array.
**lower**- The inclusive lower boundary.
**upper**- The exclusive upper boundary.
**dst**- The destination array, must have 8u or 8s type.

The function `cvInRangeS`

does the range check for every element of the input array:

dst(I)=lower_{0}<= src(I)_{0}< upper_{0}

for a single-channel array,

dst(I)=lower_{0}<= src(I)_{0}< upper_{0}&& lower_{1}<= src(I)_{1}< upper_{1}

for a two-channel array etc.

`dst(I)`

is set to 0xff (all '1'-bits) if `src(I)`

is within the range and 0 otherwise.
All the arrays must have the same size (or ROI size)

-------------------------------------------------------

so it is basically like the threshold function, but instead of having ony the minimum or only the maximum value... it has both the max and min .. to include all the values between them..

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

**void cvInRangeS( const CvArr* src, CvScalar lower, CvScalar upper, CvArr* dst );**

**src**- The first source array.
**lower**- The inclusive lower boundary.
**upper**- The exclusive upper boundary.
**dst**- The destination array, must have 8u or 8s type.

The function `cvInRangeS`

does the range check for every element of the input array:

dst(I)=lower_{0} <= src(I)_{0} < upper_{0}

for a single-channel array,

dst(I)=lower_{0}<= src(I)_{0}< upper_{0}&& lower_{1}<= src(I)_{1}< upper_{1}

for a two-channel array etc.

is set to 0xff (all '1'-bits) if

dst(I)`src(I)`

is within the range and 0 otherwise. All the arrays must have the same size (or ROI size)

Do you have the source codes for the **OpenCV** library? If Yes, try to look at how the **cvInRangeS**function is implemented.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

IPP haven'texact function for this. But as sergey suggested, ipp thresholdshould be ofhelp.

**for example,**

ippThreshold_LTValGTVal

Performs double thresholding of pixel values in an image buffer.

**Case 4: In-place operation on multi-channel data**

IppStatus ippiThreshold_LTValGTVal_

## Description

The function ippiThreshold_LTValGTVal is declared in the ippi.h file. It operates with ROI (see Regions of Interest in Intel IPP).

This function thresholds pixels in the source image pSrc using two specified levels thresholdLT and thresholdGT. Pixel values in the source image are compared to these levels. If the pixel value is less than thresholdLT, the corresponding output pixel is set to valueLT. If the pixel value is greater than thresholdGT, the output pixel is set to valueGT. Otherwise, it is set to the source pixel value. The value of thresholdLT should be less than or equal to thresholdGT.

Best Regards,

Ying H.

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