I don't know why I have a different image (different colors) "Second step: Convert from BGR to HSV and third step (the mask)")

here is my code:

#!/usr/bin/env python

import roslib
import sys
import rospy
import cv2
import numpy as np
from cv_bridge import CvBridge, CvBridgeError
from geometry_msgs.msg import Twist
from sensor_msgs.msg import Image


class LineFollower(object):

    def __init__(self):

        self.bridge_object = CvBridge()
        self.image_sub = rospy.Subscriber("/camera/rgb/image_raw",Image,self.camera_callback)

    def camera_callback(self,data):

        try:
            # We select bgr8 because its the OpneCV encoding by default
            cv_image = self.bridge_object.imgmsg_to_cv2(data, desired_encoding="bgr8")
        except CvBridgeError as e:
            print(e)

        height, width, channels = cv_image.shape
        descentre = 160
        rows_to_watch = 100
        crop_img = cv_image[(height)/2+descentre:(height)/2+(descentre+rows_to_watch)][1:width]

        try:
            hsv = cv2.cvtColor(crop_img, cv2.COLOR_BGR2HSV)
            yellow = np.uint8([[[0,255,222]]])
            hsv_yellow = cv2.cvtColor(yellow,cv2.COLOR_BGR2HSV)
            print(hsv_yellow)
        except CvBridgeError as e:
            print(e)
        lower_yellow = np.array([20,100,100])
        upper_yellow = np.array([50,255,255])
        mask = cv2.inRange(hsv,lower_yellow,upper_yellow)
        res = cv2.bitwise_and(crop_img,crop_img, mask= mask)

        cv2.imshow("Image window", res)
        cv2.waitKey(1)


def main():
    line_follower_object = LineFollower()
    rospy.init_node('line_following_node', anonymous=True)
    try:
        rospy.spin()
    except KeyboardInterrupt:
        print("Shutting down")
    cv2.destroyAllWindows()

if __name__ == '__main__':
    main()

Dont quite get what you mean by this issue.
There are some parts that you dont need to do like the calculation of the hsv_yellow.
Please clarify the issue, post images of the issue and so on. Thanks, everyone will know better how to help you.