Skip to main content

Table 1 Pseudocode of HT

From: Color painting predicts clinical symptoms in chronic schizophrenia patients via deep learning

Step 1

Initialize H [r, θ] = 0.

Step 2

for each edge point I [x, y] in the image

for θ = [θmin to θmax]

      r = x cosθ + y sinθ

      H [r, θ] + =1

Step 3

Find the value of (r*, θ*) where H [r, θ] is maximum

Step 4

The detected line in the image is given by r  = xcosθ  + ysinθ