Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 123557

Forum Post: RE: vlib c674 c64p disparity SAD8

$
0
0

Here is more information

Description
VLIB_disparity_SAD8 calculates the disparity at each position in a row of an 8-bit stereo image pair. This function is optimized reusing the previous calculations. For the first row, calculations cannot be reused; thus, VLIB_disparity_SAD_firstRow8 should be used to calculate the disparities in the first row.

int32_t VLIB_disparity_SAD8(const uint8_t *restrict pLeft,
                            const uint8_t *restrict pRight,
                            uint16_t *restrict pCost,
                            uint16_t *restrict pMinCost,
                            int8_t *restrict pDisparity,
                            int32_t displacement,
                            uint32_t width,
                            int32_t pitch,
                            int32_t windowSize);

Parameters
  @param [in]     *pLeft          Pointer to left image                      (UQ8.0)
  @param [in]     *pRight         Pointer to right image                     (UQ8.0)
  @param [in,out] *pCost          Cost corresponding to current displacement (UQ16.0)
  @param [in,out] *pMinCost       Minimum cost across all displacements      (UQ16.0)
  @param [in,out] *pDisparity     Displacement having the minimum cost       (SQ8.0)
  @param [in]      displacement   Current displacement                       (in pixels)
  @param [in]      width          Width of the input images                  (in pixels)
  @param [in]      pitch          Pitch of the input images                  (in pixels)
  @param [in]      windowSize     Size of the block used for computing SAD   (in pixels)

Assumptions
 - This function should not be called on the first row of an image.  Instead, VLIB_disparity_SAD_firstRow8 should be called on the first row, and this function should be called on subsequent rows in order from top to bottom.
 - This function is called multiple times for each row of the image.  Each time, the displacement variable should be changed to search for disparities at each displacement required.
 - Before calling this function the first time for each row, the following buffers should be set accordingly:
     - pMinCost should be filled with 0xFFFF's.
     - pDisparity should be filled with 0's.
 - The pCost buffer should never be altered in between subsequent calls to this function throughout the entire frame.  It is used to store inter-row state information.
 - The image width needs to be a multiple of 8.
 - The following buffers should all be allocated at least 'width' elements: pCost & pMinCost.


Thank you.

Sincerely,

Sudhakar Ayyasamy


Viewing all articles
Browse latest Browse all 123557

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>