Laser scanner problem.

Good evening.

I'm in difficult on system measure with laser scanner. The device sand many acquired measure (about 1600). It makes a sweep (complete scan) from the lower side to the buttom and invert direction
continuously.
I use two device (laser scanner) disposed one in front the other device. I can measure the length of the targhet by the two measure acquired (scanning the lateral side of the targhet).

I try to take two "linear regression" from the point recived (by each laser), the length of the targhet is the distance of the two line determined.

Actually my problem is:

The targhet have two (or only one) CORNER (that is the pont generated when the scan intercept the buttom or the lower or buttom side of the targhet).

In this case "linear regression" of the recived point produced large error (caused from the point of the buttom and lower side).

How can I discriminate and consider only point of lateral side?

How can I recognize the presence of one or two corner by the distribution of acquired point?

I hope you can help me!