Hi,
What the parameters 'cols' and 'pitch', on VLIB erode/dilate functions, exactly means? The book Gonzalez & Woods doesnt make any direct reference to these parameters (at least I couldnt find).
Thanks
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
What the parameters 'cols' and 'pitch', on VLIB erode/dilate functions, exactly means? The book Gonzalez & Woods doesnt make any direct reference to these parameters (at least I couldnt find).
Thanks
Hi,
The pitch is a term used in video. In a video frame it is the number of pixels needed to move from one location in a video line to the "same" location in the next video line. The pitch parameter in the function was introduced to create support for different image formats. Some image formats pad the image data. Please refer to the diagram below
So if your image/video format has no padding along with the the image data then then pitch = image width = cols but if your video stream has padding on each line of image data then you should specify the pitch accordingly. For example if your video format pads 4 zeros at the end of each line of Y data your pitch will be (image width+4). The same applies to all your buffers. Let me know if this clarifies the terminology
Regards,
Rahul