Python Forum

Full Version: How to measure an inclined beam width and height in image using python?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Hello guys,

Now I have a beam greyscale image, the beam is not straight but inclined. If the beam is straight, I can calculate the sum of all rows and column's pixel greyscale value, then choose the row or column with the largest sum, and then find out how many pixels' greyscale value are over 170, then find out the width and height of the beam.

However, now that the beam is inclined, what can we do to measure the size of the beam?
If you know the angle, you can rotate by this angle.