0

First of all I'm a total newbie in image processing, so please don't be too harsh on me. That being said, I'm developing an application to analyse changes in blood flow in extremities using thermal images obtained by a camera. The user is able to define a region of interest by placing a shape (circle,rectangle,etc.) on the current image. The user should then be able to see how the average temperature changes from frame to frame inside the specified ROI.

The problem is that some of the images are not steady, due to (small) movement by the test subject. My question is how can I determine the movement between the frames, so that I can relocate the ROI accordingly?

I'm using the Emgu OpenCV .Net wrapper for image processing. What I've tried so far is calculating the center of gravity using GetMoments() on the biggest contour found and calculating the direction vector between this and the previous center of gravity. The ROI is then translated using this vector but the results are not that promising yet.

Is this the right way to do it or am I totally barking up the wrong tree?

------Edit------

Here are two sample images showing slight movement downwards to the right:

http://postimg.org/image/wznf2r27n/

Comparison between the contours:

http://postimg.org/image/4ldez2di1/

As you can see the shape of the contour is pretty much the same, although there are some small differences near the toes.

eol
  • 23,236
  • 5
  • 46
  • 64
  • 1
    optical flow (velocity vectors between images) or sift/homography(where did points in one image end up in the other) – berak Jun 25 '14 at 11:01
  • Maybe template matching would be ok if there is enough similarity between the non-volatile parts of the ROI. – Roger Rowland Jun 25 '14 at 11:06
  • 1
    how big is the motion (in pixels) between two frames in worst case? How much textural information is there (since you are working on thermal images)? Can you give us some sample images? Maybe sample images that show the movement. – Micka Jun 25 '14 at 12:01
  • would you say (your impression) that the extracted contours could match? If yes, computing the cog is the first part of the often used icp algorithm (iterative closest points). Maybe you have a look at it and implement the other steps too ;) – Micka Jun 25 '14 at 12:03
  • Thank you for your answers. I'll have a look at optical flow and sift. Also I've edited my post and provided some sample images. – eol Jun 25 '14 at 14:36
  • @eol could you explain how you have calculated the blood flow velocity? – Veera Apr 20 '19 at 20:13

1 Answers1

0

Seems like I was finally able to find a solution for my problem using optical flow based on the Lukas-Kanade method.

Just in case anyone else is wondering how to implement it in Emgu/C#, here's the link to a Emgu examples project, where they use Lukas-Kanade and Farneback's algorithms: http://sourceforge.net/projects/emguexample/files/Image/BuildBackgroundImage.zip/download

You may need to adapt a few things, e.g. the parameters for the corner detection (the frame.GoodFeaturesToTrack(..) method) , but it's definetly something to start with.

Thanks for all the ideas!

eol
  • 23,236
  • 5
  • 46
  • 64