Skip to content
firepick1 (Chromebook Ubuntu) edited this page Apr 25, 2014 · 10 revisions

FireSight wrapper for OpenCV absdiff, which takes the per-channel absolute difference of two images. FireSight stage compares specified image with current pipeline image and changes output to the absolute difference of the two.

  • path Path to second image

Stage Model

The absdiff.json pipeline has two stages. The first stage computes the absdiff. The second stage adds the [histogram](op calcHist) of the absdiff image to the model. For example, if we compare identical 200x800 images, we would expect to see a histogram showing that all pixels are 0:

{
  "FireSight":{
    "version":"0.8.5",
    "url":"https://github.com/firepick1/FireSight"
  },
  "s1":{},
  "s2":{
    "hist":{
      "0":[
        160000,
        160000,
        160000
      ]
    }
  }
}

Example: Not all green pipeline

firesight -i img/pcb.jpg -p json/absdiff.json -Dimg=img/mog2.jpg -o target/absdiff.png

Pixel:4ms

The pipeline image →

The comparison image →

Note that the absolute difference of the two is not all green even though the only "difference" between the two images is that one has green text.

See Also

Clone this wiki locally