The InputOutputArray is "placeholder" type. Parameters of this type are modified in place, inside the function.
There are other 2 types:
InputArray which is read-only inside the function. This parameters are used as source data for the function, but are not modified by the function.
OutputArray which is write-only. Parameters of this type are modified inside the function. Usually this means they are created inside the function. This means that data in the array are replaced by the data generated by the function.
This principle is used so the function can "return" more than one value.
本文介绍了OpenCV库中InputOutputArray类型的含义及其使用方式。InputOutputArray作为占位符类型参数,在函数内部会被修改。此外还介绍了另外两种类型:InputArray为只读类型,用于提供源数据但不会被函数修改;OutputArray为写入类型,通常意味着在函数内部创建并替换原有数据。
1万+

被折叠的 条评论
为什么被折叠?



