Hello,
I have to complete a very repetitive and tedious task which could possibly be dealt with by a plugin/macro/script.
Basically, I have a JPG image in gray tones with very straight features with well defined edges underlined by marked changes in colour.
I need to draw a line perpendicular to the straight features, plot an histogram of the grayscale values along the line and save the values in an excel file. The same line has then to be moved along the straight feature to recalculate the grayscale values and export them again to excel.
The image below possibly helps explain what I need to do:
I need to export grayscale values along the red line to excel. The red line is then moved along the black line to recalculate the grayscale values. The black line follows the direction of the straight feature I'm interested in and provides a guide along which to move the red line.
I need to do this process on several images so ideally the code should let me draw the black line, the red line and then calculate grayscale values, export them, move the red line along the black line and repeat the process a set number of times.
I really hope I was sufficiently clear with my explanation. I have a feeling this repetitive task can be coded. However, I have never done a plugin/macro/script for imageJ and my programming skills are very limited.
If anyone could provide some hints and ideas on how to approach and solve this problem I would be very grateful!
Thanks very much,
Giuseppe