Since our hash is 64битное number requires 32 bytes of descriptor to shrink in 8 bytes and it does not lose much accuracy.
After some tests it was decided to try these 32 bytes are present in the form of a matrix of 16x16-bit. And then this matrix to pass through a perceptual hash PHash. The result was supposed to be just a 64 bit number.
Find more questions by tags OpenCVC++AlgorithmsHashingMathematics
The second thing immediately see, and the first somehow ignored. - Marty93 commented on June 8th 19 at 17:36
After the dct pruning in this case can not throw in twice as much information than could be in the matrix at 16? - Marty93 commented on June 8th 19 at 17:39
I do not quite understand, but the idea that the ORB descriptors is 32 bytes, and awkward to compare, so the idea was to use phash to compress 32 bytes to 8 bytes, and then easier to store in the database, and work.
The whole "magic" makes phash, shrink if two similar descriptor in this way (similar is the number of differing bits is small), then their hashes will also vary slightly.
Unfortunately, the loss in accuracy when compression is inevitable.
So I'd like to work directly with ORB descriptors, store 4 possibity numbers and look for them. - houston.Waelc commented on June 8th 19 at 17:42
I'm talking about https://github.com/valbok/img.chk/blob/master/core...
after dct
we take the top left square 8*8 will there be no unnecessary loss of precision? Since dct is calculated from the matrix in which twice the density of information. - Marty93 commented on June 8th 19 at 17:45
DCT in opencv can work with the one-dimensional matrix. https://docs.opencv.org/3.4.0/d2/de8/group__core__...
So do we need to artificially introduce additional dimension in the construction of the matrix 16*16 ? Maybe you just like the array to shovel the ORB descriptor and then take 1...65 items? - Marty93 commented on June 8th 19 at 17:48
I have no such space on the memory. - Marty93 commented on June 8th 19 at 17:51
www.hackerfactor.com/blog/index.php?/archives/432-...
While the DCT is 32x32, just keep the top-left 8x8. Those represent the lowest frequencies in the picture.
He wrote: "the dct hash is based on the low 2D DCT coefficients starting at the second from lowest, leaving out the first DC term. This excludes completely flat image information (i.e. solid colors) from being included in the hash description."
> the handle and then take 1...65 items?
Unfortunately, I don't know - houston.Waelc commented on June 8th 19 at 17:54