Using IM to subtract changes in photos
Posted: 2012-10-27T15:48:38-07:00
Having just discovered IM and reading it's capabilities I quickly realize it may do exactly what I need, but haven't a clue how to accomplish what I want. Let me describe the goal.
In the world of Video security you have 2 common Video Encoding methods.
Mpeg2, Mpeg4
I want to create a sample series of images to simulate the idea of Mpeg2,4 and H.264 by taking a 3 second exposure at 15 frames (real 4MP JPEG photos. These 45 images will be an image of someone running across the frame, and the entire background will be static.
MP2/MP4/H .264 encoding creates specific frame type
I frame is a full image encoded and saved an can be recreated on it's own The first image will be an I-Frame
In my example the next image will be a full JPEG, but I would like to be able to remove from the second image everything that did not change and leave only the pixels that changed.. this would be my sample B-Frame..
now that I have my first I frame and B frame, I would like to create a sample P or Predicted frame...
Subtract what did not change from the third image what did not change from the first image, and the second image..
continue doing this for the 13 example P frames. Print image #16 as the first I-frame, for the beginning of the next Second, and repeat the process...
While I know these are not true Frames, based on the encoding used by MP2,MP4, or H.264, but being able to put printed images into the hands of people will give a very visual example of how the encoding process works.
Any thoughts?
In the world of Video security you have 2 common Video Encoding methods.
Mpeg2, Mpeg4
I want to create a sample series of images to simulate the idea of Mpeg2,4 and H.264 by taking a 3 second exposure at 15 frames (real 4MP JPEG photos. These 45 images will be an image of someone running across the frame, and the entire background will be static.
MP2/MP4/H .264 encoding creates specific frame type
I frame is a full image encoded and saved an can be recreated on it's own The first image will be an I-Frame
In my example the next image will be a full JPEG, but I would like to be able to remove from the second image everything that did not change and leave only the pixels that changed.. this would be my sample B-Frame..
now that I have my first I frame and B frame, I would like to create a sample P or Predicted frame...
Subtract what did not change from the third image what did not change from the first image, and the second image..
continue doing this for the 13 example P frames. Print image #16 as the first I-frame, for the beginning of the next Second, and repeat the process...
While I know these are not true Frames, based on the encoding used by MP2,MP4, or H.264, but being able to put printed images into the hands of people will give a very visual example of how the encoding process works.
Any thoughts?