extract integrated intensity profiles from image
No License
function [CX,CY,C_sum,C,xi,yi]=improfile_integrated(I,d,xi,yi);
'improfile_integrated' computes intensity values along a line or multiline in a greyscale images. Parameter d gives the opportunity to integrate along thicker lines with width d.
Please note the 'known problems' section!
input:
I : image (only grayscale)
d : thickness of line for integration
xi, yi : x-/y- coordinates of line profile
output:
CX, CY : (center) coordinates of intensity values
C : intensity along path, single line scan (from improfile)
C_sum : integrated intensity profile of line with thickness d
example:
I=zeros(100,100);
I(50:100,1:100)=.5;
figure, imshow(I,[]);
% image with step in the middle, the oise free image
Irand=rand(100,100)*.5;
I=I+Irand;
figure, imshow(I,[]);
% image is noisy but step is clearly visible
thickness=10;
[CX,CY,C_sum,C,xi,yi]=improfile_integrated(I,thickness);
% do a ten pixel averaging
plot(1:length(C),C,'.',1:length(C_sum),C_sum/(thickness+1),'-');
grid on, axis tight
xlabel('lateral distance [px]');
ylabel('intensity [a.u.]');
title('comparision of single linescan and integrated line scan');
known problems:
sometimes the routine fails because of the numerical method of finding
the rotated data points. An error is printed. The try it again with a
slightly different line scan.
conclusion:
is still not reliable, but up to my knowledge the first routine wich
extracts integrated intensity profiles under Matlab. This is a standard
tool in image analysis.
Feel free to improve it!
Hei 06/06
Cite As
Bernd H (2024). extract integrated intensity profiles from image (https://www.mathworks.com/matlabcentral/fileexchange/11568-extract-integrated-intensity-profiles-from-image), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Image Processing and Computer Vision > Image Processing Toolbox > Image Segmentation and Analysis > Region and Image Properties >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |