Help regarding measuring changing spouted-bed height using Image J

Hii all,

I am actually doing an experiment on fluidization, and I have to process many images (100-500) for single experiment. I want to measure the bed height in each image which is changing in each frame. (or in many of the frames). I want to write some macro or use some function in ImageJ, so that it can automatically measure bed height. Right now, I am drawing line on each measure and them measuring the bed height(which is actually very painful). I am attaching some images so that u can get the idea what I wish to do . Can someone help me in this.


RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_877.tif (900.5 KB) RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_878.tif (900.5 KB) RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_879.tif (900.5 KB) RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_880.tif (900.5 KB) RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_881.tif (900.5 KB)

Hello @Arnav_Aakash

what you need is the position of the grey bed along the ruler on the left, or the whole enveloppe?
If you just need one coordinate, you can load all your images as a stack, then draw a horizontal line covering the bed and the ruler, then use the reslice command (you may want to add some thickness to the line to get rid of noise).
This will produce a time-space diagram showing the evolution of the intersection between the bed and the ruler. It should be straightforward to segment, as both have different intensities.
Then, knowing the spatial scale and the fps of the movie, you can calculate the speed.
I may have more time tomorrow to give you more detailed explanations.
Acquiring more focused images would help, too.


Thanks for the answer @Nicolas .
But reslice command doesn’t help me as such, because in some of the images, the bed becomes very distorted, and the re-slicing gives very inaccurate results. I was hoping to write a macro or function(or some algorithm) which can detect the bed in the image and measure it’s height. I am uploading some images to give you idea of how bed becomes distorted.
RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_929.tif (900.5 KB) RecordedImage_RMC-6740GE_00-11-1C-F0-25-AF_956.tif (900.5 KB)

So you want to segment the whole bed, grey + red, and measure something on the resulting shape?
I see two options, then:

  • you can try to segment each image automatically (use the setSlice(i) command in a loop to process each frame), but you may have issues because the beds don’t have the same intensities. You’ll have to convert them in 8-bits first, perhaps by extracting one of the RGB channels which give the highest contrast.

  • Or, what is possibly smarter, you use the first frame as a reference and subtract it to the following ones (using the Image calculator). For each image, this will put into evidence all that has changed between the first image and the current one, and provided the camera and setup do not move too much (I don’t think that happens because you must operate at high fps), it will correspond to current configuration of the bed. Then you can segment it more easily. Some extra care will be needed to remove the section of the ruler that gets uncovered by the stiring of the bed, though.

I’m sorry I have little time to try it myself, but I hope you get the idea. You may already know about the Macro recorder for starting your macro.