0
$\begingroup$

I want to describe the color of an image patch (say of size 5x5) centered around a pixel of an rgb image. The most straightforward way to do that is to calculate the average color over that patch and have a 3D vector, where each component represents the average color of the corresponding channel. Another way, more informative in my opinion, is to calculate an weighted average where the weights decrease the further we go from the center of the patch. In the literature, is there an efficient and proven way to describe the color of a small patch of an image?
I'm asking this question because I'm trying to implement a particle filter that tracks an object that has a certain color. Now the object I want to track is very narrow, so my patch should be very small to fit inside it. Most of the color-based particle filtering algorithms represent the color information with a histogram and calculate the battacharyya distance for example between the histogram of the particle and the reference histogram. For a patch of 5x5, a histogram is not efficient because there are only 25 pixels. On the other hand, patch descriptors like sift and surf are not suited for color in my opinion (but if you have a different opinion it's more than welcome), this is why I'm looking for another way to robustly represent the color on a small patch of pixels.

$\endgroup$
  • $\begingroup$ Both methods you're describing are really nothing more than a low pass filter kernel applied to an image. So, both of these approaches are just "smoothers". The first one has a "flat square" kernel, whereas your weighting might just be any kernel. I think the key to an answer here is that, since you already have an opinion on what is more helpful to you, start describing what your application is, and what your images are. That way, you can actually find something that helps you rather than just a long list of halfway related things. $\endgroup$ – Marcus Müller Dec 14 '17 at 19:50
0
$\begingroup$

Another approach which might be appropriate in your Bayesian approach (Filter Particle) would be Mean Vector + Covariance Matrix.

Even for that you could employ your idea of weighing (Which is reasonable).

I would pay attention to the color space you're working in.
Euclidean Distance isn't working (At least not well) in RGB.

$\endgroup$
  • $\begingroup$ Actually I'm doing the calculations in CIE Lab, and am using the euclidean distance as a matric. Could you please expand your answer as of how to use the mean vector + covariance matrix? $\endgroup$ – user2651062 Dec 15 '17 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.