I don't need too much precision, but the edges should be continuous for object detection. I want to create an enclosed contour outlining the objects in the gray image.
canny object detection is good. you can use sobel or prewit filter too but you should use them on both horizontal and vertical ways to get continuous line of edge
Since your goal is to create an enclosed contour outlining the objects in the gray image; you may try the trending Deep Learning methods for object detection such as
YOLO (https://pjreddie.com/darknet/yolo/),
SSD (Article SSD: Single Shot MultiBox Detector
).
These methods will provide better results than the traditional edge detection operators in terms of continuity as well as other parameters.