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