Image Intensity
Mostrar comentarios más antiguos
Hi all, Can any one tel me the command in matlab to calculate the intensity of image.
2 comentarios
Jean
el 5 de Jul. de 2013
Does anyone further know how to do this for a specific area of pixels? For example, image(100:1:200,100:1:200) for a 100 by 100 pixel area, and get the intensity in this area as an average?
Image Analyst
el 5 de Jul. de 2013
Editada: Walter Roberson
el 11 de Feb. de 2014
meanGrayLevel = mean2(yourImage(100:200,100:200));
Don't use "image" as the name of your variable since it's a function.
Respuesta aceptada
Más respuestas (4)
swetha Derangula
el 5 de Ag. de 2017
Editada: Walter Roberson
el 5 de Ag. de 2017
Is this code correct for entire image intensity? I didn't get any intensity value
clear all;
close all;
o=imread('450.jpg');
i=rgb2gray(o);
imshow(i)
intensityValue = i(100, 230);
meanIntensityValue = mean(mean(i));
please suggets me
2 comentarios
Walter Roberson
el 5 de Ag. de 2017
No code that contains "clear all" can be correct.
Your line
intensityValue = i(100, 230);
extracts one particular pixel's intensity, and only that one pixel. However,
meanIntensityValue = mean(mean(i));
should be fine for taking the mean intensity of the entire image.
Image Analyst
el 6 de Ag. de 2017
You could also use mean2().
Adina Stoica
el 4 de Jun. de 2012
Well, the intensity of the image is the average of the intensities of all pixels in an image (unless you're doing anything more specific than that). So if you do
mean(imagefile(:))
you should get the intensity of the image.
1 comentario
M@lik Ali
el 4 de Jun. de 2012
Editada: Walter Roberson
el 11 de Feb. de 2014
Saranya
el 30 de En. de 2014
0 votos
hi image analyst i want to measure the intensity profile for gray scale image.. can you help me..?
18 comentarios
Image Analyst
el 30 de En. de 2014
You can use the improfile() function to do that.
Saranya
el 31 de En. de 2014
Editada: Walter Roberson
el 11 de Feb. de 2014
clc; clear all; close all;
I used this command sir but its not working.. this is my input image http://postimg.org/image/pe5ozahzb/e770bd0c/
[f p] = uigetfile('*.jpg');
I = imread([p f]);
J = rgb2gray(I);
improfile()
Image Analyst
el 31 de En. de 2014
You're not taking the result of improfile. What variable to you want to use to accept the intensity numbers from improfile()?
lineProfile = improfile().
Saranya
el 1 de Feb. de 2014
Editada: Image Analyst
el 1 de Feb. de 2014
still am not getting the answer sir..
[f p] = uigetfile('*.jpg');
I = imread([p f]);
J = rgb2gray(I);
c = improfile();
I need a plot with X and Y axis. so that the lowest intensity will be the centromere position
Image Analyst
el 1 de Feb. de 2014
Well you never plotted it! You need to call plot(). Try this:
fontSize = 20;
folder = fullfile(matlabroot, '\toolbox\images\imdemos');
filePattern = fullfile(folder, '*.jpg')
[f p] = uigetfile(filePattern);
subplot(2, 1, 1);
originalImage = imread([p f]);
grayImage = rgb2gray(originalImage);
imshow(grayImage);
title('Original Image', 'FontSize', fontSize);
axis on;
% 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')
uiwait(msgbox('Left click, then right click'));
c = improfile();
subplot(2, 1, 2);
plot(c, 'LineWidth', 3);
grid on;
title('Intensity Profile', 'FontSize', fontSize);
Saranya
el 3 de Feb. de 2014
Thank you very much sir. I got the result.
Saranya
el 3 de Feb. de 2014
Sir, Is there any way to get the intensity profile automatically. i.e., without drawing the line manually?
Image Analyst
el 3 de Feb. de 2014
Yes. improfile() can take arguments that are the endpoints of the line.
Jensa
el 11 de Feb. de 2014
Hi Image Analyst...Can you help me to find the density profile for my chromosome image..Attaching the image along with this.. http://postimg.org/image/pe5ozahzb/e770bd0c/
Image Analyst
el 11 de Feb. de 2014
Please start your own discusssion.
Rasika Devi
el 20 de Mzo. de 2017
hello image analyst. i want to know how to calculate the weight of an image?
Walter Roberson
el 20 de Mzo. de 2017
Rasika Devi, could you confirm that you want to be able to calculate the number of photons that would be emitted to display a particular image for a particular length of time, and you would want to convert the photon energies into equivalent rest mass using E = m*c^2, in order to calculate the mass of the image? And then we should assume one standard Earth gravity in order to convert mass into weight (since weight is a force) ?
Rasika Devi
el 20 de Mzo. de 2017
thank you sir, but in matlab there is cmd as graydiffweight() how to use this for image? can you help me?
Walter Roberson
el 20 de Mzo. de 2017
I had never heard of that before.
Rasika Devi
el 20 de Mzo. de 2017
then how can i complete the weight selection problem for the grayscale image?
Walter Roberson
el 20 de Mzo. de 2017
It looks like you just have to pick either a representative pixel or a representative level and call graydiffweight() passing in the data and the location or level.
Rasika Devi
el 21 de Mzo. de 2017
Editada: Rasika Devi
el 21 de Mzo. de 2017
Thank you so much sir.. One more thing from that weight value,how do i perform the image segmentation by using any algorithm? kindly help me...
Walter Roberson
el 21 de Mzo. de 2017
I suggest you look in the File Exchange, for Image Analyst's Image Segmentation Tutorial
Syakira Akmal
el 3 de Abr. de 2017
0 votos
May I know how to convert intensity of image inform of histogram?
1 comentario
Image Analyst
el 3 de Abr. de 2017
[counts, grayLevels] = imhist(grayImage);
Categorías
Más información sobre Image Segmentation en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
