PHP - Spot the difference - Image Processing

623 views Asked by At

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

  • Image 1: A garden
  • Image 2: Same Garden with a person standing

Required Output: Separate out the person standing

Any technical pointers towards the topic will be much appreciated.

Thanks.

1

There are 1 answers

1
Baba On BEST ANSWER

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