Image Division | MATLAB

preview_player
Показать описание
Code:

clc
clear all
close all
warning off
imshow(x);
BW1=roipoly;
BW1=uint8(BW1);
imshow(x);
BW2=roipoly;
BW2=uint8(BW2);
BW=(BW1+BW2);
[r c]=size(BW);
for i=1:r
for j=1:c
if(BW(i,j)==0)
BW(i,j)=1;
else
BW(i,j)=255;
end
end
end
subplot(1,2,1);
imshow(x);
title('Original Image');
subplot(1,2,2);
imshow(x./BW);
title('Image after Division');

Image Processing using MATLAB:

#MATLAB #ImageProcessing #ComputerVision
Рекомендации по теме
Комментарии
Автор

It's more efficient in MATLAB to type in BW=BW*254+1 instead of two cycles because it is optimized for matrix computation.

andriymakeyev
Автор

Hello there. I want to get an object in the rgb picture, how can I do that. For example, there is a banana on the table and the background is black. How can I get only the banana picture from the picture.

aytactok
Автор

ı dont want to take by boundingbox. I must take with border coordinates because ı need just object.There should be no background in the picture

aytactok
Автор

I'm waiting for your help.pleaseeee

aytactok