Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

How to use VLIB_grayscale_morphology funciton

$
0
0

Dear all,

I found it is hard for me to implement the VLIB_grayscale_morphology function, because I can't understand some of the input arguments:

void VLIB_grayscale_morphology
(
uint16_t blk_w,       //width of input block, in elements (UQ16.0)
uint16_t line_ofst,  //offset between input lines, in elements (UQ16.0)
uint16_t blk_h,       //height of input block (UQ16.0)
const uint8_t data_ptr[],   //input data pointer (UQ8.0)
uint16_t se_w,                   //width of structuring element block, in elements (UQ16.0)
uint16_t se_h,                   //height of structuring element block (UQ16.0)
const uint8_t se_ptr[],      //structuring element data pointer (UQ8.0) 
const uint8_t refl_se_ptr[],   //Reflected structuring element data pointer (UQ8.0)
uint8_t scratch1_ptr[],          //scratch 1 pointer. Size of this scratch buffer should be equal to input image size (UQ8.0)
uint8_t scratch2_ptr[],         //scratch 2 pointer. This scratch buffer is for temproray data storage and it is used only when se_h =1, and all the elements of                                                       //structuring element is one and (blk_h - (se_h-1))se_h = 0. Size of this buffer should be 32*se_h (UQ8.0)
uint8_t output_ptr[],              //output data pointer (UQ8.0)
uint8_t operation                 //Operation selection 
);

1. what does the 'line_ofst' mean, don't understand what is the offset and what is the input lines?

2. how to set scratch2_ptr[], don't understand what '(blk_h - (se_h-1))se_h = 0' mean?

Please provide an example to call this function, I would be very appreciated.


Viewing all articles
Browse latest Browse all 17527

Trending Articles



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