• DepthAI-v2
  • Is there a way to correct for bad depth produced by anti aliasing effect?

Hello,

We have a problem with getting incorrect depth over areas that appear as 1 pixel lines on the image.

In the image below, point A is supposed to be matched with point B (based on where that physical point in the world is on both images), but it is instead matched with point C (which looks like a better match even though it's not correct). These are small patches taken from the left and right rectified/aligned images:

The reason point C look like a better match is because we have anti aliasing artifacts in the raw unrectified image:

Above is the same patch but taken from the unrectified image. When it is rectified and aligned, the anti aliased blurry spots align along the epipolar line. These blurry spots are at arbitrary locations based on where the actual pixel sensors are. From block matching perpective, they're good matches since these arbitary spots match much better to each-other than the true points.

Do you have any suggestions how to get around this problem?

Thank you.

  • erik replied to this.

    Hi mrvladimir ,
    So the solution would be to make the spots less blurry? I'd suggest checking sharpness and chroma/luma denoise. You can use cam_test.py with 0, [, ] and then +/- keys to increase/decrease those 3 parameters (they go from 0..4). Usually that would solve such issues you are experiencing. Please let us know the results.
    Thanks, Erik

    Sorry, I didn't explain the images above properly. They're screenshots of the images super zoomed in - each square that you see is a single pixel in the image. So it's physically impossible to make the result less blurry because the blur is literally a pixel wide. The blur is there because a 1-pixel-wide line starts a pixel (100, 100), then goes straight to pixel (130, 99). At first its going to be sharp, but then at some point in the middle it fall right on pixel y=99.5, so the result has to be a blur of pixels at y=99 and y=100.