| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Functions
Element-wise add and subtract
Core functionality » Hardware Acceleration Layer » Interface

## Detailed Description

Add: dst[i] = src1[i] + src2[i]
Sub: dst[i] = src1[i] - src2[i]

Parameters

  src1_data | first source image data
  src1_step | first source image step
  src2_data | second source image data
  src2_step | second source image step
  dst_data | destination image data
  dst_step | destination image step
  width | width of the images
  height | height of the images

## Functions
int | hal_ni_add16bf (const cv_hal_bf16 *src1_data, size_t src1_step, const cv_hal_bf16 *src2_data, size_t src2_step, cv_hal_bf16 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add16f (const cv_hal_f16 *src1_data, size_t src1_step, const cv_hal_f16 *src2_data, size_t src2_step, cv_hal_f16 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add16s (const short *src1_data, size_t src1_step, const short *src2_data, size_t src2_step, short *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add16u (const ushort *src1_data, size_t src1_step, const ushort *src2_data, size_t src2_step, ushort *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add32f (const float *src1_data, size_t src1_step, const float *src2_data, size_t src2_step, float *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add32s (const int *src1_data, size_t src1_step, const int *src2_data, size_t src2_step, int *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add32u (const unsigned *src1_data, size_t src1_step, const unsigned *src2_data, size_t src2_step, unsigned *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add64f (const double *src1_data, size_t src1_step, const double *src2_data, size_t src2_step, double *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add64s (const int64 *src1_data, size_t src1_step, const int64 *src2_data, size_t src2_step, int64 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add64u (const uint64 *src1_data, size_t src1_step, const uint64 *src2_data, size_t src2_step, uint64 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add8s (const schar *src1_data, size_t src1_step, const schar *src2_data, size_t src2_step, schar *dst_data, size_t dst_step, int width, int height)
int | hal_ni_add8u (const uchar *src1_data, size_t src1_step, const uchar *src2_data, size_t src2_step, uchar *dst_data, size_t dst_step, int width, int height)
int | hal_ni_addScalar16s16s (const int16_t *src_data, size_t src_step, int16_t *dst_data, size_t dst_step, int width, int height, const int16_t *scalar_data, int nChannels)
int | hal_ni_addScalar32f32f (const float *src_data, size_t src_step, float *dst_data, size_t dst_step, int width, int height, const float *scalar_data, int nChannels)
int | hal_ni_sub16bf (const cv_hal_bf16 *src1_data, size_t src1_step, const cv_hal_bf16 *src2_data, size_t src2_step, cv_hal_bf16 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub16f (const cv_hal_f16 *src1_data, size_t src1_step, const cv_hal_f16 *src2_data, size_t src2_step, cv_hal_f16 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub16s (const short *src1_data, size_t src1_step, const short *src2_data, size_t src2_step, short *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub16u (const ushort *src1_data, size_t src1_step, const ushort *src2_data, size_t src2_step, ushort *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub32f (const float *src1_data, size_t src1_step, const float *src2_data, size_t src2_step, float *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub32s (const int *src1_data, size_t src1_step, const int *src2_data, size_t src2_step, int *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub32u (const unsigned *src1_data, size_t src1_step, const unsigned *src2_data, size_t src2_step, unsigned *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub64f (const double *src1_data, size_t src1_step, const double *src2_data, size_t src2_step, double *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub64s (const int64 *src1_data, size_t src1_step, const int64 *src2_data, size_t src2_step, int64 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub64u (const uint64 *src1_data, size_t src1_step, const uint64 *src2_data, size_t src2_step, uint64 *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub8s (const schar *src1_data, size_t src1_step, const schar *src2_data, size_t src2_step, schar *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub8s32f (const schar *src1_data, size_t src1_step, const schar *src2_data, size_t src2_step, float *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub8u (const uchar *src1_data, size_t src1_step, const uchar *src2_data, size_t src2_step, uchar *dst_data, size_t dst_step, int width, int height)
int | hal_ni_sub8u32f (const uchar *src1_data, size_t src1_step, const uchar *src2_data, size_t src2_step, float *dst_data, size_t dst_step, int width, int height)

## Function Documentation

## ◆ hal_ni_add16bf()

int hal_ni_add16bf | ( | const cv_hal_bf16 * | src1_data,
|  | size_t | src1_step,
|  | const cv_hal_bf16 * | src2_data,
|  | size_t | src2_step,
|  | cv_hal_bf16 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add16f()

int hal_ni_add16f | ( | const cv_hal_f16 * | src1_data,
|  | size_t | src1_step,
|  | const cv_hal_f16 * | src2_data,
|  | size_t | src2_step,
|  | cv_hal_f16 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add16s()

int hal_ni_add16s | ( | const short * | src1_data,
|  | size_t | src1_step,
|  | const short * | src2_data,
|  | size_t | src2_step,
|  | short * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add16u()

int hal_ni_add16u | ( | const ushort * | src1_data,
|  | size_t | src1_step,
|  | const ushort * | src2_data,
|  | size_t | src2_step,
|  | ushort * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add32f()

int hal_ni_add32f | ( | const float * | src1_data,
|  | size_t | src1_step,
|  | const float * | src2_data,
|  | size_t | src2_step,
|  | float * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add32s()

int hal_ni_add32s | ( | const int * | src1_data,
|  | size_t | src1_step,
|  | const int * | src2_data,
|  | size_t | src2_step,
|  | int * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add32u()

int hal_ni_add32u | ( | const unsigned * | src1_data,
|  | size_t | src1_step,
|  | const unsigned * | src2_data,
|  | size_t | src2_step,
|  | unsigned * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add64f()

int hal_ni_add64f | ( | const double * | src1_data,
|  | size_t | src1_step,
|  | const double * | src2_data,
|  | size_t | src2_step,
|  | double * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add64s()

int hal_ni_add64s | ( | const int64 * | src1_data,
|  | size_t | src1_step,
|  | const int64 * | src2_data,
|  | size_t | src2_step,
|  | int64 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add64u()

int hal_ni_add64u | ( | const uint64 * | src1_data,
|  | size_t | src1_step,
|  | const uint64 * | src2_data,
|  | size_t | src2_step,
|  | uint64 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add8s()

int hal_ni_add8s | ( | const schar * | src1_data,
|  | size_t | src1_step,
|  | const schar * | src2_data,
|  | size_t | src2_step,
|  | schar * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_add8u()

int hal_ni_add8u | ( | const uchar * | src1_data,
|  | size_t | src1_step,
|  | const uchar * | src2_data,
|  | size_t | src2_step,
|  | uchar * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_addScalar16s16s()

int hal_ni_addScalar16s16s | ( | const int16_t * | src_data,
|  | size_t | src_step,
|  | int16_t * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height,
|  | const int16_t * | scalar_data,
|  | int | nChannels )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_addScalar32f32f()

int hal_ni_addScalar32f32f | ( | const float * | src_data,
|  | size_t | src_step,
|  | float * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height,
|  | const float * | scalar_data,
|  | int | nChannels )
| inline

`#include <core/src/hal_replacement.hpp>`

Add scalar: _dst[i] = src[i] + scalar

Parameters

  src_data | source image data
  src_step | source image step
  dst_data | destination image data
  dst_step | destination image step
  width | width of the images
  height | height of the images
  scalar_data | pointer to scalar value
  nChannels | number of channels per element

## ◆ hal_ni_sub16bf()

int hal_ni_sub16bf | ( | const cv_hal_bf16 * | src1_data,
|  | size_t | src1_step,
|  | const cv_hal_bf16 * | src2_data,
|  | size_t | src2_step,
|  | cv_hal_bf16 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub16f()

int hal_ni_sub16f | ( | const cv_hal_f16 * | src1_data,
|  | size_t | src1_step,
|  | const cv_hal_f16 * | src2_data,
|  | size_t | src2_step,
|  | cv_hal_f16 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub16s()

int hal_ni_sub16s | ( | const short * | src1_data,
|  | size_t | src1_step,
|  | const short * | src2_data,
|  | size_t | src2_step,
|  | short * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub16u()

int hal_ni_sub16u | ( | const ushort * | src1_data,
|  | size_t | src1_step,
|  | const ushort * | src2_data,
|  | size_t | src2_step,
|  | ushort * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub32f()

int hal_ni_sub32f | ( | const float * | src1_data,
|  | size_t | src1_step,
|  | const float * | src2_data,
|  | size_t | src2_step,
|  | float * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub32s()

int hal_ni_sub32s | ( | const int * | src1_data,
|  | size_t | src1_step,
|  | const int * | src2_data,
|  | size_t | src2_step,
|  | int * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub32u()

int hal_ni_sub32u | ( | const unsigned * | src1_data,
|  | size_t | src1_step,
|  | const unsigned * | src2_data,
|  | size_t | src2_step,
|  | unsigned * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub64f()

int hal_ni_sub64f | ( | const double * | src1_data,
|  | size_t | src1_step,
|  | const double * | src2_data,
|  | size_t | src2_step,
|  | double * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub64s()

int hal_ni_sub64s | ( | const int64 * | src1_data,
|  | size_t | src1_step,
|  | const int64 * | src2_data,
|  | size_t | src2_step,
|  | int64 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub64u()

int hal_ni_sub64u | ( | const uint64 * | src1_data,
|  | size_t | src1_step,
|  | const uint64 * | src2_data,
|  | size_t | src2_step,
|  | uint64 * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub8s()

int hal_ni_sub8s | ( | const schar * | src1_data,
|  | size_t | src1_step,
|  | const schar * | src2_data,
|  | size_t | src2_step,
|  | schar * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub8s32f()

int hal_ni_sub8s32f | ( | const schar * | src1_data,
|  | size_t | src1_step,
|  | const schar * | src2_data,
|  | size_t | src2_step,
|  | float * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub8u()

int hal_ni_sub8u | ( | const uchar * | src1_data,
|  | size_t | src1_step,
|  | const uchar * | src2_data,
|  | size_t | src2_step,
|  | uchar * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`

## ◆ hal_ni_sub8u32f()

int hal_ni_sub8u32f | ( | const uchar * | src1_data,
|  | size_t | src1_step,
|  | const uchar * | src2_data,
|  | size_t | src2_step,
|  | float * | dst_data,
|  | size_t | dst_step,
|  | int | width,
|  | int | height )
| inline

`#include <core/src/hal_replacement.hpp>`