I have photos of these photonic chips (top left) for which I need to create and overlay highlighting its shape. I dont get the full chip in the image, only a corner. I have tried using Canny and HoughlinesP to recognize the outside edges but these images arent of the highest quality and the recognized lines are several and very short so i have tried to write my own clustering algorithm that combines them but these lines are hard to work with: Image of houghlines image is bottom left
So I thought ill try to use findcontours to outline the whole square and heres that image: (bottom right)
And i tried filtering by the longest contour to get just the outline of the two sides of the square but that doesnt really work i just get some gibberish dots inside the chip
Im just not sure where to go from here because these sides of the chip arent imaged very well so its hard to get a good one line outline, instead its a bunch of small discontinuous lines. what canny sees is top right by the way
If theres another approach you know I would appreciate any advice.