How to draw line in the image through the image processing

2 views (last 30 days)
After conducting the evaporator viusalization experiment, want to procced image processing by matlab and found out boundary line between liquid refrigerant and vapor refrigerant. I have tried it with binarize and threshold but didnt get any satisfying result.
here shows my code and the current problem is that i cant get any clear boundary as i can see in the picture with own eyes.
i'd like to ask for some advice to get through this problem
  6 Comments
Seunghyuk Lee
Seunghyuk Lee on 4 Jun 2020
currently is it limited to eliminate the reflections due to the refrigerator's size and other spatial narrowness.
there is no other way but to proceed the image processing with these reflections.

Sign in to comment.

Accepted Answer

Rafael S.T. Vieira
Rafael S.T. Vieira on 3 Jun 2020
Edited: Rafael S.T. Vieira on 3 Jun 2020
Glad to help. I've obtained that image using the Gimp editor, but, it is possible to achieve a similar result in Matlab with:
image = imread("myImage.jpeg");
A = imadjust(image, [0.2 0.8]); % adjusting color levels to enhance the image
M = edge(A(:,:,1), 'sobel') | edge(A(:,:,2), 'sobel') | edge(A(:,:,3), 'sobel'); % sobel to detect edges
N = imdilate(M,ones(5)); % dilate to obtain wider edges
O = bwareaopen(N, 1000); % to remove elements with pixel area smaller than 1000 pixels
imshowpair(image,O,'montage')
I've looked at the image histogram and used the imtool for deciding the previous parameters. The result is the following (you could try adjusting the parameters of any of these functions for obtaining a better result):

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by