Region Thresholding ....

Region Thresholding ....


I have been looking around and I cannot find a function which would give you the min/max X/Y values for an image (one or three channel) for a specific set of colour values (in my case one, but a threshold might be nice) .... the closest I have come is min/max values, but of course they will give the X/Y but not necessarily the min and max in the image.

Would be useful, anyone know?

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


may be you can use min/max after ippiLUT function?



But this would give me the lowest value's position in terms of X/Y, but it would not give me the limits of that region adjusted by LUT.

Perhaps I was not clear (or did not understand your response), I am looking for the X/Y limits (2D bounding box) for a specific set of pixels. In my case I am using a single channel, and a single instensity value and need to found the bounding box of those pixels of that value (which is ideal for tracking regions).

Any further ideas ????

Many thanks, Chris.


Thanks for the code, but I already have this. I am looking for something faster in IPP (it's purpose no?) ...

Seems like a basic function that one would use in Image processing, but missing in IPP. Well I shall submita suggestion then.

Many thanks to all,


My English is not good.
I might not understand your processing.
However, is it ippiFloodFill that you are looking for?
Or, is it ippsMinMaxIndx?

Message Edited by Seiji-Torigoe on 11-05-2004 02:29 AM


Really I need to get better at explaining :)

What I am doing is searching a 2D region for a specific colour match (currently I am using GT/LT functions, but LUT is also acceptable, although function wise no fewer calls). With a specific colour match I enter this pixel entry into an identically sized 2D, single channel, plane which I turn a pixel a specific colour (a value from 0 - 255, but always the same).

I then post-process and remove some noise, and end up with a single patch of this specific "colour".

In order to determine the region/size of the colour I need to search for its limits (i.e. (X, YMin), (X, YMax), (XMin, Y), (XMax, Y)) wherebyX, YMinequates toYMin is wherethelowest pixel Index is for this specific colour, and X is the X coordinate at this position the moment I am searching in pretty much the same way as one of the previous postings (two up from this one) ... but it's slow and as IPP is basically a fast implementation of many useful function ... it seems tome that thereshould be something like this .... but there isn't - unfortunately.
Anyway, if no-one has any solutions, I shall post this as a suggestion to the next edition of IPP.

All the best, Chris.

Leave a Comment

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