<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def apply (self, img):

        
        yup,uup,vup = self.getUpLimit()
        ydwn,udwn,vdwn = self.getDownLimit()

        ''' We convert RGB as BGR because OpenCV 
        with RGB pass to YVU instead of YUV'''

        yuv = cv2.cvtColor(img, cv2.COLOR_BGR2YUV)
        
        minValues = np.array([ydwn,udwn,vdwn],dtype=np.uint8)
        maxValues = np.array([yup,uup,vup], dtype=np.uint8)

        mask = cv2.inRange(yuv, minValues, maxValues)

        res = cv2.bitwise_and(img,img, mask= mask)


        return res