Removing a specific edge from an image

3 views (last 30 days)
Jake
Jake on 26 Dec 2014
Commented: Image Analyst on 27 Dec 2014
Hello. I am trying to remove the boarder around the outside of my image. Basically, I have a picture of a picture in a frame, and I am trying to remove the frame. Segmentation based on color and edge detection hasn't worked since it is also detecting edges within the image itself.
Here is a link to the image so it's easier to understand what I'm talking about: http://i.imgur.com/LL9Puws.jpg
I want to remove the red cloth and the patchwork box that is around the main picture.
Thanks in advance.

Answers (1)

Image Analyst
Image Analyst on 27 Dec 2014
I feel like you're not telling us the whole story for some reason. If you are, then you'd simply use imcrop() interactively and crop your picture and be done with it. But if I told you that then I suspect you'd say "no it must be done without manual interaction", and then I'd give you an algorithm that would find red and brown plaid, and then you'd say "but that only works on that particular picture, not all pictures." So tell us the complete use case , like how many pictures do you have (a handful or thousands), what kinds of frames (all brown plaid, or a wide variety of appearances), are all the pictures the same size and location, or can that vary, etc. I don't want to waste time developing an algorithm that works only for the one picture you uploaded and is otherwise useless to you on other images.
  2 Comments
Jake
Jake on 27 Dec 2014
Hey, sorry for not being specific enough. Your assumptions are both correct. Basically I will have several images that will contain poorly taken pictures of pictures. The common objective is to remove the "frame" from the outside of the image. The process needs to be automated and work for a variety of different outside edges. The end goal is basically just cropping at various angles automatically. So if the image is at an angle, the crop will select just the image and not the background. I will add a few more examples and explain a bit more in a few when I get a chance.
I was thinking something like an roipoly mask that is able to place vertices along the edge between the useful picture and the static background.
Image Analyst
Image Analyst on 27 Dec 2014
If you just have several images, not thousands, why does it have to be automated? I'd recommend you just use roipolyold(). Since there are only a few/several images, just manually do it. It will take far less time to do that than to devise some robust automated algorithm.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!