I want analyse several pictures, on all I want to analyse the top surface of a hot (light) rectangular steel slab, the area is approximatively rectangular. The slab can be found by edge detection ( by rakes) and the four lines can be made into a ROI. However, the ROI will not be correct this way since the front edge of the slab is seen in the picture and the side lines are not perfect since they will adapt the inclination to points in the front edge.
Is it possible to find edges that has a staring point and an ending point. I would like to find three side lines that finds the edges one from the right, the left and the top. If the lines have endpoints where the deviation from the line increases the end points could determine the position of the fourth line that can be made into a ROI.
Or something that would be efficient for my problem would be if the background could be identified and made passive. If I could work with only the part area things would be simpler. I want to classify the amount of "dirt" on the top surface. I can treshold the picture and evaluate the amount of black and white in the picture.
How can I define a roi that will do the work for me? The front end of the slab must be excluded in the evaluation. (The attached picture is darker than most of the ones I have.) The slab has different positions and sizes in all pictures.