How to add the detected edges in matlab script to ROI of the imagej?

I have a matlab script which runs in the imagej script. This script detects the edges of an irregular shape. The output of this script is the matrix (x and y of pixels) of detected edges. Now, I need to add it to the ROI and do further analyses. I know that I can do find the edges by free hand section of the imagej but I want to be automated.
Any suggestion?

If you provide your code, you make it easier for others to help you.

Have a look at the documentation of available macro functions, in particular the makePolygon function.

1 Like