mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Move OpenVX integrations to imgproc to OpenVX HAL
Covered functions: - medianBlur - Sobel - Canny - pyrDown - BoxFilter - equalizeHist - GaussianBlur - remap - threshold
This commit is contained in:
committed by
Alexander Smorkalov
parent
36a5176a5f
commit
acc9084044
@@ -3396,43 +3396,6 @@ static bool ocl_equalizeHist(InputArray _src, OutputArray _dst)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENVX
|
||||
namespace cv
|
||||
{
|
||||
static bool openvx_equalize_hist(Mat srcMat, Mat dstMat)
|
||||
{
|
||||
using namespace ivx;
|
||||
|
||||
try
|
||||
{
|
||||
Context context = ovx::getOpenVXContext();
|
||||
Image srcImage = Image::createFromHandle(context, Image::matTypeToFormat(srcMat.type()),
|
||||
Image::createAddressing(srcMat), srcMat.data);
|
||||
Image dstImage = Image::createFromHandle(context, Image::matTypeToFormat(dstMat.type()),
|
||||
Image::createAddressing(dstMat), dstMat.data);
|
||||
|
||||
IVX_CHECK_STATUS(vxuEqualizeHist(context, srcImage, dstImage));
|
||||
|
||||
#ifdef VX_VERSION_1_1
|
||||
//we should take user memory back before release
|
||||
//(it's not done automatically according to standard)
|
||||
srcImage.swapHandle(); dstImage.swapHandle();
|
||||
#endif
|
||||
}
|
||||
catch (const RuntimeError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
catch (const WrapperError & e)
|
||||
{
|
||||
VX_DbgThrow(e.what());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void cv::equalizeHist( InputArray _src, OutputArray _dst )
|
||||
{
|
||||
CV_INSTRUMENT_REGION();
|
||||
@@ -3449,9 +3412,6 @@ void cv::equalizeHist( InputArray _src, OutputArray _dst )
|
||||
_dst.create( src.size(), src.type() );
|
||||
Mat dst = _dst.getMat();
|
||||
|
||||
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_EQUALIZE_HISTOGRAM>(src.cols, src.rows),
|
||||
openvx_equalize_hist(src, dst))
|
||||
|
||||
CALL_HAL(equalizeHist, cv_hal_equalize_hist, src.data, src.step, dst.data, dst.step, src.cols, src.rows);
|
||||
|
||||
Mutex histogramLockInstance;
|
||||
|
||||
Reference in New Issue
Block a user