3
$\begingroup$

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.

$\endgroup$
4
$\begingroup$

With ImageData[]. Like this:

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

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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