This pull request includes updates to add t265 support to the new v2.0 grayCode based calibration system, as well as updates to the grayCode solve itself to improve results over the current implementation.
Despite the name, the current implementation uses binary coding, not Gray (reflected binary) coding. This pull request implements actual Gray coding, as well as making a few partially related changes:
Add a mock camera for testing. This also allows verification that in ideal circumstances, the output is near perfect.
Change INTER_LINEAR_EXACT to INTER_NEAREST in the code. This seems to have fixed the artifacts previously observed.
Remove a seemingly broken check:
if stage % 2 is 0:
if stage is not 17:
darkFrameBuffer = frame.copy()
It seems to me that this condition is always hit, so I instead reset all relevant buffers in the section above.
It's also worth noting that this change seems to invert the gradient direction, but that's easily rectified if it's an issue.
Here are some screenshots of the improvement:
Before (simulated 2px per-frame boundary noise):
After (same input noise, new code):
This pull request includes updates to add t265 support to the new v2.0 grayCode based calibration system, as well as updates to the grayCode solve itself to improve results over the current implementation.