필터 지우기
필터 지우기

how to quantify multicolor images ?

조회 수: 3 (최근 30일)
Surya Gnyawali
Surya Gnyawali 2016년 10월 3일
댓글: Surya Gnyawali 2016년 10월 3일
Hi,
I have to quantify this attached multi-color image. This image (Picture1.png)is an outcome of (Matlab enhanced from Picture4.png) dermascopic image from a broad band light of a microscope. I want to get numbers out of it. Such as what percentage of the signal is red, pink or yellow or green or blue. I basically need free-hand ROI and get Red signal intensity for example). Can you please help me out with this? Thanks Surya

채택된 답변

Joe Yeh
Joe Yeh 2016년 10월 3일
Here's a solution
img = imread('Picture1.png');
imh = imshow(img);
% Create a mask using freehand ROI
h = imfreehand;
m = createMask(h, imh);
delete(h)
% Extract individual color channels
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);
% Get sum of intensity of each channel
r_s = sum(r(m));
g_s = sum(g(m));
b_s = sum(b(m));
% Calculate percentage of intensity of each color
r_p = r_s / (r_s + g_s + b_s) * 100;
g_p = g_s / (r_s + g_s + b_s) * 100;
b_p = b_s / (r_s + g_s + b_s) * 100;
  댓글 수: 1
Surya Gnyawali
Surya Gnyawali 2016년 10월 3일
Great! That works. Thanks So much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Filtering and Enhancement에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by