'**SUMMARY**
Returns the mean color of pixels under the line.  Note that when the line falls "between" pixels, each pixels color contributes to the weighted average.
**RETURNS**
Returns an RGB triplet corresponding to the mean color of the feature.
**EXAMPLE**
>>> img = Image("lenna")
>>> l = img.findLines()
>>> c = l[0].meanColor()'

def meanColor(self):

    (pt1, pt2) = self.end_points
    (maxx, minx, maxy, miny) = self.extents()
    d_x = (maxx - minx)
    d_y = (maxy - miny)
    if (d_x == 0.0):
        return self.image[pt1[0]:(pt1[0] + 1), miny:maxy].meanColor()
    if (d_y == 0.0):
        return self.image[minx:maxx, pt1[1]:(pt1[1] + 1)].meanColor()
    error = 0.0
    d_err = (d_y / d_x)
    px = []
    weights = []
    if (d_err < 1):
        y = miny
        for x in range(minx, maxx):
            px.append(self.image[(x, y)])
            weights.append((1.0 - abs(error)))
            if (error > 0):
                px.append(self.image[(x, (y + 1))])
                weights.append(error)
            if (error < 0):
                px.append(self.image[(x, (y - 1))])
                weights.append(abs(error))
            error = (error + d_err)
            if (error >= 0.5):
                y = (y + 1)
                error = (error - 1.0)
    else:
        x = minx
        for y in range(miny, maxy):
            px.append(self.image[(x, y)])
            weights.append((1.0 - abs(error)))
            if (error > 0):
                px.append(self.image[((x + 1), y)])
                weights.append(error)
            if (error < 0):
                px.append(self.image[((x - 1), y)])
                weights.append(abs(error))
            error = (error + (1.0 / d_err))
            if (error >= 0.5):
                x = (x + 1)
                error = (error - 1.0)
    clr_arr = np.array(px)
    weight_arr = np.array(weights)
    weighted_clrs = np.transpose((np.transpose(clr_arr) * weight_arr))
    temp = (sum(weighted_clrs) / sum(weight_arr))
    return (float(temp[0]), float(temp[1]), float(temp[2]))
