switched to Input/Output Array in Color Processing
This commit is contained in:
parent
6d1ec452fc
commit
9eea9835ab
modules
gpuimgproc
gpuoptflow/src
superres/src
samples/gpu
@ -57,7 +57,7 @@ namespace cv { namespace gpu {
|
||||
/////////////////////////// Color Processing ///////////////////////////
|
||||
|
||||
//! converts image from one color space to another
|
||||
CV_EXPORTS void cvtColor(const GpuMat& src, GpuMat& dst, int code, int dcn = 0, Stream& stream = Stream::Null());
|
||||
CV_EXPORTS void cvtColor(InputArray src, OutputArray dst, int code, int dcn = 0, Stream& stream = Stream::Null());
|
||||
|
||||
enum
|
||||
{
|
||||
@ -77,24 +77,24 @@ enum
|
||||
COLOR_BayerRG2GRAY_MHT = 262,
|
||||
COLOR_BayerGR2GRAY_MHT = 263
|
||||
};
|
||||
CV_EXPORTS void demosaicing(const GpuMat& src, GpuMat& dst, int code, int dcn = -1, Stream& stream = Stream::Null());
|
||||
CV_EXPORTS void demosaicing(InputArray src, OutputArray dst, int code, int dcn = -1, Stream& stream = Stream::Null());
|
||||
|
||||
//! swap channels
|
||||
//! dstOrder - Integer array describing how channel values are permutated. The n-th entry
|
||||
//! of the array contains the number of the channel that is stored in the n-th channel of
|
||||
//! the output image. E.g. Given an RGBA image, aDstOrder = [3,2,1,0] converts this to ABGR
|
||||
//! channel order.
|
||||
CV_EXPORTS void swapChannels(GpuMat& image, const int dstOrder[4], Stream& stream = Stream::Null());
|
||||
CV_EXPORTS void swapChannels(InputOutputArray image, const int dstOrder[4], Stream& stream = Stream::Null());
|
||||
|
||||
//! Routines for correcting image color gamma
|
||||
CV_EXPORTS void gammaCorrection(const GpuMat& src, GpuMat& dst, bool forward = true, Stream& stream = Stream::Null());
|
||||
CV_EXPORTS void gammaCorrection(InputArray src, OutputArray dst, bool forward = true, Stream& stream = Stream::Null());
|
||||
|
||||
enum { ALPHA_OVER, ALPHA_IN, ALPHA_OUT, ALPHA_ATOP, ALPHA_XOR, ALPHA_PLUS, ALPHA_OVER_PREMUL, ALPHA_IN_PREMUL, ALPHA_OUT_PREMUL,
|
||||
ALPHA_ATOP_PREMUL, ALPHA_XOR_PREMUL, ALPHA_PLUS_PREMUL, ALPHA_PREMUL};
|
||||
|
||||
//! Composite two images using alpha opacity values contained in each image
|
||||
//! Supports CV_8UC4, CV_16UC4, CV_32SC4 and CV_32FC4 types
|
||||
CV_EXPORTS void alphaComp(const GpuMat& img1, const GpuMat& img2, GpuMat& dst, int alpha_op, Stream& stream = Stream::Null());
|
||||
CV_EXPORTS void alphaComp(InputArray img1, InputArray img2, OutputArray dst, int alpha_op, Stream& stream = Stream::Null());
|
||||
|
||||
////////////////////////////// Histogram ///////////////////////////////
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -94,7 +94,7 @@ void cv::gpu::createOpticalFlowNeedleMap(const GpuMat& u, const GpuMat& v, GpuMa
|
||||
|
||||
CreateOpticalFlowNeedleMap_gpu(u_avg, v_avg, vertex.ptr<float>(), colors.ptr<float>(), max_flow, 1.0f / u.cols, 1.0f / u.rows);
|
||||
|
||||
cvtColor(colors, colors, COLOR_HSV2RGB);
|
||||
gpu::cvtColor(colors, colors, COLOR_HSV2RGB);
|
||||
}
|
||||
|
||||
#endif /* HAVE_CUDA */
|
||||
|
@ -169,7 +169,7 @@ namespace
|
||||
break;
|
||||
|
||||
default:
|
||||
cvtColor(src, dst, code, cn);
|
||||
cv::cvtColor(src, dst, code, cn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -85,8 +85,8 @@ int main(int argc, const char* argv[])
|
||||
|
||||
Mat frame0Gray, frame1Gray;
|
||||
|
||||
cvtColor(frame0Color, frame0Gray, COLOR_BGR2GRAY);
|
||||
cvtColor(frame1Color, frame1Gray, COLOR_BGR2GRAY);
|
||||
cv::cvtColor(frame0Color, frame0Gray, COLOR_BGR2GRAY);
|
||||
cv::cvtColor(frame1Color, frame1Gray, COLOR_BGR2GRAY);
|
||||
|
||||
GpuMat d_frame0(frame0Gray);
|
||||
GpuMat d_frame1(frame1Gray);
|
||||
|
@ -294,7 +294,7 @@ int main(int argc, const char *argv[])
|
||||
}
|
||||
cout << endl;
|
||||
|
||||
cvtColor(resized_cpu, frameDisp, COLOR_GRAY2BGR);
|
||||
cv::cvtColor(resized_cpu, frameDisp, COLOR_GRAY2BGR);
|
||||
displayState(frameDisp, helpScreen, useGPU, findLargestObject, filterRects, fps);
|
||||
imshow("result", frameDisp);
|
||||
|
||||
|
@ -181,7 +181,7 @@ int main(int argc, const char* argv[])
|
||||
cout << "Detection time : " << tm.getTimeMilli() << " ms" << endl;
|
||||
|
||||
Mat out;
|
||||
cvtColor(image, out, COLOR_GRAY2BGR);
|
||||
cv::cvtColor(image, out, COLOR_GRAY2BGR);
|
||||
|
||||
for (size_t i = 0; i < position.size(); ++i)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ int main(int argc, const char* argv[])
|
||||
Canny(src, mask, 100, 200, 3);
|
||||
|
||||
Mat dst_cpu;
|
||||
cvtColor(mask, dst_cpu, COLOR_GRAY2BGR);
|
||||
cv::cvtColor(mask, dst_cpu, COLOR_GRAY2BGR);
|
||||
Mat dst_gpu = dst_cpu.clone();
|
||||
|
||||
vector<Vec4i> lines_cpu;
|
||||
|
@ -170,9 +170,9 @@ int main(int argc, const char* argv[])
|
||||
cout << endl;
|
||||
|
||||
Mat frame0Gray;
|
||||
cvtColor(frame0, frame0Gray, COLOR_BGR2GRAY);
|
||||
cv::cvtColor(frame0, frame0Gray, COLOR_BGR2GRAY);
|
||||
Mat frame1Gray;
|
||||
cvtColor(frame1, frame1Gray, COLOR_BGR2GRAY);
|
||||
cv::cvtColor(frame1, frame1Gray, COLOR_BGR2GRAY);
|
||||
|
||||
// goodFeaturesToTrack
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user