sakurarandom
Junior Member level 3
Is anyone know how to find the brightest pixel from the image? I wish to find the coordinate of the laser dot in the image.
I found this information from internet but it doesn't help me at all.
% Assume I is the image you have with RGB values.
% Assume I is a matrix of [row,col, 3] of RGB values.
% First, convert it to HSI space
hsv = rgb2hsv(I);
%get the illuminance channel
v = hsv,:,3);
%find the max pixel value
max_v = max(max(v));
% find the position of pixels having this value.
[r, c] = find(v == max_v);
% here, r are rows, c are columns.
I found this information from internet but it doesn't help me at all.
% Assume I is the image you have with RGB values.
% Assume I is a matrix of [row,col, 3] of RGB values.
% First, convert it to HSI space
hsv = rgb2hsv(I);
%get the illuminance channel
v = hsv,:,3);
%find the max pixel value
max_v = max(max(v));
% find the position of pixels having this value.
[r, c] = find(v == max_v);
% here, r are rows, c are columns.