Detect object with white and gray shades

Detect object’ boundary pixel points which is having white and gray shades, and the background with yellow and black color square boxes.
I have applied Grayscale conversion and used findContours() to detect the object. But its not covering the entire object properly, due to the grey/black shade at the top and bottom edges of object.
Tried increasing the contrast of the image, but it causing the contour to detect the background square boxes also, which are in white color after converting to grayscale.

Please suggest any other possible approach