Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
61492ea0
Commit
61492ea0
authored
Jun 21, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6708 from alalek:pr6477
parents
96937bac
5e919228
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
402 additions
and
3 deletions
+402
-3
hal_replacement.hpp
modules/core/src/hal_replacement.hpp
+6
-2
stat.cpp
modules/core/src/stat.cpp
+6
-0
hal.hpp
modules/imgproc/include/opencv2/imgproc/hal/hal.hpp
+102
-0
color.cpp
modules/imgproc/src/color.cpp
+0
-0
hal_replacement.hpp
modules/imgproc/src/hal_replacement.hpp
+288
-1
No files found.
modules/core/src/hal_replacement.hpp
View file @
61492ea0
...
...
@@ -703,21 +703,25 @@ inline int hal_ni_gemm64fc(const double* src1, size_t src1_step, const double* s
//! @cond IGNORED
#define CALL_HAL_RET(name, fun, retval, ...) \
{ \
int res = fun(__VA_ARGS__, &retval); \
if (res == CV_HAL_ERROR_OK) \
return retval; \
else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
CV_Error_(cv::Error::StsInternal, \
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res)); \
}
#define CALL_HAL(name, fun, ...) \
{ \
int res = fun(__VA_ARGS__); \
if (res == CV_HAL_ERROR_OK) \
return; \
else if (res != CV_HAL_ERROR_NOT_IMPLEMENTED) \
CV_Error_(cv::Error::StsInternal, \
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res));
("HAL implementation " CVAUX_STR(name) " ==> " CVAUX_STR(fun) " returned %d (0x%08x)", res, res)); \
}
//! @endcond
#endif
modules/core/src/stat.cpp
View file @
61492ea0
...
...
@@ -2718,19 +2718,25 @@ static bool ipp_norm(Mat &src, int normType, Mat &mask, double &result)
ippiMaskNormFuncC3
ippFuncC3
=
normType
==
NORM_INF
?
(
type
==
CV_8UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_Inf_8u_C3CMR
:
#if IPP_VERSION_X100 < 900
type
==
CV_8SC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_Inf_8s_C3CMR
:
#endif
type
==
CV_16UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_Inf_16u_C3CMR
:
type
==
CV_32FC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_Inf_32f_C3CMR
:
0
)
:
normType
==
NORM_L1
?
(
type
==
CV_8UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L1_8u_C3CMR
:
#if IPP_VERSION_X100 < 900
type
==
CV_8SC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L1_8s_C3CMR
:
#endif
type
==
CV_16UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L1_16u_C3CMR
:
type
==
CV_32FC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L1_32f_C3CMR
:
0
)
:
normType
==
NORM_L2
||
normType
==
NORM_L2SQR
?
(
type
==
CV_8UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L2_8u_C3CMR
:
#if IPP_VERSION_X100 < 900
type
==
CV_8SC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L2_8s_C3CMR
:
#endif
type
==
CV_16UC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L2_16u_C3CMR
:
type
==
CV_32FC3
?
(
ippiMaskNormFuncC3
)
ippiNorm_L2_32f_C3CMR
:
0
)
:
0
;
...
...
modules/imgproc/include/opencv2/imgproc/hal/hal.hpp
View file @
61492ea0
...
...
@@ -75,6 +75,108 @@ CV_EXPORTS void warpPerspectve(int src_type,
uchar
*
dst_data
,
size_t
dst_step
,
int
dst_width
,
int
dst_height
,
const
double
M
[
9
],
int
interpolation
,
int
borderType
,
const
double
borderValue
[
4
]);
CV_EXPORTS
void
cvtBGRtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
int
dcn
,
bool
swapBlue
);
CV_EXPORTS
void
cvtBGRtoBGR5x5
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
scn
,
bool
swapBlue
,
int
greenBits
);
CV_EXPORTS
void
cvtBGR5x5toBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
dcn
,
bool
swapBlue
,
int
greenBits
);
CV_EXPORTS
void
cvtBGRtoGray
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
);
CV_EXPORTS
void
cvtGraytoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
);
CV_EXPORTS
void
cvtBGR5x5toGray
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
greenBits
);
CV_EXPORTS
void
cvtGraytoBGR5x5
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
greenBits
);
CV_EXPORTS
void
cvtBGRtoYUV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isCbCr
);
CV_EXPORTS
void
cvtYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isCbCr
);
CV_EXPORTS
void
cvtBGRtoXYZ
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
);
CV_EXPORTS
void
cvtXYZtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
);
CV_EXPORTS
void
cvtBGRtoHSV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isFullRange
,
bool
isHSV
);
CV_EXPORTS
void
cvtHSVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isFullRange
,
bool
isHSV
);
CV_EXPORTS
void
cvtBGRtoLab
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isLab
,
bool
srgb
);
CV_EXPORTS
void
cvtLabtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isLab
,
bool
srgb
);
CV_EXPORTS
void
cvtTwoPlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
dst_width
,
int
dst_height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
);
CV_EXPORTS
void
cvtThreePlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
dst_width
,
int
dst_height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
);
CV_EXPORTS
void
cvtBGRtoThreePlaneYUV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
scn
,
bool
swapBlue
,
int
uIdx
);
CV_EXPORTS
void
cvtOnePlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
,
int
ycn
);
CV_EXPORTS
void
cvtRGBAtoMultipliedRGBA
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
);
CV_EXPORTS
void
cvtMultipliedRGBAtoRGBA
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
);
//! @}
}}
...
...
modules/imgproc/src/color.cpp
View file @
61492ea0
This source diff could not be displayed because it is too large. You can
view the blob
instead.
modules/imgproc/src/hal_replacement.hpp
View file @
61492ea0
...
...
@@ -298,6 +298,294 @@ inline int hal_ni_warpPerspectve(int src_type, const uchar *src_data, size_t src
#define cv_hal_warpPerspective hal_ni_warpPerspectve
//! @endcond
/**
@brief hal_cvtBGRtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U, CV_32F)
@param scn source image channels (3 or 4)
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R channels will be swapped (BGR->RGB or RGB->BGR)
Convert between BGR, BGRA, RGB and RGBA image formats.
*/
inline
int
hal_ni_cvtBGRtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
int
dcn
,
bool
swapBlue
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoBGR5x5
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
@param greenBits number of bits for green channel (5 or 6)
Convert from BGR, BGRA, RGB and RGBA to packed BGR or RGB (16 bits per pixel, 555 or 565).
Support only CV_8U images (input 3 or 4 channels, output 2 channels).
*/
inline
int
hal_ni_cvtBGRtoBGR5x5
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
scn
,
bool
swapBlue
,
int
greenBits
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGR5x5toBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param greenBits number of bits for green channel (5 or 6)
Convert from packed BGR or RGB (16 bits per pixel, 555 or 565) to BGR, BGRA, RGB and RGBA.
Support only CV_8U images (input 2 channels, output 3 or 4 channels).
*/
inline
int
hal_ni_cvtBGR5x5toBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
dcn
,
bool
swapBlue
,
int
greenBits
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoGray
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
Convert from BGR, BGRA, RGB or RGBA to 1-channel gray.
*/
inline
int
hal_ni_cvtBGRtoGray
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtGraytoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param dcn destination image channels (3 or 4)
Convert from 1-channel gray to BGR, RGB, RGBA or BGRA.
*/
inline
int
hal_ni_cvtGraytoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGR5x5toGray
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param greenBits number of bits for green channel (5 or 6)
Convert from packed BGR (16 bits per pixel, 555 or 565) to 1-channel gray.
Support only CV_8U images.
*/
inline
int
hal_ni_cvtBGR5x5toGray
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
greenBits
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtGraytoBGR5x5
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param greenBits number of bits for green channel (5 or 6)
Convert from 1-channel gray to packed BGR (16 bits per pixel, 555 or 565).
Support only CV_8U images.
*/
inline
int
hal_ni_cvtGraytoBGR5x5
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
greenBits
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoYUV
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
@param isCbCr if set to true write output in YCbCr format
Convert from BGR, RGB, BGRA or RGBA to YUV or YCbCr.
*/
inline
int
hal_ni_cvtBGRtoYUV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isCbCr
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtYUVtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param isCbCr if set to true treat source as YCbCr
Convert from YUV or YCbCr to BGR, RGB, BGRA or RGBA.
*/
inline
int
hal_ni_cvtYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isCbCr
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoXYZ
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
Convert from BGR, RGB, BGRA or RGBA to XYZ.
*/
inline
int
hal_ni_cvtBGRtoXYZ
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtXYZtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U, CV_16U or CV_32F)
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
Convert from XYZ to BGR, RGB, BGRA or RGBA.
*/
inline
int
hal_ni_cvtXYZtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoHSV
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U or CV_32F)
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
@param isFullRange if set to true write hue in range 0-255 (0-360 for float) otherwise in range 0-180
@param isHSV if set to true write HSV otherwise HSL
Convert from BGR, RGB, BGRA or RGBA to HSV or HSL.
*/
inline
int
hal_ni_cvtBGRtoHSV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isFullRange
,
bool
isHSV
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtHSVtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U or CV_32F)
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param isFullRange if set to true read hue in range 0-255 (0-360 for float) otherwise in range 0-180
@param isHSV if set to true treat source as HSV otherwise HSL
Convert from HSV or HSL to BGR, RGB, BGRA or RGBA.
*/
inline
int
hal_ni_cvtHSVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isFullRange
,
bool
isHSV
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoLab
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U or CV_32F)
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
@param isLab if set to true write Lab otherwise Luv
@param srgb if set to true use sRGB gamma correction
Convert from BGR, RGB, BGRA or RGBA to Lab or Luv.
*/
inline
int
hal_ni_cvtBGRtoLab
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
scn
,
bool
swapBlue
,
bool
isLab
,
bool
srgb
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtLabtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param depth image depth (one of CV_8U or CV_32F)
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param isLab if set to true treat input as Lab otherwise Luv
@param srgb if set to true use sRGB gamma correction
Convert from Lab or Luv to BGR, RGB, BGRA or RGBA.
*/
inline
int
hal_ni_cvtLabtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
depth
,
int
dcn
,
bool
swapBlue
,
bool
isLab
,
bool
srgb
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtTwoPlaneYUVtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param dst_width,dst_height destination image size
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param uIdx U-channel index in the interleaved U/V plane (0 or 1)
Convert from YUV (YUV420sp (or NV12/NV21) - Y plane followed by interleaved U/V plane) to BGR, RGB, BGRA or RGBA.
Only for CV_8U.
*/
inline
int
hal_ni_cvtTwoPlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
dst_width
,
int
dst_height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtThreePlaneYUVtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param dst_width,dst_height destination image size
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param uIdx U-channel plane index (0 or 1)
Convert from YUV (YUV420p (or YV12/YV21) - Y plane followed by U and V planes) to BGR, RGB, BGRA or RGBA.
Only for CV_8U.
*/
inline
int
hal_ni_cvtThreePlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
dst_width
,
int
dst_height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtBGRtoThreePlaneYUV
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param scn source image channels (3 or 4)
@param swapBlue if set to true B and R source channels will be swapped (treat as RGB)
@param uIdx U-channel plane index (0 or 1)
Convert from BGR, RGB, BGRA or RGBA to YUV (YUV420p (or YV12/YV21) - Y plane followed by U and V planes).
Only for CV_8U.
*/
inline
int
hal_ni_cvtBGRtoThreePlaneYUV
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
scn
,
bool
swapBlue
,
int
uIdx
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtOnePlaneYUVtoBGR
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
@param dcn destination image channels (3 or 4)
@param swapBlue if set to true B and R destination channels will be swapped (write RGB)
@param uIdx U-channel index (0 or 1)
@param ycn Y-channel index (0 or 1)
Convert from UYVY, YUY2 or YVYU to BGR, RGB, BGRA or RGBA.
Only for CV_8U.
*/
inline
int
hal_ni_cvtOnePlaneYUVtoBGR
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
,
int
dcn
,
bool
swapBlue
,
int
uIdx
,
int
ycn
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtRGBAtoMultipliedRGBA
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
Convert from BGRA or RGBA to format with multiplied alpha channel.
Only for CV_8U.
*/
inline
int
hal_ni_cvtRGBAtoMultipliedRGBA
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
/**
@brief hal_cvtMultipliedRGBAtoRGBA
@param src_data,src_step source image data and step
@param dst_data,dst_step destination image data and step
@param width,height image size
Convert from format with multiplied alpha channel to BGRA or RGBA.
Only for CV_8U.
*/
inline
int
hal_ni_cvtMultipliedRGBAtoRGBA
(
const
uchar
*
src_data
,
size_t
src_step
,
uchar
*
dst_data
,
size_t
dst_step
,
int
width
,
int
height
)
{
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
//! @cond IGNORED
#define cv_hal_cvtBGRtoBGR hal_ni_cvtBGRtoBGR
#define cv_hal_cvtBGRtoBGR5x5 hal_ni_cvtBGRtoBGR5x5
#define cv_hal_cvtBGR5x5toBGR hal_ni_cvtBGR5x5toBGR
#define cv_hal_cvtBGRtoGray hal_ni_cvtBGRtoGray
#define cv_hal_cvtGraytoBGR hal_ni_cvtGraytoBGR
#define cv_hal_cvtBGR5x5toGray hal_ni_cvtBGR5x5toGray
#define cv_hal_cvtGraytoBGR5x5 hal_ni_cvtGraytoBGR5x5
#define cv_hal_cvtBGRtoYUV hal_ni_cvtBGRtoYUV
#define cv_hal_cvtYUVtoBGR hal_ni_cvtYUVtoBGR
#define cv_hal_cvtBGRtoXYZ hal_ni_cvtBGRtoXYZ
#define cv_hal_cvtXYZtoBGR hal_ni_cvtXYZtoBGR
#define cv_hal_cvtBGRtoHSV hal_ni_cvtBGRtoHSV
#define cv_hal_cvtHSVtoBGR hal_ni_cvtHSVtoBGR
#define cv_hal_cvtBGRtoLab hal_ni_cvtBGRtoLab
#define cv_hal_cvtLabtoBGR hal_ni_cvtLabtoBGR
#define cv_hal_cvtTwoPlaneYUVtoBGR hal_ni_cvtTwoPlaneYUVtoBGR
#define cv_hal_cvtThreePlaneYUVtoBGR hal_ni_cvtThreePlaneYUVtoBGR
#define cv_hal_cvtBGRtoThreePlaneYUV hal_ni_cvtBGRtoThreePlaneYUV
#define cv_hal_cvtOnePlaneYUVtoBGR hal_ni_cvtOnePlaneYUVtoBGR
#define cv_hal_cvtRGBAtoMultipliedRGBA hal_ni_cvtRGBAtoMultipliedRGBA
#define cv_hal_cvtMultipliedRGBAtoRGBA hal_ni_cvtMultipliedRGBAtoRGBA
//! @endcond
//! @}
#if defined __GNUC__
...
...
@@ -306,7 +594,6 @@ inline int hal_ni_warpPerspectve(int src_type, const uchar *src_data, size_t src
# pragma warning( pop )
#endif
#include "custom_hal.hpp"
//! @cond IGNORED
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment