I am working on opencv sgbm(semi global block matching) function. Here two parameters (minDisparity and numberOfDisparities) are used. In that why numberOfDisparities values should be divisible by 16?

有帮助吗?

解决方案

Probably to simplify the code internally, which uses SSE2. In general, SSE2 instructions:

  • Work on multiple numbers simultaneously; having the total number of pieces of information be evenly divisible makes things simpler.
  • SSE2 requires 128-bit (16 byte) memory alignment; alignment can be more easily maintained when things are nice multiples of 16...

If you examine the OpenCV source code, you'll see lots of SSE2 code for the SGBM algorithm.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top