I'm trying write a code to find a nozzle spray angle (image) after binary process. I read something about hough transform to do this but I can't apply correctly. (Calculating the angle between two lines in an image in Python and How to find angle of hough lines detected?)
For a while I have this:
import cv2
import numpy as np
import math
import matplotlib.pyplot as plt
img_grey = cv2.imread('sprayang.jpg', cv2.IMREAD_GRAYSCALE)
img = cv2.GaussianBlur (img_grey, (5,5), 0)
th = 0
max_val = 255
ret, o1 = cv2.threshold(img, th, max_val, cv2.THRESH_BINARY + cv2.THRESH_OTSU )
And the generated image is that:
Using the angle measurement tool in ImageJ I measured about 90°.