Sign in to follow this  
alexbOrsova

Image Threshold

Recommended Posts

I am working on adding Vision to one of my more complicated robotics projects. I would like to apply a threshold filter to the image that is captured by the camera. However, the only code I have found that actually does what I want is in C. I'm writing all my code in C# and know nothing about C. If any of you have heard of CMVision, you know the type of filter I want. Here is a link to the project website and an image example: Project: http://www.cs.cmu.edu/~jbruce/cmvision/ Example Pictures: Before: http://www.cs.cmu.edu/~jbruce/cmvision/img/video.jpg After: http://www.cs.cmu.edu/~jbruce/cmvision/img/classified.png The source code for CMVision is freely available from the link at the top. Does anyone here know how that type of image thresholding works?

Share this post


Link to post
Share on other sites
Well to me it looks like he's considering the image in YUV space... then considering various "cuboids" within that colour space to all be the same colour. In the example plotted at the bottom he indicates his "yellow" colour cuboid in YUV space... ie every pixel in that region of colourspace is considered "yellow" in the thresholded image (presumably the yellow plotted is at the centre of that cuboid). The only question is... does the system dynamically choose the thresholds based on some image criterion (eg cut up space based on the number of pixels in an "octree" type fashion but placing the planes to bisect the pixel data at each stage)... or simply have a set of cuboids in colour space that are associated with specific colours. This could be done explicitly... or one could simply divide the colour space up into a uniform grid of specific density. The key to me seems to be that this process is taking place in YUV (as opposed to RGB) colourspace. You could probably do something similar in HSV colour space. The advantage of spaces like this are the independance of intensity form hue (to some extent) meaning qualitatively "similar" colours are nearby in colour space.
Hope this helps,

Dan

EDIT: The "optimal" octree method I mentioned is the same as the "median cut" method used for making an optimal palette for image depth reduction/palettising. Any such method (ie bit depth reduction/palettising) would be able to produce such a thresholded image, so it's probably worth investigating algorithms intended for that purpose.

[Edited by - mrcheesewheel on August 7, 2007 9:09:28 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this