- Get rid of the blue lines. Try a uniform background like black or white velvet fabric.
- Then use polarizers to get rid of specular reflections.
- Then have the tubes in a jig with a fixed camera so that you're always looking at the same columns of the image every time.
- Take vertical profiles using mean(grayImage(row1:row2, col1:col2, 1) to get the mean profile along the box that is just inside the tube.
- Then analyze that profile to try to determine where the liquid/air interface is.
How can I find the difference in height between the two manometer's limbs using image processing?
3 ビュー (過去 30 日間)
I am taking measurements of manometer from a video, and I want to take each frame and find the difference in height between the two limbs as shown in the photo. Then clculate the arithmetic mean for al the measurements.
here is my attempt to solve the problem:
My main focus is on the curved top of the liquid as it is darker than the liquid itself and the measurements are taken from the bottom of this curve.
First I crop the Image to get rid of the unnecessary region, then I convert it to binary as shown next
the next step is using:
bwlabel() %to label every white region
label2rgb() %to convert back to RGB image
and the result is this:
Finally keeping only the wanted regions (the top of the liquid in each tube) using their colors (orange and pink) in the previous image.
As I mentioned above, I am taking the measurements from a video (about 300 frames), the problem is that in each frame the colors differs slightly, I managed to specify a range for each color, but I believe that there is a better way to do this. Especially since I want to extract information from 200 similar videos, so the code should be able to determine the height automatically,
The main problem with my approch is that the colors of the regions (after applying bwleabel() and then label2rgb() ) change in each frame and of course this difference will be even greater when applied to frames from another video.
I think the best way to do this is to identify the concave top of the liquid very accurately and in a way that is not affected by changes from one video to another.
I know this is a difficult task that I wouldn't hope you would help me in the best way. I can also take advantage of what you think about the steps I've taken.
Thanks in advanced.
回答 (1 件)
Image Analyst 2022 年 8 月 12 日
Garbage in, garbage out. First of all try to improve your image capture.
Once you have better images, we can talk more. No sense in continuing when you're using these really bad images.