Finding a specific edge in multiple images?

5 次查看(过去 30 天)
I have a set of fotos taken by a camera that shifts slightly in the wind. I am trying to correct the shift automatically. This is the image I want to use as reference: http://i101.photobucket.com/albums/m80/klar_01/marks.jpg
This is an example of a shifted image: http://i101.photobucket.com/albums/m80/klar_01/shift2.jpg
I have cropped the reference image and isolated a part of the main horizon line using canny edge detection and a threshold. I would like to find this edge in the other images and then transform the images to line up with the reference. Unfortunately the lighting situation changes a lot and the edge can not always be picked out clearly.
This is the horizon line from the reference image (green) and the canny edges I get for the shifted image (purple). http://i101.photobucket.com/albums/m80/klar_01/edges.jpg
I can see where the green and pruple lines should line up but I have no idea how to express this in code, as I can't get a clear edge in the shifted image.
Any suggestions would be much appreciated. Other ideas about how to approach the problem would also be very welcome!
I have the computer vision toolbox and have tried using the inbuilt feature matching functions with SURF features and corner points. Points do not match up correctly, presumeably because of the changing light.

采纳的回答

Image Analyst
Image Analyst 2013-4-21
Did you try imregister()?
  3 个评论
Image Analyst
Image Analyst 2013-4-22
Sorry - I haven't used the imregister function as much as you have, so I can't help any more. You know more about it than me at this point.

请先登录,再进行评论。

更多回答(1 个)

Alex Taylor
Alex Taylor 2013-4-23
编辑:Alex Taylor 2013-4-23
Lea, I will look into this a bit, I'm busy with other things at the moment. I do have a couple other questions for you though:
1) Did you try the 'multimodal' configuration from imregconfig? Because MutualInformation is a noisy metric, pairing MutualInformation with RegularStepGradientDescent can be unstable from for some input images. Sometimes it works fine. A more typical configuration is to use the OnePlusOneEvolutionary optimizer with MutualInformation metric.
2) Am I correct that you are solving 2-D problems only? This is not volumetric registration?
3) Are you solving 1000s of independent 2-D registration problems, or does the transformation estimate from one set of images in your dataset tell you anything about the transformation you will expect for subsequent registration problems?
I'll try to mess around with your images when I get a minute and see if I can come up with anything better. In the meantime, you might take a look at the Image Registration GUI from the File Exchange. It is useful for sweeping through the parameters of the metric/optimizer configurations.
- Alex
  3 个评论
Alex Taylor
Alex Taylor 2013-4-23
Lea,
To my eyes, it looks like I can get reasonable registration results by simply accounting for translation in the full sized images. Do you have reason to believe there is also rotation in your camera due to wind? It's hard to tell from only having the two images. You mention "shift" in the camera, which I interpret to mean translation, but I see you are using a 'rigid' model in imregtform...
Lea
Lea 2013-4-26
编辑:Lea 2013-4-26
Alex, thanks so much for your input.
It's probably just translation, you're right. I'm not 100% sure as I didn't set up the camera and don't know how it can move, so I guess I was being extra careful. changing that would be an easy way to make it quicker, I'll investigate the camera rig.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Processing and Computer Vision 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by