If you want to work on some specific part of the image OpenCV ROI may help you
You can have something like
Mat HSV; //your source image for inrange
Mat thresholdL//destination image
int xPos= x_starting_point;
int yPos=HSV.rows
width=HSV.cols-xPos;
height=HSV.rows;
cv::Rect roi(xPos, yPos, width, height); // Your ROI rectangle
//Set image ROI
cv::Mat image_roi = HSV(roi);// note: this assignment does not copy data,HSV and image_roi now share data
//Perform your operation
inRange(image_roi,Scalar(0,1,170),Scalar(196,137,256),thresholdL);
// Now dislpay
imshow("out",HSV);
Hope these helpful for you...