extract integrated intensity profiles from image

Versión 1.0.0.0 (1,58 KB) por Bernd H
extracts intensity profiles of an image (as improfile), but sums up along a given thickness
4K Descargas
Actualizado 28 jun 2006

Sin licencia

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

Citar como

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. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R14SP3
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0