Image reconstruction from edge information
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponse acceptée
Image Analyst
le 12 Août 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 commentaires
Ahmet Cecen
le 12 Août 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.
Plus de réponses (2)
Matt J
le 12 Août 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 commentaires
Ahmet Cecen
le 12 Août 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.
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!