Page 1 of 1

Detect fire in a fire pit (compare)

Posted: 2019-04-20T07:23:30-07:00
by HDNetCams
I have a request to send a notification when there are fires burning at a resort. The images would be from IP cameras on an interval of say every 5 minutes. It seems to me I should be able to compare the new image with the previous one and determine if there is a dramatic change in brightness in the area of the image where the fire pit is.

Any thoughts? Haven't tried it yet btw, hoping someone could steer me in the right direction.


Before fire
https://drive.google.com/open?id=1JMKCB ... Yt5_tI4HMc

Fire Burning
https://drive.google.com/open?id=1boI-4 ... NNhIniBS17

Re: Detect fire in a fire pit (compare)

Posted: 2019-04-20T08:00:57-07:00
by snibgo
What version of IM, on what platform? I'll assume IM v7, on Windows BAT.

Code: Select all

%IMG7%magick ^
  "Bldg 2 Fire Pit_2019-Apr-19_20_42_27.png" ^
  "Bldg 2 Fire Pit_2019-Apr-19_20_44_51.png" ^
  -crop 17x11+1301+782 ^
  -format %%[fx:mean]\n ^
  info:

0.372995
0.994118
I've cropped a small area from both images, and found the average pixel values within those areas. There is a clear difference.

Your filenames have spaces, so they need to be quoted. I suggest you name files without spaces, because they are a pain.