Borrar filtros
Borrar filtros

How can I track the interface of image?

4 visualizaciones (últimos 30 días)
Parham Babakhani Dehkordi
Parham Babakhani Dehkordi el 23 de Mayo de 2016
Comentada: Parham Babakhani Dehkordi el 24 de Mayo de 2016
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.

Respuesta aceptada

Image Analyst
Image Analyst el 23 de Mayo de 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 comentarios
Parham Babakhani Dehkordi
Parham Babakhani Dehkordi el 24 de Mayo de 2016
well-done, helped a lot
Parham Babakhani Dehkordi
Parham Babakhani Dehkordi el 24 de Mayo de 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.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by