0

I am doing motion detection.

I compare 2 images at a time.

The differences are compared at the pixel level.

I want to store the differences in a file.

I have tried saving the hex value into 2 dimensional string and using the binary formatter serializing it out to a file. But the size is 495kb and the original image size is only 32kb.

What is the most efficient way of storing differences?

I am using C#

Thanks

Andrew Simpson
  • 6,883
  • 11
  • 79
  • 179

1 Answers1

1

There are many ways. Maybe took a look how bdiff is doing it. In general, compare the binary value, not a hex representation. Maybe also the binary formatter serialization adds some overhead.

Albert
  • 65,406
  • 61
  • 242
  • 386
  • Hi, I am already comparing the images at byte level using Emgu/OpenCV. What I am after is how to store those differences. Even if I do not convert the bytes to a hex number the size is still 3 times bigger than the original image. I need to only store the changes but I have to also store the x,y coordinate of that change which is why I was using a 2 dimensional array. Thanks for taking the time to reply. – Andrew Simpson Oct 18 '13 at 10:44