Class made to do some basic RGB analysis
All those inner functions in your constructor are unnecessary. Inner functions should be used sparingly, normally you have only these cases: 


Functions which can do something based on parameters you pass to it and which are not directly related to some object. Make these functions stand-alone functions.
Functions which do something with an object or return some information about that object. Make these functions methods (or properties) of the class of the object.
Functions which logically belong to some class because they make only sense in combination with them. Make these functions static methods of the class (by adding the decorator @staticmethod).


In your case I would do Option 2 (with the addition of making them properties which will be calculated when you first access them).

class Img:
    def __init__(self,filename):
        self.name = filename
        self.image = Image.open(self.name) # open image using PIL

        # convert the image to a pandas df
        self.df = pd.DataFrame(data=list(self.image.getdata()))

        # get the RGB values from the image
        self.r = self.df[0].mean()
        self.g = self.df[1].mean()
        self.b = self.df[2].mean()

        self._luminance = None
        self._contrast = None

    @property
    def luminance(self):
       """Calculate luminance (brightness) based on the RGB values"""
        if self._luminance is None:
            self._luminance = (0.299*self.r + 0.587*self.g + 0.114*self.b)
        return self._luminance

    @property
    def contrast(self):
        """Calculate the contrast using the Michelson contrast formula."""
        if self._contrast is None:
            min_ = self.luminance.quantile(0.05)
            max_ = self.luminance.quantile(0.95)
            self._contrast = (max_ - min_) / (max_ + min_)
        return self._contrast