How can I track the interface of image?

5 visualizzazioni (ultimi 30 giorni)
Hi everyone. I have 75 binary frames. each frame has a size of Height=301 and width=1483. I attached you the first frame for your record. What I want is that I want to know the average height from the bottom of image to the interface where white pixel exist.let's say that I pick up 5 arbitrary points, as shown in the attached file and take an average of the height from these five points. This procedure must be repeated for all 75 frames. The idea is that we should track all white pixel in the domain from bottom to top of column. If there is white point then we store it, so that we can identify the interface of each image. any help would be appreciated.

Risposta accettata

Image Analyst
Image Analyst il 23 Mag 2016
It depends. Do you want to go to the bottom of the little particles? Or just the big one. If you're interested in just the big one, use bwareafilt(binaryImage, 1) to extract just the biggest blob. If you want to get a smooth envelope that sort of goes between the large and small blobs, use activecontour (demo attached). If you want to just go to the bottom of any blob, then just process columns one at a time
[rows, columns] = size(binaryImage);
bottomRows = zeros(1, columns);
for col = 1 : columns
thisColumn = binaryImage(:, col);
botCol = find(thisColumn, 1, 'last');
if ~isempty(botCol)
% There is at least one white pixel in this column.
bottomRows(col) = botCol;
end
end
% Now find mean
theSum = sum(bottomRows);
numCols = sum(bottomRows ~= 0);
meanBottomRow = theSum / numCols;
  5 Commenti
Parham Babakhani Dehkordi
Parham Babakhani Dehkordi il 24 Mag 2016
I have another question.Imagine that I have a video. frequency is 50frames/s. from this video (named as A), we can extract 3128 frames. how can I extract these frames with the name 00001image-00002image....00010image...00100image...01000image and so on up to the last image which is 03128image . I want this photos in this subsequent way.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by