Image reconstruction from edge information

4 Ansichten (letzte 30 Tage)
Vishal
Vishal am 12 Aug. 2014
Kommentiert: Ahmet Cecen am 12 Aug. 2014
Hello,
I have edges that have been extracted from an image. I have eliminated some of the edges using some criteria, and now I have a new image containing only those edges and nothing else. How do I reconstruct the image with only those sections containing the resultant edges? I know there's a function to detect edges of an image, my problem is the converse... finding the image through edges.

Akzeptierte Antwort

Image Analyst
Image Analyst am 12 Aug. 2014
Like Matt said, you cannot do it. I don't know if you're familiar with Fourier theory, but let's explore why from that vantage point. The full spectrum of the image has all frequencies in it - low, medium and high frequencies. If you inverse FFT that, you'll get the original image back again perfectly. An edge image filter throws away the low frequencies and keeps only the high frequencies. So if you inverse transform this you will have just the edges back in the spatial domain. You've lost the low frequencies and once they're lost, they're lost. You can't get back the original image because you have only partial information. It would only work if your image didn't have any low frequencies to begin with, which is probably not what you have.
  2 Kommentare
Vishal
Vishal am 12 Aug. 2014
Thank you! I really didn't think about it from that angle. I'll think about another solution then.
Ahmet Cecen
Ahmet Cecen am 12 Aug. 2014
This answer is correct for images in general. If your image is indeed binary like you said as a comment to Matt's answer, then there is actually a solution for that limited case.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (2)

Matt J
Matt J am 12 Aug. 2014
The relationship is not 1-1, so it cannot be inverted. For example, the edge map itself would be a valid candidate for the inverse. The edge map could have come from itself.
  2 Kommentare
Vishal
Vishal am 12 Aug. 2014
I have the original image from which the edges were extracted... is there a way to use that to construct the new image with the edges obtained after processing? I'm talking about only binary images.
Matt J
Matt J am 12 Aug. 2014
Bearbeitet: Matt J am 12 Aug. 2014
Sorry, if you have the original image, what is it that you are trying to reconstruct? You should attach some example input and output images to your post so that we can better understand the operation you are trying to do.

Melden Sie sich an, um zu kommentieren.


Ahmet Cecen
Ahmet Cecen am 12 Aug. 2014
Your problem if I understand correctly, is in fact solvable. I don't think you communicated the fact that the image is binary effectively. I don't think there is a specific function to do it though. The main problem is figuring out which sections where originally 1 and which sections were 0. I would write a double loop to do this and get a guess:
First assign 0s and 1s alternatively on the top most row, as in, start with assigning everything 0 and when you see a boundary (boundarymatrix==1) switch to assigning 1s and so fort. After you have the top most row, start from each element of the row and form every column in a similar fashion. This way you have a consistent phase assignment. The output of this procedure will either be the correct image, or the inverted image.

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by