0
$\begingroup$

I am curious about something pretty simple, though I have never heard, read and more sadly seen any example of it. Take any image, represent it as a matrix, invert the matrix (assuming the inverse exists) and represent it as an image again. This in some sense visualizes the process of inverting a matrix. It would be pretty easy to code this, but before doing that I just wanted to ask if anybody has examples at hand or can say anything about this. Thanks!

$\endgroup$
1
  • 3
    $\begingroup$ Give it a try! You may run into issues where the outputs don’t nicely fit into the valid range of color values for the image space (e.g. negative numbers). So you may need to normalize the inverse in some way to make it a valid image $\endgroup$ – fiveclubs Feb 4 at 12:23
2
$\begingroup$

I tried it on square grayscale images myself (just hoping they would be invertible, which was always the case (not much luck involved here, since invertible matrices lie dense)). I added a few examples so you can judge the inverses yourself. Their precise look of course depends on the particular normalization (I used cv2.normalize and also normalized manually by

enter image description here

as done here (I used this to create the LaTeX expression)).

dolphin painting enter image description here

Moreover, I ran this procedure on all test/cat images from CIFAR-10. You can find the results here. Notice that actually a lot of these 32x32 images were (as a matrix) not invertible.

As was asked for by user fiveclubs, here are the normalized inverses of the normalized inverses. They are nowhere near their originals.

Dolphin inverse of inverse:

Dolphin inverse of inverse

Painting inverse of inverse:

Painting inverse of inverse

Tower inverse of inverse:

Tower inverse of inverse

$\endgroup$
3
  • 1
    $\begingroup$ Cool, thanks for sharing! I wonder what the inverse of the normalized inverse images would look like. $\endgroup$ – fiveclubs Feb 5 at 13:08
  • $\begingroup$ @fiveclubs Added $\endgroup$ – Mathy Feb 5 at 16:21
  • 1
    $\begingroup$ Very interesting, thanks for sharing! $\endgroup$ – fiveclubs Feb 6 at 17:05

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.