I have an image and I have a partial line in the image. They are all the time horizontal or vertical lines. I don’t know the color of the line, neither the width of the line.
How can I use PHP to detect such a line?
As you see in the uploaded image, there are 3×3 sections I need to slice. I need the 3 vertical, and 3 horizantal sections to slice the parts. Please note there is a rectangle with some markes around the content area, that is part of the images.
We can use those markers to get the coordinates.

You’re better off using the markers by comparing the first and last N pixels of each line if they have the same color/length. It will be more efficient that way than parsing all pixels on each line.