Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Applying EdgeDetect to an image generates a black and white edge-detected image, which I suspect corresponds to an underlying binary matrix. How can I access this underlying data structure, and map between a given matrix position and the corresponding coordinates in the processed image? Ideally, I'd just like a list of, say, the $1$'s or $0$'s in the matrix (whatever corresponds to the white lines in the edge-detected image) and their coordinates.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

With ImageData[]. Like this:

MatrixPlot@ImageData@EdgeDetect@ExampleData[{"TestImage", "Lena"}]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.