문제

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