[Macro] Automated recognition and rotation of areas

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Macro] Automated recognition and rotation of areas

Kost
This post was updated on .
Hello everybody,

I am finishing to write a macro that will analyze some RGB pictures of
plants grown in a climate chamber.
The seeds have been planted in tray and each day during their growing one
picture was taken from the top of the chamber.

I have already writed a macro that will go through my folder with the
pictures, analyze each individual plants and return the information in which
I am interested.

But in some pictures the trays (in which the pots are) have been slightly
rotated or moved.
So I am trying to find a way to "make understand" at the macro where are the
trays and rotate them until there are not parallel to the side of the
picture.

If somebody know script or plugin that allows the recognition of shape of a
specific dimension in a picture and/or one that rotate a shape untill its
parallel to the side of the picture let me know and I will try to use it in
my situation.

Best regards,

L.

[EDIT] Example of analyzed image (tray with plant)

--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: [Macro] Automated recognition and rotation of areas

Herbie
Good day,

please post a couple of *typical* images in TIF-format.

I'm sure there is a solution for the angular adjustment, but we need to see
images first.

Regards

Herbie

::::::::::::::::::::::::::::::::::

Kost wrote

> Hello everybody,
>
> I am finishing to write a macro that will analyze some RGB pictures of
> plants grown in a climate chamber.
> The seeds have been planted in tray and each day during their growing one
> picture was taken from the top of the chamber.
>
> I have already writed a macro that will go through my folder with the
> pictures, analyze each individual plants and return the information in
> which
> I am interested.
>
> But in some pictures the trays (in which the pots are) have been slightly
> rotated or moved.
> So I am trying to find a way to "make understand" at the macro where are
> the
> trays and rotate them until there are not parallel to the side of the
> picture.
>
> If somebody know script or plugin that allows the recognition of shape of
> a
> specific dimension in a picture and/or one that rotate a shape untill its
> parallel to the side of the picture let me know and I will try to use it
> in
> my situation.
>
> Best regards,
>
> L.
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: [Macro] Automated recognition and rotation of areas

Herbie
In reply to this post by Kost
Attached please find one of your images posted to the Forum with a tray that
has been rotated by 2.5deg.
<http://imagej.1557.x6.nabble.com/file/t380516/tray-16bit_rot2-5.png>

If you use the ImageJ-PlugIn "Angular_Deviation" with

    Reference: Horizontl
    Method: Integral
    (all other options unaltered)

you'll get an estimated angular correction of -2.7deg. Given this value, you
may sufficiently align the image.

The PlugIn is available from here:
<https://www.gluender.de/Miscellanea/MiscTexts/UtilitiesText.html#Gl-2018-3>

Please carefully read the ReadMe-file that explains how to call the PlugIn
from an ImageJ-Macro!

Regards

Herbie

::::::::::::::::::::::::::::::::::

Kost wrote

> Hello everybody,
>
> I am finishing to write a macro that will analyze some RGB pictures of
> plants grown in a climate chamber.
> The seeds have been planted in tray and each day during their growing one
> picture was taken from the top of the chamber.
>
> I have already writed a macro that will go through my folder with the
> pictures, analyze each individual plants and return the information in
> which
> I am interested.
>
> But in some pictures the trays (in which the pots are) have been slightly
> rotated or moved.
> So I am trying to find a way to "make understand" at the macro where are
> the
> trays and rotate them until there are not parallel to the side of the
> picture.
>
> If somebody know script or plugin that allows the recognition of shape of
> a
> specific dimension in a picture and/or one that rotate a shape untill its
> parallel to the side of the picture let me know and I will try to use it
> in
> my situation.
>
> Best regards,
>
> L.
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html





--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: [Macro] Automated recognition and rotation of areas

Kost
Dear Herbie,

Thank you very much, it does look promising to rotate my image once it have
been extracted.

Now I will go through some way to detect the tray shape to then extract it
from the picture.

<http://imagej.1557.x6.nabble.com/file/t382467/esa.jpg>

Regards,

L.



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html