• Posts
  • RSS
  • ◂◂RSS
  • Contact

  • Compiling SSIM on Mac

    November 25th, 2014
    tech  [html]
    If you want to examine the distortion that comes from a lossy compression algorithm, it's helpful to have a tool that's a good proxy for asking a person "how similar are these two images"? The standard algorithm for this is SSIM, but there are several implementations. I was initially using Pornel's dssim, but I wanted to compare this to Mehdi's SSIM. Mehdi's doesn't document how to compile it on a mac, so here's what worked for me:

    1. Install OpenCV
      1. Download OpenCV for linux/mac. I downloaded 2.4.9 from opencv.org/downloads.
      2. unzip ~/Downloads/opencv-2.4.9.zip
      3. cd ~/Downloads/opencv-2.4.9/
      4. mkdir build && cd build
      5. cmake -G "Unix Makefiles" ..
      6. make -j8
      7. sudo make install
    2. Download SSIM.ccp: wget http://mehdi.rabah.free.fr/SSIM/SSIM.cpp
    3. The SSIM.cpp file needs a small change: replace "#include <iostream.h>" with "#include <iostream>".
    4. Compile with:
      g++ -I/usr/local/include/opencv \
          -L/usr/local/lib/ \
          -lopencv_core \
          -lopencv_highgui \
          -lopencv_imgproc \
          SSIM.cpp \
          -o ssim
    5. Enjoy using SSIM: ./ssim a-original.png a-modified.png

    Recent posts on blogs I like:

    Learning Worst Industry Practices

    If I have a bad idea and you have a bad idea and we exchange them, we now have two bad ideas. But more than that. If I have a bad idea and you have a good idea and we exchange them, we should both land on your good idea – but that requires both […]

    via Pedestrian Observations September 20, 2020

    Collections: Iron, How Did They Make It? Part I, Mining

    This week we are starting a four-part look at pre-modern iron and steel production. As with our series on farming, we are going to follow the train of iron production from the mine to a finished object, be that a tool, a piece of armor, a simple nail, a w…

    via A Collection of Unmitigated Pedantry September 18, 2020

    Learning Game

    I came up with this game. In the game one person thinks of something and then gives the other person a clue. And the other person writes a guess down on a blackboard or a piece of paper. Or really anything you have that's laying around that's av…

    via Lily Wise's Blog Posts September 17, 2020

    more     (via openring)


  • Posts
  • RSS
  • ◂◂RSS
  • Contact