Hi, I think this can be done like. 1)Consider a point and check all the points around it which are different from it. 2)this can be done recursively... 3)if we get a pixel whose id is same as already visited one...don't consider that.
On 4/15/07, elesser <[EMAIL PROTECTED]> wrote: > > Hello, > > In a program I am currently writing, I have a matrix (around 60000 x > 3) containing information about the pixels in an image: every row of > the matrix has information about 1 pixel. The first column contains > the pixel id and the following two columns contain the x and y > coordinates. If two rows have the same pixel id, this indicates that > these two pixels have exactly the same RGB values. > > What I'm now trying to do is finding the smallest box in the image > that contains ALL the colors in the image, that is, that contains > every pixel with different RGB values at least one time. As far as I > know, this is done by comparing all x and y coordinates of all the > pixels with one another, looking for the smallest difference when > substracting the xy values from each other. The problem is that from > all identical pixel id's, one pixel has to be chosen that, overall, is > the closest to all other pixels. > > Does anyone have any idea how to do this? I'm programming in MATLAB, > but code in C or C++ is fine. > > Thanks. > > > > > -- *************************************************************** 30 years from now it doesn't matter which shoe you wore,which branded jean you wore..what all matters is WHAT YOU HAVE LEARNED AND HOW YOU HAVE USED IT. http://students.iiit.ac.in/~koushik_c --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---