필터 지우기
필터 지우기

I'm trying to find a second tumor within my data but I can't

조회 수: 1 (최근 30일)
Ahmed Alnahdi
Ahmed Alnahdi 2015년 4월 18일
답변: Image Analyst 2015년 4월 19일
my data contains three tumors where I was able to define the position of the first tumor by the max fuction however I can find the second max but the problem is that the force that is directly lower that the max force is also a part of that tumor but want I want is to skip all of these unnessacery forces that are part of that tumor and look for other tumors. I'll attach the picture so you can understand more ....
I appreciate any help thanks ...
  댓글 수: 1
Image Analyst
Image Analyst 2015년 4월 19일
Please make it easy for us to help you by giving us code to read in the file. csvread() does not work. I'll check back later.

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2015년 4월 18일
I'm not exactly sure what "skip all of these unnessacery forces that are part of that tumor and look for other tumors." means, but I'm guessing that imregionalmax() may be what you need.

Image Analyst
Image Analyst 2015년 4월 19일
Try this:
clc; % Clear the command window.
close all; % Close all figures (except those of imtool.)
workspace; % Make sure the workspace panel is showing.
format long g;
format compact;
fontSize = 20;
folder = pwd;
filename = 'tissue_sample_1.csv';
% [filename, folder] = uigetfile('*.csv');
fullFileName = fullfile(folder, filename);
Force = csvread(fullFileName,4,1);
x=max(Force); % to create an array containning max values within each coulmn First_Tumor=max(x);
[row,col] = find(Force == max(Force(:)));
position_of_first_Tumor=[row,col]
subplot(2, 2, 1);
imshow(Force, [], 'InitialMagnification', 600);
title('Original Grayscale Image', 'FontSize', fontSize);
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
% Let's compute and display the histogram.
[pixelCount, grayLevels] = hist(Force, 256);
subplot(2, 2, 2);
bar(grayLevels, pixelCount, 'BarWidth', 1, 'FaceColor', 'b');
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
% Find tumors by thresholding at 0.5
binaryImage = Force > 1.5;
subplot(2, 2, 3);
imshow(binaryImage, [], 'InitialMagnification', 600);
title('Thresholded Image', 'FontSize', fontSize);
% Find regional maxima
regionalMax = imextendedmax(Force, 1);
subplot(2, 2, 4);
imshow(regionalMax, [], 'InitialMagnification', 600);
title('Regional Max', 'FontSize', fontSize);

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by