phpimageimage-processingimagemagickomr

PHP - Spot the difference - Image Processing


Since i'm not much into image processing in PHP, however being familiar about OCR & OMR, i'm having a unique requirement. Here's the Scenario:

Given Input: 2 Images

Required Output: Separate out the person standing

Any technical pointers towards the topic will be much appreciated.

Thanks.


Solution

  • You can use Imagick Compare function .. this can help you identify the slightest difference between images

      compare a.png a1.png diff.png
    

    Compare

    enter image description here enter image description here

    Result

    enter image description here

    Run

     convert diff.png -matte ( +clone -fuzz 5% -transparent #f3303e ) -compose DstOut -composite red-channel.png
    

    enter image description here