MATLAB Answers

Animal detection in thermal images

28 views (last 30 days)
Hello everyone. I'm a newbie to MATLAB and I'm kinda struck with a project which detects the animals from the given thermal image.
The tasks are as follows:
  1. Detect the animals and mark it with bounding boxes along with its temperature
  2. Enhancing the image when the contrast is not so good (background and the animal are not distinguishable )
For the above task, can someone plz suggest the methods applicable for detection. So far, I have tried to pre-process the images by masking technique so that I can improve the contrast of the image.
clc;clear;close;
img = imread('C:\Users\DIVYA MEENA\Desktop\1 (79).jpg');
img_gray = rgb2gray(img);
BW = imbinarize(img_gray);
maskedRgbImage = bsxfun(@times, img, cast(BW, 'like', img));
imshow(maskedRgbImage)
However, the above code dint help much.
Any help will be highly appreciated, Thanks in advance and sorry for the long question.
PS: I have attached my sample images.

  0 Comments

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 18 Feb 2019
It's best if you can get a background image with no animals in it, then subtract that from the frame with animals (possibly) in it. You'll need to determine this dynamically since the no-animals background image may change with time as the room changes temperature. So maybe you could check for a change, and if there has been no change for, say, 15 minutes, then declare that frame as a background image and subtract it from future frames.

  22 Comments

Walter Roberson
Walter Roberson on 24 Feb 2019
Google says the body temperature of dogs is roughly 101 F, not 101 C !!
S DIVYA MEENA
S DIVYA MEENA on 24 Feb 2019
Thank you Image Analyst for your tremendous help. and yeah, ill stitch the code and hopefully will post it here back.
My model is flir e40. I get thermal images with temperature readings.
S DIVYA MEENA
S DIVYA MEENA on 24 Feb 2019
Thank you for pointing out Walter. That was a big blunder..

Sign in to comment.

More Answers (0)