Class made to do some basic RGB analysis I created this class to load in an image and get some specific values I needed. 

from PIL import Image
import pandas as pd

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.rList = self.df[0]
        self.gList = self.df[1]
        self.bList = self.df[2]

        # get the mean RGB values from the image
        def getMean(self,rgb):
            return rgb.mean()

        self.r = getMean(self,self.rList)
        self.g = getMean(self,self.gList)
        self.b = getMean(self,self.bList)

        # calculate luminance(brightness) based on the RGB values
        def lumi(self):  
            l = (0.299*self.rList + 0.587*self.gList + 0.114*self.bList)
            return l[l!=0]

        self.l = lumi(self)

        # calculate the contrast using the Michelson contrast formula.
        def con(self):
            min = self.l.quantile(0.05)
            max = self.l.quantile(0.95)
            return ((max-min) / (max + min))

        self.contrast = con(self)


My goal: With the class structure created, I intend to create some instances into an list and plot values. 

def loadImages(folder):
    images = []
    for image in os.listdir(folder+'/'):
        if image.endswith('.jpg'):
            name = folder+'/'+image
            images.append(Img(name))
    return images

images = loadImages('faces')

from matplotlib import pyplot as plt

plt.scatter([x for x in range(0,len(images))],[x.b for x in images])
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