Dividing an image into 104 squares

Hi guys,

I was wondering if it is possible to devide my image into 104 squares, based on the image. And check for each square the percentage covered by a certain colour that is determined by a threshold? The division into 104 squares should be automated, the outer edges could be found using thresholds again.

Do you mean something like Image > Stacks > Tools > Montage to Stack…?

This will divide your image into 8 x 13 = 104 equal rectangles, displayed as a 104-slice stack. Whether the rectangles are squares will depend on the aspect ratio of the original image.

2 Likes

Thanks a lot for the idea. I’ll have a look at it later.

It worked like a charm, only thing to improve is image aquisition, as to make the subject perfectly square. However when I run analyse particles, it gives the same 4 particles for every slice, which I find rather odd, as the slices are all very different.

Could you post an example image to explain what you’re trying to achieve?

Well I can quiet simply explain. I have a tray for seeding. This tray has 104 slots, arranged 13*8. For each slot I would like to know the percentage that is covered with green, or simply put analyse particles after I threshold it to put through the plant area. This all in order to score the percentage germination, with germination being defined as a certain percentage of the slot filled with plant material.

Hi Luuklag,
I programmed a java plugin that does it.
Grid an image and then launch analyze particles in each of the gridded square, then you can check/add/delete the rois extracted.
I have to ask to my boss and people involved if I could pass directly my plugin, if you are interested let me know that I will ask.

Essentially, it is a for cycle where each square is used to crop the original image, then the crop is analyzed with threshold and launch particle analyzer on it and then at the end remount the montage with the rois extracted.
This the way I did it, I really dont know if I can pass my code directly due to the fact I dont know legally if I am in a confidential relationship with the researcher and the reserach campus where I work.

Have a nice day,
Emanuele Martini