Background subtraction from the thermal images.

4 views (last 30 days)
Hi...Please find the attached the image. I want the image of person only. Can you please suggest me that how to subtract background from the images? Thank you.
  3 Comments
vps
vps on 22 Nov 2016
Edited: vps on 22 Nov 2016
Hi.. Please consider this image.
KSSV
KSSV on 22 Nov 2016
Edited: KSSV on 22 Nov 2016
You try the code given at bottom.. try mask = v > 0.7;

Sign in to comment.

Accepted Answer

KSSV
KSSV on 22 Nov 2016
clc; clear all ;
rgbImage = imread('your image');
figure ; imshow(rgbImage);
% Convert RGB image into HSV color space.
hsvImage = rgb2hsv(rgbImage);
% Extract individual H, S, and V images.
h = hsvImage(:,:, 1);
s = hsvImage(:,:, 2);
v = hsvImage(:,:, 3);
% Threshold to find vivid colors.
mask = v < 0.3;
% Make image white in mask areas:
h(mask) = 0;
s(mask) = 0;
v(mask) = 1;
% Convert back to RGB
hsvImage = cat(3, h, s, v);
newRGB = hsv2rgb(hsvImage);
imshow(newRGB)

More Answers (0)

Categories

Find more on Modify Image Colors in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!