<div dir="ltr">Hello,<div><br></div><div>I'm trying to figure it out how the 2D Hough transform has been implemented for line detection.</div><div>I think I understand it, however, I have a question. The accumulator size has one dimension that has angle and the other one has radius.</div><div>In the header file, it is said that 'The distance axis depends on the size of the diagonal of the output image' which I understand, because the point on the line cannot be further away from the origin than the opposite corner, with a radius equal to the diagonal.</div><div><br></div><div>However, my question is in the implementation. When I look at the method GenerateOutputInformation, size[0] (distance axis) is equal to:</div><div>sqrt( m_AngleResolution*m_AngleResolution + input->GetLargestPossibleRegion().GetSize()[0]*input->GetLargestPossibleRegion().GetSize()[0])</div><div><br></div><div>This seems to me that instead of taking the diagonal of the input image, it calculates the diagonal of an image with in X axis the number of pixels of the input image (normal) but in Y axis the angle steps from -pi to pi.</div><div><br></div><div>This axis is present in the accumulator, but I don't really understand why we use it here, to calculate the size of the distance axis.</div><div><br></div><div>Is it a mistake or did I miss something ?</div><div><br></div><div>Thank you.</div><div>-Laurent</div></div>