Precision Loss in Arithmetic Encoding of Binary Vectors for Reversible Data Hiding in 3D Meshes
Show older comments
I’m currently working on a reversible data hiding scheme and using arithmetic encoding to compress auxiliary data. The data is a binary vector of approximately 7000 bits. The encoder outputs a fractional value between 0 and 1, which I store and later use for decoding.
However, during decompression, the reconstructed binary vector does not match the original, indicating a loss of precision—likely due to MATLAB’s handling of floating-point numbers. I’ve tried increasing numeric precision using vpa and symbolic variables, but the mismatch persists.
1 Comment
Stephen23
on 10 Sep 2025
What is your question for us?
Accepted Answer
More Answers (1)
Walter Roberson
on 10 Sep 2025
0 votes
I speculate that you are converting 64 bits at a time to binary, constructing a 64 bit integer from that, dividing it by 2^64.
If so then you run into the problem that double precision numbers can only represent 53 bits.
Categories
Find more on Operations on Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!