Detecting the edges of striped fabric on a chessboard

When detecting striped fabric, my solution performed poorly, resulting in fragmented and incomplete detection. Here are my steps:

  1. Grayscale conversion

  2. Opening Operation: Denoising

  3. Gaussian blur

  4. Calculate the median of the grayscale and use Canny edge detection

  5. Closing Operation

  6. Calculate the maximum edge value

I consistently fail to obtain a complete and effective fabric edge. My knowledge of edge detection is limited, and I hope to receive some insights and assistance.

This is my result; the separation is very fragmented.

bad illumination. your light sources reflect in whatever surfaces you have there.

place lights such that they don’t reflect in those surfaces.

Optimizing the lighting might be difficult at this point because the fabric is covered by glass. Are there any solutions under these conditions?