RGB Color Space Image Segmentation
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello All.
I have been trying to replace the original R, G and B components of an RGB image by applying the attached equations in MATLAB.
I don't know the functions to use. I have tried applying different filters but the results I get are inaccurate.
댓글 수: 8
Mrutyunjaya Hiremath
2020년 4월 24일
There is a problem in given equations
Here is the reults, after some assumptions for intitial values, like Idash ... sigma ...
채택된 답변
Mrutyunjaya Hiremath
2020년 4월 25일
Hello Muftahu Kabir,
Here is the code ...
clear all;
close all;
clc;
I = imread('1.jpg');
figure, imshow(I);
IR = I(:,:,1);
IG = I(:,:,2);
IB = I(:,:,3);
I4 = I;
I41Index = find((IG - ((IR+IB)/2) + 15) > 0);
I4(I41Index) = 0;
I42Index = find((IR - IB) > 20);
I4(I42Index) = 0;
I43Index = find((IG - IR) > 15);
I4(I43Index) = 0;
figure, imshow(I4);
I5 = I4;
delta = 50;
I51Index = find(I4 > (255 - delta));
I5(I51Index) = 0;
I52Index = find(I4 < delta);
I5(I52Index) = 0;
figure, imshow(I5);
I6 = I5;
I61Index = find(I5 > 0);
I6(I61Index) = 255;
I62Index = find(I5 == 0);
I6(I62Index) = 0;
figure, imshow(I6);
imwrite(I6, 'I6.jpg');
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!