Hi Andrei,

I too found it hard to find a Hough line transform for imageJ. However, there is a Radon transform plugin and the two are very closely related.

There are some limitations with Radon transform in imageJ:

- square images only
- doesn’t automate easily with the macro recorder.

Here’s a square crop from image with a couple more lines drawn on it. The attached script produced the image.

-Chris

```
id_orig = getImageID();
recalc=true;
if( recalc ){
run("Duplicate...", " ");
id_tmp = getImageID();
run("16-bit");
run("Invert");
getStatistics(area, mean, min, max, std, histogram);
run("Subtract...", "value="+round(mean));
run("RadonTransform ");
// The users needs to press the button in the radon transform dialog
waitForUser("press calculate\n");
id_sine=getImageID();
selectImage(id_tmp);
close();
selectImage(id_sine);
run("Find Maxima...", "prominence=30 output=[Point Selection]");
getSelectionCoordinates(xpoints, ypoints);
ints=newArray(xpoints.length);
for( i=0;i<xpoints.length;i++){
ints[i] = getPixel(xpoints[i], ypoints[i]);
print(xpoints[i],ypoints[i],ints[i]);
}
}
getDimensions(ws, hs, channels, slices, frames);
selectImage(id_orig);
getDimensions(w, height, channels, slices, frames);
colors=newArray('red','orange','yellow','green','blue');
for(i=0;i<minOf(xpoints.length,colors.length);i++){
mx = xpoints[i];
my = ypoints[i];
th=((mx)/(ws*1.)+0.5)*PI;
R=-(my-hs/2.)/(hs/2.)*w/sqrt(2);
xc=w/2.;
yc = xc;
makeLine(xc,yc,xc+R*sin(th),yc+R*cos(th),xc+R*sin(th)+ints[i]*sin(th+PI*0.5),yc+R*cos(th)+ints[i]*cos(th+PI*0.5));
Overlay.addSelection(colors[i]);
}
Overlay.show;
```