Plotting a profile for a line on an image

조회 수: 19 (최근 30일)
UCL
UCL 2013년 2월 11일
댓글: Image Analyst 2020년 1월 24일
Dear all
I have an x-ray image (in the .tif format) of an object and I would like to draw a line across a part of the image and then plot the profile. I can do this step by step on ImageJ but I was wondering if I could do this in Matlab.
Thank you

채택된 답변

Image Analyst
Image Analyst 2013년 2월 11일
Use improfile(). If you want me to post a demo, let me know.
  댓글 수: 5
UCL
UCL 2013년 2월 12일
Sorry. I just noticed that the PC im working on doesnt have the image processing toolbox. Is there any other way around this?
I tried doing this:
close all; clear all; clc;
% Define parameters % Path / Location of the Image path='U:\My pictures\'; % Filename of the image filename='Wire_A_segment.tif';
bob=strcat(path,filename)
A=imread(bob);
figure imagesc(A) colormap(gray) colorbar axis image
% Horizontal Profile Plot Hor_Profile_Plot=A(200,:); % e.g. the profile plot of the 200th row
figure plot(Hor_Profile_Plot)
But this is manual .
Image Analyst
Image Analyst 2013년 2월 13일
You can use image() instead of imshow().

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

추가 답변 (1개)

UCL
UCL 2013년 2월 11일
Thank you for your reply. yes that would be great. My image is in the .tif format. I want to plot a profile of a horizontal line on the image.
THanx
  댓글 수: 3
shruti jain
shruti jain 2020년 1월 23일
i have an image .i want to draw line profile perpendicular to this image .how to draw
it .please help me
Image Analyst
Image Analyst 2020년 1월 24일
Call improfile() and then plot().

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

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by