Hi,
I wish to compare 2 black and white images of about 4000 pixels. So I have 2 arrays of 4000 integers int of value 0 or 1. My idea was to convert each array to a single binary number built by putting all the integers one after the other. I could then convert this number to a base 10 number. I would use this number as a signature of each image to compare them.
The problem is the amount of operations to make to build the binary number. Multiplying each 4000 number by a power of 10 and summing everything is longer than comparing directly each frame pixel by pixel. (As I have a lot of images, I think it's worth doing it anyway).
So would you have a method you think would be faster to build the binary number? In fact, it might be possible to use only the last bit of the pixel value integer and store it directly in 4000 bit zone. But I don't know how to do that.
Regards
I wish to compare 2 black and white images of about 4000 pixels. So I have 2 arrays of 4000 integers int of value 0 or 1. My idea was to convert each array to a single binary number built by putting all the integers one after the other. I could then convert this number to a base 10 number. I would use this number as a signature of each image to compare them.
The problem is the amount of operations to make to build the binary number. Multiplying each 4000 number by a power of 10 and summing everything is longer than comparing directly each frame pixel by pixel. (As I have a lot of images, I think it's worth doing it anyway).
So would you have a method you think would be faster to build the binary number? In fact, it might be possible to use only the last bit of the pixel value integer and store it directly in 4000 bit zone. But I don't know how to do that.
Regards
Comment