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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
